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

Commita2e9de7

Browse files
committed
Log a warning instead of shutting down the system if we can't load
pg_hba.conf on reload (for example due to a permission error).Selena Deckelmann
1 parentfd75329 commita2e9de7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎src/backend/libpq/hba.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.180 2009/01/07 13:09:21 mha Exp $
13+
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.181 2009/03/04 08:43:15 mha Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -1306,12 +1306,19 @@ load_hba(void)
13061306
List*new_parsed_lines=NIL;
13071307

13081308
file=AllocateFile(HbaFileName,"r");
1309-
/* Failure is fatal since with no HBA entries we can do nothing... */
13101309
if (file==NULL)
1311-
ereport(FATAL,
1310+
{
1311+
ereport(WARNING,
13121312
(errcode_for_file_access(),
13131313
errmsg("could not open configuration file \"%s\": %m",
13141314
HbaFileName)));
1315+
/*
1316+
* Caller will take care of making this a FATAL error in case this is
1317+
* the initial startup. If it happens on reload, we just keep the
1318+
* old version around.
1319+
*/
1320+
return false;
1321+
}
13151322

13161323
tokenize_file(HbaFileName,file,&hba_lines,&hba_line_nums);
13171324
FreeFile(file);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp