diff options
Diffstat (limited to 'src/backend/access/transam/parallel.c')
-rw-r--r-- | src/backend/access/transam/parallel.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c index 8606c009dd9..2b8bc2f58dd 100644 --- a/src/backend/access/transam/parallel.c +++ b/src/backend/access/transam/parallel.c @@ -1414,6 +1414,10 @@ ParallelWorkerMain(Datum main_arg) libraryspace = shm_toc_lookup(toc, PARALLEL_KEY_LIBRARY, false); StartTransactionCommand(); RestoreLibraryState(libraryspace); + + /* Restore GUC values from launching backend. */ + gucspace = shm_toc_lookup(toc, PARALLEL_KEY_GUC, false); + RestoreGUCState(gucspace); CommitTransactionCommand(); /* Crank up a transaction state appropriate to a parallel worker. */ @@ -1456,14 +1460,6 @@ ParallelWorkerMain(Datum main_arg) InvalidateSystemCaches(); /* - * Restore GUC values from launching backend. We can't do this earlier, - * because GUC check hooks that do catalog lookups need to see the same - * database state as the leader. - */ - gucspace = shm_toc_lookup(toc, PARALLEL_KEY_GUC, false); - RestoreGUCState(gucspace); - - /* * Restore current role id. Skip verifying whether session user is * allowed to become this role and blindly restore the leader's state for * current role. |