Concurrently running "CREATE OR REPLACE FUNCTION" for the same function multiple times succeeds for one only. Postgres rolls back the transaction for all others with "tuple concurrently updated":
When concurrently creating or upgrading several RMB based modules for one or several tenants they may try to "CREATE OR REPLACE" these functions in the shared public schema at the same time:
The roll back fails creating or upgrading the tenant.
This has been fixed by creating the functions in the module-tenant schema and not in the shared public schema.
Fix for f_unaccent since RMB 29.5.0 (not yet released): https://github.com/folio-org/raml-module-builder/commit/c6ee111bdea98b4b09ddd2405fb11d3ff14e17ab (f_unaccent has always been in the shared public schema in all versions before 29.5.0: https://github.com/folio-org/raml-module-builder/commit/dc08efc4936bf1ae91534d2b0dfc3644df97066c#diff-8338122a000356f61273ee33471eae20R45 )
Fix for concat_* since RMB 29.3.0: https://github.com/folio-org/raml-module-builder/commit/872c1f80da4c8d49e6836ca9221f637dc5e7420b
This issue is about a hot fix for Fameflower b29.4.
Solution: Repeatedly try to "CREATE OR REPLACE" f_unaccent in public schema until it succeeds (up to 100 times).