From: Tom Lane Date: Thu, 5 May 2005 19:54:13 +0000 (+0000) Subject: Make standalone backends ignore pg_database.datallowconn, so that there X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=460ba7327441cad9a7cb8d8a10cd3aed5ea2e7f0;p=users%2Fbernd%2Fpostgres.git Make standalone backends ignore pg_database.datallowconn, so that there is a way to recover from disabling connections to all databases at once. --- diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 44b9fe6956..40ca16430f 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -113,9 +113,11 @@ ReverifyMyDatabase(const char *name) /* * Also check that the database is currently allowing connections. + * (We do not enforce this in standalone mode, however, so that there is + * a way to recover from "UPDATE pg_database SET datallowconn = false;") */ dbform = (Form_pg_database) GETSTRUCT(tup); - if (!dbform->datallowconn) + if (IsUnderPostmaster && !dbform->datallowconn) elog(FATAL, "Database \"%s\" is not currently accepting connections", name);