diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-05 19:54:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-05-05 19:54:01 +0000 |
commit | 5d0d60efe6670508e4bd85877dad994e3e56c83e (patch) | |
tree | f01f8ed6c4339dd58f303981abaa17ff42d5c049 /src | |
parent | ecbc6dd3e97059bd5dee84939d5ea673754b4d38 (diff) |
Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.
Diffstat (limited to 'src')
-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 10921a64357..a706d8c7c00 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.117.2.2 2003/02/19 14:14:58 ishii Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.117.2.3 2005/05/05 19:54:01 tgl Exp $ * * *------------------------------------------------------------------------- @@ -117,9 +117,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); |