Repository navigation
Feature: Manage storage server owners and comments - #2312
Merged
leborchuk merged 1 commit intoNov 19, 2026
Merged
Conversation
Contributor
Author
|
Hi @tuhaihe, this PR implements #1299. Could you please approve the CI workflows and suggest a reviewer for the storage-server ownership and comment changes? |
tuhaihe
requested review from
Alena0704,
andr-sokolov,
gfphoenix78 and
yjhjstz
November 12, 2026 14:22
There was a problem hiding this comment.
Hi, @allenvox welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!
my-ship-it
approved these changes
Nov 13, 2026
Contributor
|
LGTM, thanks! |
my-ship-it
reviewed
Nov 13, 2026
2 of 8 tasks
leborchuk
enabled auto-merge (squash)
November 17, 2026 09:36
Alena0704
force-pushed
the
feature/storage-server-owner-comments
branch
from
November 18, 2026 09:40
d46de8c to
b3e436c
Compare
Add ALTER STORAGE SERVER ... OWNER TO and COMMENT ON STORAGE SERVER. Reuse generic owner updates while requiring SET ROLE access for ordinary roles and preserving the mdb_admin exception. Track owner dependencies, support REASSIGN OWNED with storage user mappings, and clean up shared comments when dropping a server. Add psql completion, SQL reference documentation and regression coverage for permissions, mappings, rollback and segment metadata. See: Issue#1299
tuhaihe
force-pushed
the
feature/storage-server-owner-comments
branch
from
November 19, 2026 02:25
b3e436c to
cfef937
Compare
leborchuk
pushed a commit
to leborchuk/cloudberry
that referenced
this pull request
Nov 19, 2026
Add ALTER STORAGE SERVER ... OWNER TO and COMMENT ON STORAGE SERVER. Reuse generic owner updates while requiring SET ROLE access for ordinary roles and preserving the mdb_admin exception. Track owner dependencies, support REASSIGN OWNED with storage user mappings, and clean up shared comments when dropping a server. Add psql completion, SQL reference documentation and regression coverage for permissions, mappings, rollback and segment metadata. See: Issue#1299
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.
Fixes #1299
What does this PR do?
Storage servers currently reject ownership changes and comments. Add
ALTER STORAGE SERVER ... OWNER TOandCOMMENT ON STORAGE SERVERso administrators can transfer ownership and document storage configurations used by directory tables.Reuse the generic ownership machinery to update ACLs, owner dependencies and hooks. Ordinary roles must own the server and be able to
SET ROLEto its new owner. Preserve the existingmdb_adminexception and its restrictions. Register owner dependencies when creating storage servers and supportREASSIGN OWNED. Storage user mappings retain their mapped user, matching foreign user mappings. Ownership changes preserve server options.Store comments in
pg_shdescriptionbecause storage servers are shared across databases, and remove comments when a server is dropped. Both new commands dispatch metadata changes to segments. Add psql completion, SQL reference documentation and regression coverage, and update the existing directory-table test to accept ownership changes.Type of Change
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelBuilt and installed with assertions and debug enabled on Rocky Linux 9 / GCC 11.5, using a coordinator and three primary segments. ORCA, PAX, gpcloud and external FTS were disabled, with mirrors and standby omitted from the test cluster.
All seven selected regressions passed with clean fixtures and the standard tablespace setup.
make -C src/test/regress tablespace-setup make -C src/test/regress installcheck-tests \ TESTS='test_setup mdb_admin storage_server foreign_data dependency object_address directory_table'Additional checks covered cross-database visibility, quoted identifiers and Unicode comments, owner dependencies, transaction rollback, concurrent owner/comment updates, permission checks after waiting for an ownership transfer, psql completion and storage servers created by the unmodified main backend. The new reference page passed DocBook 4.5 validation.
After rebasing onto current main
97c79c51a926f94eedae7486a6488ddae2e451e1, rebuilt and installed the branch and reran all seven selected regressions successfully. The full-suite comparison below was collected before this rebase.A full-suite baseline run used unmodified
mainat487864393a8d7fc1cd4f1749ce7458aac2fc3888, with the same build flags and cluster topology.45 failing test names overlapped. The branch failure absent on main was
test_setupfrom stale shared fixtures, cleared before the successful targeted rerun. Both runs hit the samerelation.c:71assertion and recovery cascades, plus expectations requiring ORCA or mirrors. Main had nine additional recovery-related connection failures and an interrupted anti-wraparound fault wait. The mirrored FTS failover wait was interrupted in both runs because the cluster has no mirrors. Main'sdirectory_tabledifference was a truncated source path in a syntax-error diagnostic; the final targeted run on this branch passed that test.Checklist