|
Ran
|
Jobs
1
|
Files
116
|
Run time
1min
|
Badge
README BADGES
|
push
github
Avoid checking permission of Babelfish temp tables on parallel worker (#3681) Consider following facts, 1. Babelfish temp tables are implemented using ENR which is not shared between different backends. So if Parallel worker tries to check permissions on Babelfish then it will fail. 2. Any user should be able to access Babelfish temp tables under given session. 3. Postgres by default does not allow parallel operations on temp tables. Attempt to do so will result in run time error. Due to above facts, we should avoid permission check on temp tables within parallel workers while ensuring that leader does required permission check on other tables. This commits achieves this behaviour by implementating following three hooks, bbf_ParallelQueryMain_hook -- implements ParallelQueryMain_hook. It constructs Bitmapset (list of temp table oids) by looping through es_range_table checking if given relation is temp table, checks permission if it is and add it to the set. It will then pass this set of temp table defined under current with Parallel workers. bbf_ExecInitParallelPlan -- implements ExecInitParallelPlan_hook. Parallel workers will gather additional details (oid set of temp table) passed by Leader node. This set will later be used to avoid checking permissions on temp tables. bbf_ExecCheckOneRelPerms_hook -- implements ExecCheckOneRelPerms_hook. It will avoid permission check relation if relid is part of the set of oids constructed using bbf_ExecInitParallelPlan. Task: BABEL-5703 Signed-off-by: Dipesh Dhameliya <dddhamel@amazon.com> (cherry picked from commit 6da7ff0cd)
33 of 52 new or added lines in 2 files covered. (63.46%)
1 existing line in 1 file now uncovered.47684 of 63755 relevant lines covered (74.79%)
230354.94 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 3 |
84.49 |
-0.07% | contrib/babelfishpg_tsql/src/hooks.c |
| 16 |
63.64 |
contrib/babelfishpg_tsql/src/bbf_parallel_query.c |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
84.49 |
-0.07% | contrib/babelfishpg_tsql/src/hooks.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 14441205572.1 | 116 |
74.79 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|