Thread
-
[PATCH v8 1/6] Use real file names rather than pg_hba.conf/pg_ident.conf in messages.
Julien Rouhaud <julien.rouhaud@free.fr> — 2022-06-03T07:56:23Z
--- src/backend/postmaster/postmaster.c | 7 ++++--- src/backend/utils/init/postinit.c | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index e541b16bdb..8bcfedef64 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1419,7 +1419,8 @@ PostmasterMain(int argc, char *argv[]) * since there is no way to connect to the database in this case. */ ereport(FATAL, - (errmsg("could not load pg_hba.conf"))); + /* translator: %s is a configuration file */ + (errmsg("could not load %s", HbaFileName))); } if (!load_ident()) { @@ -2769,11 +2770,11 @@ SIGHUP_handler(SIGNAL_ARGS) if (!load_hba()) ereport(LOG, /* translator: %s is a configuration file */ - (errmsg("%s was not reloaded", "pg_hba.conf"))); + (errmsg("%s was not reloaded", HbaFileName))); if (!load_ident()) ereport(LOG, - (errmsg("%s was not reloaded", "pg_ident.conf"))); + (errmsg("%s was not reloaded", IdentFileName))); #ifdef USE_SSL /* Reload SSL configuration as well */ diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 29f70accb2..8801a5f5f5 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -217,7 +217,8 @@ PerformAuthentication(Port *port) * since there is no way to connect to the database in this case. */ ereport(FATAL, - (errmsg("could not load pg_hba.conf"))); + /* translator: %s is a configuration file */ + (errmsg("could not load %s", HbaFileName))); } if (!load_ident()) -- 2.37.0 --lqayot32rzm7n4sf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="v8-0002-Add-file-name-file-line-context-for-incorrect-reg.patch"