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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy