This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 49804534f04 Fix errors for dump table and schema on pg_dump
49804534f04 is described below
commit 49804534f042ec02bd5d535cbfdb4c8333216c97
Author: Jinbao Chen <[email protected]>
AuthorDate: Tue Jan 13 23:58:59 2026 +0800
Fix errors for dump table and schema on pg_dump
---
src/bin/Makefile | 1 +
src/bin/pg_dump/pg_dump.c | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/bin/Makefile b/src/bin/Makefile
index e8828abdcdc..85b61526cab 100644
--- a/src/bin/Makefile
+++ b/src/bin/Makefile
@@ -48,6 +48,7 @@ SUBDIRS = \
pg_config \
pg_controldata \
pg_ctl \
+ pg_dump \
pg_resetwal \
pg_rewind \
psql \
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index fc69f6c9a0d..c612dbb598f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -5743,7 +5743,9 @@ binary_upgrade_set_pg_class_oids_impl(Archive *fout,
/* GPDB_14_MERGE_FIXME: we must put this sql here for variables which
will befetched later by other sqls */
appendPQExpBuffer(upgrade_query,
- "SELECT c.reltoastrelid, c.relkind,
t.relnamespace AS toast_relnamespace, t.relname AS toast_relname, "
+ "SELECT c.reltoastrelid, c.relkind,
c.relfilenode, t.relnamespace AS toast_relnamespace, t.relname AS
toast_relname, "
+ " ti.relfilenode AS
toast_index_relfilenode,"
+ " t.relfilenode AS
toast_relfilenode,"
" c.relnamespace, c.relname, "
" i.indexrelid, ti.relname AS
tidx_relname, "
" bi.oid AS bmoid, bidx.oid AS
bmidxoid, "
@@ -7445,7 +7447,7 @@ getTables(Archive *fout, int *numTables)
*/
appendPQExpBufferStr(query,
- "SELECT c.tableoid, c.oid,
c.relname, "
+ "SELECT c.tableoid, c.oid,
c.relname, '' AS relstorage,"
"c.relnamespace, c.relkind,
c.reltype, "
"c.relowner, "
"c.relchecks, "
@@ -7463,6 +7465,10 @@ getTables(Archive *fout, int *numTables)
"tc.oid AS toid, "
"tc.relpages AS toastpages, "
"tc.reloptions AS
toast_reloptions, "
+ "0 as parrelid, "
+ "0 as parlevel, "
+ "c.relisivm AS isivm, "
+ "c.relisdynamic AS isdynamic, "
"d.refobjid AS owning_tab, "
"d.refobjsubid AS owning_col, "
"tsp.spcname AS reltablespace,
");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]