aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/check.c')
-rw-r--r--src/bin/pg_upgrade/check.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c
index 120c9ae2652..3d0fb96187f 100644
--- a/src/bin/pg_upgrade/check.c
+++ b/src/bin/pg_upgrade/check.c
@@ -770,8 +770,12 @@ check_for_prepared_transactions(ClusterInfo *cluster)
"FROM pg_catalog.pg_prepared_xacts");
if (PQntuples(res) != 0)
- pg_fatal("The %s cluster contains prepared transactions\n",
- CLUSTER_NAME(cluster));
+ {
+ if (cluster == &old_cluster)
+ pg_fatal("The source cluster contains prepared transactions\n");
+ else
+ pg_fatal("The target cluster contains prepared transactions\n");
+ }
PQclear(res);
@@ -1082,8 +1086,12 @@ check_for_pg_role_prefix(ClusterInfo *cluster)
"WHERE rolname ~ '^pg_'");
if (PQntuples(res) != 0)
- pg_fatal("The %s cluster contains roles starting with 'pg_'\n",
- CLUSTER_NAME(cluster));
+ {
+ if (cluster == &old_cluster)
+ pg_fatal("The source cluster contains roles starting with 'pg_'\n");
+ else
+ pg_fatal("The target cluster contains roles starting with 'pg_'\n");
+ }
PQclear(res);