From 88cdfe565cc3bf7bfd6d7d339537521229a36469 Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Thu, 18 Jun 2026 07:03:34 +0100 Subject: [PATCH] Use HostsFileName everywhere There were 3 places which used a harcoded "pg_hosts.conf" instead of the proper GUC. --- src/backend/libpq/be-secure-openssl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 7890e6c2de2..4ce2a92b964 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -228,7 +228,7 @@ be_tls_init(bool isServerStart) { ereport(isServerStart ? FATAL : LOG, errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("could not load \"%s\": %s", "pg_hosts.conf", + errmsg("could not load \"%s\": %s", HostsFileName, err_msg ? err_msg : "unknown error")); goto error; } @@ -365,7 +365,7 @@ be_tls_init(bool isServerStart) errmsg("no SSL configurations loaded"), /*- translator: The two %s contain filenames */ errhint("If ssl_sni is enabled then add configuration to \"%s\", else \"%s\"", - "pg_hosts.conf", "postgresql.conf")); + HostsFileName, "postgresql.conf")); goto error; } @@ -644,7 +644,7 @@ init_host_context(HostsLine *host, bool isServerStart) "Set \"%s\" to \"off\" to make use of the hook " "that is currently installed, or remove the hook " "and use per-host passphrase commands in \"%s\".", - "ssl_sni", "pg_hosts.conf")); + "ssl_sni", HostsFileName)); init_warned = true; } -- 2.43.0