|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.145 2005/04/14 20:03:26 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.146 2005/05/05 19:53:26 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *
|
14 | 14 | *-------------------------------------------------------------------------
|
@@ -165,9 +165,11 @@ ReverifyMyDatabase(const char *name)
|
165 | 165 |
|
166 | 166 | /*
|
167 | 167 | * Also check that the database is currently allowing connections.
|
| 168 | + * (We do not enforce this in standalone mode, however, so that there is |
| 169 | + * a way to recover from "UPDATE pg_database SET datallowconn = false;") |
168 | 170 | */
|
169 | 171 | dbform= (Form_pg_database)GETSTRUCT(tup);
|
170 |
| -if (!dbform->datallowconn) |
| 172 | +if (IsUnderPostmaster&&!dbform->datallowconn) |
171 | 173 | ereport(FATAL,
|
172 | 174 | (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
173 | 175 | errmsg("database \"%s\" is not currently accepting connections",
|
|