Repository navigation
Evaluate replayed object definitions in the owner context - #8956
Open
ibrahim halatci (ihalatci) wants to merge 4 commits into
Open
ibrahim halatci (ihalatci) wants to merge 4 commits into
ibrahim halatci (ihalatci) wants to merge 4 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## ihalatci-main-trusted-search-path #8956 +/- ##
===================================================================
Coverage 88.81% 88.82%
===================================================================
Files 290 291 +1
Lines 65512 65667 +155
Branches 8261 8278 +17
===================================================================
+ Hits 58185 58326 +141
- Misses 4941 4949 +8
- Partials 2386 2392 +6 🚀 New features to boost your workflow:
|
Port the final behavior from #8946 to main, protecting dependency creation, node activation, partition attachment, and object repair. Run expression-bearing replay as the object owner under restricted execution, restoring identity and settings on success or error. Adapt main's bundled partition metadata API while preserving existing repair checks and lower security layers. Include current-only replay regressions and explicit settings restoration and superuser-control assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Drop the replay test schema on workers as well so repeated execution does not retain it. Update the echoed setting in expected output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The regression removes the coordinator from metadata. Set its host explicitly on each run so repeated execution can register the local foreign table without depending on prior cluster state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ibrahim halatci (ihalatci)
force-pushed
the
ihalatci-main-replay-owner-context
branch
from
October 26, 2026 10:54
72d44d5 to
c8690d4
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ibrahim halatci (ihalatci)
enabled stacked auto-merge (squash)
October 26, 2026 11:48
Muhammad Usama (codeforall)
approved these changes
Oct 26, 2026
Muhammad Usama (codeforall)
left a comment
Contributor
There was a problem hiding this comment.
LGTM
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.
DESCRIPTION: Evaluates replayed object definitions in the owner's context
Layer 3 of 3, based on #8955. Ports the final merged behavior from #8946 to main, without changing the two prerequisite layers.
Expression-bearing metadata replay runs as the object owner under
SECURITY_RESTRICTED_OPERATION, with identity, security context, settings, and single-statement markers restored on success or error. This covers dependency replay, node activation, partition attachment, worker name collisions, and the current object-repair path. The expression-free allowlist andwarn(default),require, andoffcontrols match the final source; the new GUCs precedemetadata_sync_*alphabetically.Main-specific adaptation preserves the existing bundled partition metadata API, activation filtering/cache flushing, and repair existence/force-recreate checks. The security module and header are identical to the final source. Regression coverage includes real tenant-owned domain repair, missing-domain activation, guarded domain-array partition bounds, cached expressions, privilege denial, single-use markers, and settings restoration on success/error. The role-change assertion uses the actual current role and checks the specific privilege error rather than catching every error.
No extension version, ACL, migration SQL, changelog, or configuration-file changes. Current-only coverage is in
multi_1_create_citus_schedule, not the N-1-compatible schedule.Validation on an isolated WSL PostgreSQL 18.6 runtime:
./configure --with-pgconfig="$root/pg/bin/pg_config"— passed.make -s -j8andmake -s install-all— passed.make -C src/test/regress check-minimal EXTRA_TESTS="multi_metadata_sync_domain metadata_replay_security distributed_domain propagate_foreign_servers view_propagation citus_internal_distribute_object"— 12/12 passed.make -C src/test/regress check-multi-1— 210/210 passed.make -C src/test/regress check-multi-1-create-citus— 43/43 passed.make -C src/test/regress check-multi-mx— 69/69 passed.git diff --check— passed.The initial WSL copy required restoring the two safeclib symlinks materialized as plain files by Windows and a clean rebuild. An initial ad hoc focused order put the sequence-sensitive domain test after node-mutating tests; running it first resolves that setup interference. Final focused and full schedules have no waived failures. Other PostgreSQL majors and hosted CI have not been run locally.