This is an automated email from the ASF dual-hosted git repository. tuhaihe pushed a commit to branch REL_2_STABLE in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit c7c6a98126a7e9c689445e7ce2de33f569413c19 Author: Kevin Yeap <[email protected]> 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 96026aa8ab4..0d51ed45015 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: [email protected] For additional commands, e-mail: [email protected]
