Commit 63686827 authored by Bruce Momjian's avatar Bruce Momjian

In pg_upgrade, test for datallowconn instead of hardcoding template0.

parent 4b9904a0
...@@ -228,7 +228,7 @@ get_db_infos(migratorContext *ctx, DbInfoArr *dbinfs_arr, Cluster whichCluster) ...@@ -228,7 +228,7 @@ get_db_infos(migratorContext *ctx, DbInfoArr *dbinfs_arr, Cluster whichCluster)
"FROM pg_catalog.pg_database d " "FROM pg_catalog.pg_database d "
" LEFT OUTER JOIN pg_catalog.pg_tablespace t " " LEFT OUTER JOIN pg_catalog.pg_tablespace t "
" ON d.dattablespace = t.oid " " ON d.dattablespace = t.oid "
"WHERE d.datname != 'template0'"); "WHERE d.datallowconn = true");
i_datname = PQfnumber(res, "datname"); i_datname = PQfnumber(res, "datname");
i_oid = PQfnumber(res, "oid"); i_oid = PQfnumber(res, "oid");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment