mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Fix a problem with parallel workers being unable to restore role.
check_role() tries to verify that the user has permission to become the
requested role, but this is inappropriate in a parallel worker, which
needs to exactly recreate the master's authorization settings. So skip
the check in that case.
This fixes a bug in commit 924bcf4f16
.
This commit is contained in:
@ -48,6 +48,7 @@ typedef struct ParallelContext
|
||||
|
||||
extern bool ParallelMessagePending;
|
||||
extern int ParallelWorkerNumber;
|
||||
extern bool InitializingParallelWorker;
|
||||
|
||||
#define IsParallelWorker() (ParallelWorkerNumber >= 0)
|
||||
|
||||
|
Reference in New Issue
Block a user