Backport #8466 to release-13.2: Fix role propagation error due to missing grantor dependencies#8579
Merged
Merged
Conversation
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
On PG <= 15, pg_auth_members records the original grantor on worker_2 (e.g. dist_role_1) instead of 'postgres'. Add a PG15-specific alternative-expected file so the test passes on PG15 while keeping the strong assertion on PG16+.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (35.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## release-13.2 #8579 +/- ##
=================================================
- Coverage 88.77% 29.20% -59.57%
=================================================
Files 288 288
Lines 64124 63798 -326
Branches 8071 7985 -86
=================================================
- Hits 56925 18633 -38292
- Misses 4815 42983 +38168
+ Partials 2384 2182 -202 🚀 New features to boost your workflow:
|
onurctirtir
approved these changes
May 15, 2026
Merged
This was referenced May 15, 2026
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).
ihalatci
added a commit
that referenced
this pull request
May 15, 2026
Adds the CHANGELOG entry for v13.3.0. This release includes the following backports merged into release-13.2 since v13.2.2: - #8541 - DDLs for schema-based sharding from any node - #8543, #8571 - citus_cluster_changes_{block,unblock,block_status} UDFs - #8466 (via #8579) - role propagation grantor dependencies - #8540 (via #8575) - deadlock with long partition constraint names Version bump to 13.3.0 was already done in e8a841d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #8466 to release-13.2.
DESCRIPTION: Add grantor role dependencies to fix node addition with interdependent roles
Modified
ExpandRolesToGroupsindependency.cto track grantor roles as dependencies alongside role memberships during node activation. This ensures grantors are propagated before roles that reference them inGRANT ... GRANTED BYstatements.Added regression test covering the interdependent role scenario.
Fixes #8425
Verification (local)
check-multi): 188/188 ✅