From: Magnus Hagander Date: Wed, 4 Mar 2009 08:43:15 +0000 (+0000) Subject: Log a warning instead of shutting down the system if we can't load X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=825db7e146303b9a7d26d07ce160790ba6376dc4;p=users%2Fsimon%2Fpostgres.git 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 --- diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index a134b4565b..c721e003fd 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -1306,12 +1306,19 @@ load_hba(void) List *new_parsed_lines = NIL; file = AllocateFile(HbaFileName, "r"); - /* Failure is fatal since with no HBA entries we can do nothing... */ if (file == NULL) - ereport(FATAL, + { + ereport(WARNING, (errcode_for_file_access(), errmsg("could not open configuration file \"%s\": %m", HbaFileName))); + /* + * Caller will take care of making this a FATAL error in case this is + * the initial startup. If it happens on reload, we just keep the + * old version around. + */ + return false; + } tokenize_file(HbaFileName, file, &hba_lines, &hba_line_nums); FreeFile(file);