Skip to content

Backport #8466 to release-14.0: Fix role propagation error due to missing grantor dependencies#8568

Merged
ihalatci merged 1 commit into
release-14.0from
release-14.0-backport-8466
May 14, 2026
Merged

Backport #8466 to release-14.0: Fix role propagation error due to missing grantor dependencies#8568
ihalatci merged 1 commit into
release-14.0from
release-14.0-backport-8466

Conversation

@ihalatci
Copy link
Copy Markdown
Contributor

Backport of #8466 to release-14.0.

DESCRIPTION: Add grantor role dependencies to fix node addition with interdependent roles

Modified ExpandRolesToGroups in dependency.c to track grantor roles as dependencies alongside role memberships during node activation. This ensures grantors are propagated before roles that reference them in GRANT ... GRANTED BY statements.

Added regression test covering the interdependent role scenario.

Fixes #8425

Verification

  • Build: PG 18.1 ✅
  • Regression (check-multi): 191/191 ✅
  • Style (CI stylechecker image): ✅
  • Rebased onto latest origin/release-14.0 (7 newer upstream commits, none touch the same files).

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.61%. Comparing base (16dca2a) to head (c40c9fd).
⚠️ Report is 10 commits behind head on release-14.0.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-14.0    #8568      +/-   ##
================================================
+ Coverage         79.54%   88.61%   +9.06%     
================================================
  Files               287      288       +1     
  Lines             63739    64089     +350     
  Branches           8005     8041      +36     
================================================
+ Hits              50702    56793    +6091     
+ Misses            10291     4972    -5319     
+ Partials           2746     2324     -422     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

DESCRIPTION: Add grantor role dependencies to fix node addition with interdependent roles

Modified ExpandRolesToGroups in dependency.c to track grantor roles as
dependencies alongside role memberships during node activation. This
ensures grantors are propagated before roles that reference them in
GRANT ... GRANTED BY statements.

Added regression test covering the interdependent role scenario.

Fixes #8425
@ihalatci ihalatci force-pushed the release-14.0-backport-8466 branch from 16dca2a to c40c9fd Compare May 14, 2026 14:43
@ihalatci ihalatci merged commit c40c9fd into release-14.0 May 14, 2026
28 checks passed
@ihalatci ihalatci deleted the release-14.0-backport-8466 branch May 14, 2026 14:43
ihalatci added a commit that referenced this pull request May 15, 2026
DESCRIPTION: Add grantor role dependencies to fix node addition with
interdependent roles

Modified `ExpandRolesToGroups` in `dependency.c` to track grantor roles
as dependencies alongside role memberships during node activation. This
ensures grantors are propagated before roles that reference them in
`GRANT ... GRANTED BY` statements.

Added regression test covering the interdependent role scenario.

Fixes #8425

Note: this is a clean re-application of #8466 onto current main
(replacing that PR, which had accumulated unrelated merge commits). The
change has already been backported and merged into release-14.0 (#8568),
release-13.2 (#8579), and release-12.1 (#8569).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Role propagation error due to interdependent roles while adding new nodes

1 participant