[FOLIO-2978] Remove uuid_generate_v4(), it fails in pgpool native replication Created: 25/Jan/21 Updated: 16/Aug/21 |
|
| Status: | Open |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | P4 |
| Reporter: | Julian Ladisch | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||
| Sprint: | CP: Non-roadmap backlog | ||||||||||||
| Development Team: | Core: Platform | ||||||||||||
| Description |
|
uuid_generate_v4() creates a different UUID in each node of a replicated PostgreSQL environment if Pgpool-II runs in native replication mode.
RMB documentation mentions it in the upgrading guide for RMB 25 and in connection with "generateId": https://github.com/folio-org/raml-module-builder/#the-post-tenant-api Tasks:
Note: To prevent any new usage of uuid_generate_v4() RMB and Spring base should add this function that takes precedence of the uuid-ossp function: CREATE OR REPLACE FUNCTION public.uuid_generate_v4() RETURNS uuid language plpgsql as $$ BEGIN RAISE 'FOLIO doesn''t allow uuid_generate_v4() because it doesn''t work with a replicated database like Pgpool-II' USING ERRCODE = 'feature_not_supported'; END; $$; Note: This doesn't affect Pgpool-II streaming replication mode, it only affect Pgpool-II native replication mode. |