diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-05 19:53:37 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-05 19:53:37 +0000 |
commit | 266a8975da911393e4c88a6906d621a92c34556a (patch) | |
tree | 23ddd91acb624b62d84d7b3e40956c86dbe628dc | |
parent | fbacd7838c91cb016ccd833e7d8f7e0f927a0c0c (diff) | |
download | postgresql-266a8975da911393e4c88a6906d621a92c34556a.tar.gz postgresql-266a8975da911393e4c88a6906d621a92c34556a.zip |
Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.
-rw-r--r-- | src/backend/utils/init/postinit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 286e7d32f19..8fbc0ac2247 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.139.4.2 2005/03/18 16:16:20 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.139.4.3 2005/05/05 19:53:37 tgl Exp $ * * *------------------------------------------------------------------------- @@ -122,9 +122,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) ereport(FATAL, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("database \"%s\" is not currently accepting connections", |