Skip to content

Commit 6368682

Browse files
committed
In pg_upgrade, test for datallowconn instead of hardcoding template0.
1 parent 4b9904a commit 6368682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ get_db_infos(migratorContext *ctx, DbInfoArr *dbinfs_arr, Cluster whichCluster)
228228
"FROM pg_catalog.pg_database d "
229229
" LEFT OUTER JOIN pg_catalog.pg_tablespace t "
230230
" ON d.dattablespace = t.oid "
231-
"WHERE d.datname != 'template0'");
231+
"WHERE d.datallowconn = true");
232232

233233
i_datname = PQfnumber(res, "datname");
234234
i_oid = PQfnumber(res, "oid");

0 commit comments

Comments
 (0)