From d210797476d429ccf174accf2fbf9e0ebeaba64b Mon Sep 17 00:00:00 2001 From: Dipesh Dhameliya Date: Mon, 9 Oct 2023 16:03:17 +0530 Subject: [PATCH] Do not re-do permission checks on range table for parallel worker --- src/backend/executor/execMain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 44566a34281..a9fbd3d2c64 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -817,9 +817,10 @@ InitPlan(QueryDesc *queryDesc, int eflags) int i; /* - * Do permissions checks + * Do permissions checks if not parallel worker */ - ExecCheckRTPerms(rangeTable, true); + if (!IsParallelWorker()) + ExecCheckRTPerms(rangeTable, true); /* * initialize the node's execution state