Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not re-do permission checks on range table for parallel worker (ba…
…belfish-for-postgresql#233) With current design of postgres, workflow of parallel worker looks like something below: ``` -- main node ExecutorRun standard_ExecutorStart InitPlan ExecCheckRTPerms <-- does the permission check on all the range table entries from planner stmt standard_ExecutorRun ExecutePlan . . . ExecGather gather_getnext -- spawns initialises and run parallel workers . . . -- parallel worker ParallelQueryMain ExecutorRun standard_ExecutorStart InitPlan ExecCheckRTPerms <- redo the permission check on same set of table standard_ExecutorRun . . . ``` Here, Main worker would not have spawned the worker if there is any permission check failures on any of the range table. And parallel worker is again doing the permission check on same set of tables which is kind of redundant. So this commit avoid that unnecessary permission check. This change is also helpful when select query or subquery involves T-SQL temp tables. Currently, Babelfish is throwing error like "relation with OID 19401 does not exist" because metadata for temp tables is being stored in ENR metadata (which is backend memory) and is not being shared with parallel worker. So this changes will also avoid such error for temp table from parallel worker. Task: BABEL-4450 Signed-off-by: Dipesh Dhameliya <[email protected]>
- Loading branch information