diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-05 19:54:13 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-05 19:54:13 +0000 |
commit | ffac21ec13c34c2d531071a1f09e3f4cc9250e21 (patch) | |
tree | f5967d2cc66a58d2059f5847bd50fc82c4ed7c25 | |
parent | a4c3f7dd192f23d8185bbc4dfb35b9bbd651c9b2 (diff) | |
download | postgresql-ffac21ec13c34c2d531071a1f09e3f4cc9250e21.tar.gz postgresql-ffac21ec13c34c2d531071a1f09e3f4cc9250e21.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 3a48b133bfe..e4d19672705 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.97 2001/11/02 16:30:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.97.2.1 2005/05/05 19:54:13 tgl Exp $ * * *------------------------------------------------------------------------- @@ -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); |