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

Commit52eaa97

Browse files
michaelpqpull[bot]
authored andcommitted
Use hba_file/ident_file GUCs rather than pg_hba.conf/pg_ident.conf in logs
This is particularly useful when log_min_messages is set to FATAL, so asone can know which file was not getting loaded whether hba_file orident_file are set to some non-default values. If using the defaultvalues of these GUC parameters, the same reports are generated.This commit changes the load (startup) and reload (SIGHUP) messages.Author: Julien RouhaudDiscussion:https://postgr.es/m/20220223045959.35ipdsvbxcstrhya@jrouhaud
1 parent9d9b789 commit52eaa97

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,8 @@ PostmasterMain(int argc, char *argv[])
14191419
* since there is no way to connect to the database in this case.
14201420
*/
14211421
ereport(FATAL,
1422-
(errmsg("could not load pg_hba.conf")));
1422+
/* translator: %s is a configuration file */
1423+
(errmsg("could not load %s",HbaFileName)));
14231424
}
14241425
if (!load_ident())
14251426
{
@@ -2769,11 +2770,11 @@ SIGHUP_handler(SIGNAL_ARGS)
27692770
if (!load_hba())
27702771
ereport(LOG,
27712772
/* translator: %s is a configuration file */
2772-
(errmsg("%s was not reloaded","pg_hba.conf")));
2773+
(errmsg("%s was not reloaded",HbaFileName)));
27732774

27742775
if (!load_ident())
27752776
ereport(LOG,
2776-
(errmsg("%s was not reloaded","pg_ident.conf")));
2777+
(errmsg("%s was not reloaded",IdentFileName)));
27772778

27782779
#ifdefUSE_SSL
27792780
/* Reload SSL configuration as well */

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ PerformAuthentication(Port *port)
217217
* since there is no way to connect to the database in this case.
218218
*/
219219
ereport(FATAL,
220-
(errmsg("could not load pg_hba.conf")));
220+
/* translator: %s is a configuration file */
221+
(errmsg("could not load %s",HbaFileName)));
221222
}
222223

223224
if (!load_ident())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp