Fix REASSIGN OWNED with keyword target roles - #8746
Merged
ibrahim halatci (ihalatci) merged 1 commit intoAug 10, 2026
Merged
ibrahim halatci (ihalatci) merged 1 commit into
ibrahim halatci (ihalatci) merged 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## pg19-support #8746 +/- ##
================================================
- Coverage 88.80% 88.74% -0.06%
================================================
Files 288 289 +1
Lines 64416 65002 +586
Branches 8100 8191 +91
================================================
+ Hits 57206 57689 +483
- Misses 4873 4951 +78
- Partials 2337 2362 +25 🚀 New features to boost your workflow:
|
GetNewRoleAddress() resolved the target role with get_role_oid(stmt->newrole->rolename, false). For keyword role specifications such as CURRENT_USER, CURRENT_ROLE and SESSION_USER the parser leaves RoleSpec->rolename NULL, so the backend segfaulted with a NULL dereference inside the syscache hash computation (namehashfast -> CatalogCacheComputeHashValue -> get_role_oid). Resolve the role with get_rolespec_oid() instead, which handles every RoleSpec variant and has been available since PostgreSQL 10, so no version gate is needed. This is not PostgreSQL 19 specific and reproduces on every supported major version. It surfaced now because PG19's graph_table_rls vanilla test is the first upstream test to run REASSIGN OWNED BY ... TO current_user with the Citus extension loaded. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ibrahim halatci (ihalatci)
force-pushed
the
ihalatci-fix-reassign-owned-keyword-role
branch
from
August 10, 2026 04:14
a202355 to
7c7c207
Compare
Onur Tirtir (onurctirtir)
approved these changes
Aug 10, 2026
ibrahim halatci (ihalatci)
merged commit Aug 10, 2026
a38991f
into
pg19-support
183 of 195 checks passed
ibrahim halatci (ihalatci)
deleted the
ihalatci-fix-reassign-owned-keyword-role
branch
August 10, 2026 08:18
24 of 29 tasks
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.
Summary
REASSIGN OWNED BY ... TO CURRENT_USERand other keyword target roles by resolving the completeRoleSpecwithget_rolespec_oidRoleSpec->rolenametoget_role_oid, which caused the syscache hash path to segfaultValidation
Scope
This is a general, PostgreSQL-version-independent fix. It is independent of the property-graph compatibility change and can be reviewed and backported on its own.
Closes #8745