You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by sm...@apache.org on 2026/06/15 10:47:51 UTC

(cloudberry) 30/32: pg_dump: exclude gp_toolkit from being dumped when upgrading from GPDB6

This is an automated email from the ASF dual-hosted git repository.

Smyatkin-Maxim pushed a commit to branch pg-dump-rebase-REL-2
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 4abd03d7856fb204f88fcea211518c5788c3a636
Author: Kevin Yeap <ky...@vmware.com>
AuthorDate: Thu Jan 18 19:12:46 2024 -0800

    pg_dump: exclude gp_toolkit from being dumped when upgrading from GPDB6
    
    As of GPDB7, gp_toolkit is an extension. During gpinitsystem gp_toolkit
    extension is automatically created in template1. During 6 > 7 upgrade,
    we should assume that this extension will always be there. In future
    upgrades, gp_toolkit will be treated like any other extension.
---
 src/bin/pg_dump/pg_dump.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 7191aab2d4f..15915acf809 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -1001,6 +1001,13 @@ main(int argc, char **argv)
 		if (schema_include_oids.head == NULL)
 			fatal("no matching schemas were found");
 	}
+	/*
+	 * As of GPDB7 gp_toolkit is an extension. It gets installed into template1
+	 * when the cluster is initialized by gpinitsystem. For 6 > 7 upgrade we
+	 * assume it will always be present and excluded it from being dumped.
+	 */
+	if (fout->remoteVersion < GPDB7_MAJOR_PGVERSION)
+		simple_string_list_append(&schema_exclude_patterns, "gp_toolkit");
 	expand_schema_name_patterns(fout, &schema_exclude_patterns,
 								&schema_exclude_oids,
 								false);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org