pg_dump/pg_dumpall do not dump storage servers or storage user mappings
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start in src/bin/pg_dump/ and pg_dumpall, where the dump of roles and tablespaces is emitted, and check how --globals-only picks its objects. The catalogs to read are gp_storage_server and gp_storage_user_mapping. Done means the dump emits CREATE STORAGE SERVER and CREATE STORAGE USER MAPPING before per-database content, with the credential options handled like user-mapping options. Owner and comment output depends on #2312 landing first.
由索引模型根据 Issue 内容生成。
描述
Apache Cloudberry version
main (verified on a build of 3.0.0-devel)
What happened
Neither pg_dump nor pg_dumpall emits storage servers (gp_storage_server) or storage user mappings (gp_storage_user_mapping). There is no reference to either catalog anywhere under src/bin/pg_dump/.
As a result, a dump/restore (or any upgrade path that relies on pg_dumpall) silently loses every storage server definition, its options, and all storage user mappings. Directory tables that refer to those servers cannot work after the restore until the servers are recreated by hand.
This gap will also cover the properties added by #2312 (ALTER STORAGE SERVER ... OWNER TO and COMMENT ON STORAGE SERVER, for #1299). Neither a non-default owner nor a comment would survive a dump either.
What you think should happen instead
Because storage servers and their user mappings are cluster-wide (shared catalogs), pg_dumpall should emit them, as it does for roles and tablespaces:
CREATE STORAGE SERVER ... OPTIONS (...)ALTER STORAGE SERVER ... OWNER TO ...(once #2312 lands)COMMENT ON STORAGE SERVER ... IS ...(once #2312 lands)CREATE STORAGE USER MAPPING FOR ... STORAGE SERVER ... OPTIONS (...)
They should be emitted before per-database content, so that directory tables restore against existing servers. Storage user mapping options may contain credentials, so they deserve the same consideration as user-mapping options in pg_dump. They should probably also be included in --globals-only.
How to reproduce
CREATE ROLE sm_owner;
CREATE STORAGE SERVER s1 OPTIONS (endpoint 'x');
CREATE STORAGE USER MAPPING FOR sm_owner STORAGE SERVER s1 OPTIONS (accesskey 'k');
pg_dumpall --globals-only | grep -ci 'storage server' # 0
pg_dumpall | grep -i 'storage server' # nothing
Operating System
Rocky Linux 8 (also applies to any platform; the code is missing)
Anything else
Found while reviewing #2312.
- 主要语言
- C
- 星标
- 1.4k
- 派生
- 273
- 平均合并
- 4 天 6 小时
- 30 天内合并 PR
- 105
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/cloudberry 的其他 Issue
-
isolation2 lockmodes fails on cassert builds: extra AccessShareLock on partition root可能已有人在做 @tuhaihe 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/cloudberry#2356 ·
维护者通常 2 天内回复
-
psql tab completion broken for storage servers, tags, profiles and resource groups (pre-PG15 query format)可能已有人在做 @allenvox 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
apache/cloudberry#2316 ·
维护者通常 2 天内回复
-
[Bug] Expand fails to recognize user-defined tablespaces可能已有人在做 @nix-oss 于 92 天前认领。 未关闭type: Bug
难度 2/5 1-3 小时 新手友好度 76/100
apache/cloudberry#1885 · 2 个 reaction ·
维护者通常 2 天内回复
-
gpexpand first stage fails: 'SyncPackages' object has no attribute 'ret' (extension sync never runs; regression)可能已有人在做 @talmacschen-arch 于 153 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
apache/cloudberry#1825 ·
维护者通常 2 天内回复
-
type: Bug
难度 4/5 3-5 天 新手友好度 53/100
apache/cloudberry#2350 · 1 个 reaction ·
维护者通常 2 天内回复
查看 apache/cloudberry 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 66/100
wasm-micro-runtime/wasm-micro-runtime#5217 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Enhancement
难度 2/5 1-3 小时 新手友好度 68/100
HandBrake/HandBrake#8278 · 1 条评论 ·
维护者通常 1 天内回复