Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2e729f

Browse files
committed
Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.
1 parent64c8635 commitc2e729f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/utils/init/postinit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
*
1414
*-------------------------------------------------------------------------
@@ -165,9 +165,11 @@ ReverifyMyDatabase(const char *name)
165165

166166
/*
167167
* 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;")
168170
*/
169171
dbform= (Form_pg_database)GETSTRUCT(tup);
170-
if (!dbform->datallowconn)
172+
if (IsUnderPostmaster&&!dbform->datallowconn)
171173
ereport(FATAL,
172174
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
173175
errmsg("database \"%s\" is not currently accepting connections",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp