Hi, My colleague Richard Yen came across this situation:
pg_restore: [archiver (db)] could not execute query: ERROR: cannot assign XIDs during a parallel operation Command was: -- For binary upgrade, create an empty extension and insert objects into it DROP EXTENSION IF EXISTS "btree_gin"; SELECT pg_catalog.binary_upgrade_create_empty_extension('btree_gin', 'public', true, '1.0', NULL, NULL, ARRAY[]::pg_catalog.text[]); It turned out that the target cluster was running with force_parallel_mode = on. Here's a single character patch to mark that function PARALLEL UNSAFE. Obviously that'll affect only newly initdb'd clusters after this patch, but that's what people have in a pg_upgrade scenario. This goes back to d89f06f0482 so I think it should probably be back-patched to 9.6 and 10. -- Thomas Munro http://www.enterprisedb.com
0001-Mark-binary_upgrade_create_empty_extension-PARALLEL-.patch
Description: Binary data