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

Commitffac21e

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 parenta4c3f7d commitffac21e

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-
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.97 2001/11/02 16:30:29 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.97.2.1 2005/05/05 19:54:13 tgl Exp $
1212
*
1313
*
1414
*-------------------------------------------------------------------------
@@ -113,9 +113,11 @@ ReverifyMyDatabase(const char *name)
113113

114114
/*
115115
* Also check that the database is currently allowing connections.
116+
* (We do not enforce this in standalone mode, however, so that there is
117+
* a way to recover from "UPDATE pg_database SET datallowconn = false;")
116118
*/
117119
dbform= (Form_pg_database)GETSTRUCT(tup);
118-
if (!dbform->datallowconn)
120+
if (IsUnderPostmaster&&!dbform->datallowconn)
119121
elog(FATAL,"Database \"%s\" is not currently accepting connections",
120122
name);
121123

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp