aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/parallel.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-10-16 11:37:19 -0400
committerRobert Haas <rhaas@postgresql.org>2015-10-16 11:37:19 -0400
commit82b37765c76b8b2daf6cad3dfb5e5b4a2776d56f (patch)
tree53c53e32a0a7ff790d52b284cf09e05d845eb7b3 /src/include/access/parallel.h
parent6de6d96d971c76c8d7bd3b31e6f182906137f913 (diff)
downloadpostgresql-82b37765c76b8b2daf6cad3dfb5e5b4a2776d56f.tar.gz
postgresql-82b37765c76b8b2daf6cad3dfb5e5b4a2776d56f.zip
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 924bcf4f16d54c55310b28f77686608684734f42.
Diffstat (limited to 'src/include/access/parallel.h')
-rw-r--r--src/include/access/parallel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h
index b029c1e8831..44f0616cb86 100644
--- a/src/include/access/parallel.h
+++ b/src/include/access/parallel.h
@@ -48,6 +48,7 @@ typedef struct ParallelContext
extern bool ParallelMessagePending;
extern int ParallelWorkerNumber;
+extern bool InitializingParallelWorker;
#define IsParallelWorker() (ParallelWorkerNumber >= 0)