This is an automated email from the ASF dual-hosted git repository. reshke pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit fc26347b8af07cc7c7fde598ac43cab78df51f1a Author: Brent Doil <[email protected]> AuthorDate: Wed Jan 24 17:30:26 2024 -0500 Drop __gpupgrade_tmp if exists. If a check errors out early and --continue-check-on-fatal isn't specified, subsequent pg_upgrade runs will hit a schema __gpupgrade_tmp already exists error during setup because teardown_GPDB6_data_type_checks never executed. --- src/bin/pg_upgrade/greenplum/check_gp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_upgrade/greenplum/check_gp.c b/src/bin/pg_upgrade/greenplum/check_gp.c index 0195e3c51f..b0b1f4c121 100644 --- a/src/bin/pg_upgrade/greenplum/check_gp.c +++ b/src/bin/pg_upgrade/greenplum/check_gp.c @@ -575,6 +575,8 @@ setup_GPDB6_data_type_checks(ClusterInfo *cluster) DbInfo *active_db = &cluster->dbarr.dbs[dbnum]; PGconn *conn = connectToServer(cluster, active_db->db_name); PGresult *res = executeQueryOrDie(conn, + "SET CLIENT_MIN_MESSAGES = WARNING; " + "DROP SCHEMA IF EXISTS __gpupgrade_tmp CASCADE; " "CREATE SCHEMA __gpupgrade_tmp; " "CREATE FUNCTION __gpupgrade_tmp.data_type_checks(base_query TEXT) " "RETURNS TABLE ( " @@ -636,7 +638,8 @@ setup_GPDB6_data_type_checks(ClusterInfo *cluster) " AND n.nspname !~ '^pg_toast_temp_' " " AND n.nspname NOT IN ('pg_catalog', 'information_schema'); " "END; " - "$$ LANGUAGE plpgsql;"); + "$$ LANGUAGE plpgsql; " + "RESET CLIENT_MIN_MESSAGES;"); PQclear(res); PQfinish(conn); @@ -656,7 +659,7 @@ teardown_GPDB6_data_type_checks(ClusterInfo *cluster) PGresult *res = executeQueryOrDie(conn, "SET CLIENT_MIN_MESSAGES = WARNING; " "DROP SCHEMA __gpupgrade_tmp CASCADE; " - "SET CLIENT_MIN_MESSAGES = NOTICE;"); + "RESET CLIENT_MIN_MESSAGES;"); PQclear(res); PQfinish(conn); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
