• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

babelfish-for-postgresql / babelfish_extensions / 14441205572
75%
BABEL_5_X_DEV: 77%

Build:
Build:
LAST BUILD BRANCH: fix_script_injection
DEFAULT BRANCH: BABEL_5_X_DEV
Ran 14 Apr 2025 09:14AM UTC
Jobs 1
Files 116
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Apr 2025 08:37AM UTC coverage: 74.793% (-0.009%) from 74.802%
14441205572

push

github

web-flow
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

New Missed Lines in Diff

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

Uncovered Existing Lines

Lines Coverage ∆ File
1
84.49
-0.07% contrib/babelfishpg_tsql/src/hooks.c
Jobs
ID Job ID Ran Files Coverage
1 14441205572.1 14 Apr 2025 09:14AM UTC 116
74.79
GitHub Action Run
Source Files on build 14441205572
  • Tree
  • List 116
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14441205572
  • ce1ca7d9 on github
  • Prev Build on BABEL_5_2_STABLE (#14393090757)
  • Next Build on BABEL_5_2_STABLE (#14458059817)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc