From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "Tefft, Michael J" <Michael(dot)J(dot)Tefft(at)snapon(dot)com> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Capturing both IP address and hostname in the log |
Date: | 2025-04-10 16:33:39 |
Message-ID: | CAKFQuwauokoz4iDabgj_YkGixLpRWsfSu+CxDFVOA5xRbM7Uxg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Thu, Apr 10, 2025 at 5:22 AM Tefft, Michael J <Michael(dot)J(dot)Tefft(at)snapon(dot)com>
wrote:
> The documentation for log_hostname says:
>
> log_hostname (boolean)
>
> By default, connection log messages only show the IP address of the
> connecting host. Turning this parameter on causes logging of the host name
> as well. Note that depending on your host name resolution setup this might
> impose a non-negligible performance penalty. This parameter can only be set
> in the postgresql.conf file or on the server command line.
>
>
>
> https://www.postgresql.org/docs/14/runtime-config-logging.html
>
>
>
Yeah, the wording really should be more like:
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index fea683cb49..c545fee6c9 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7614,10 +7614,11 @@ local0.* /var/log/postgresql
</term>
<listitem>
<para>
- By default, connection log messages only show the IP address of the
- connecting host. Turning this parameter on causes logging of the
- host name as well. Note that depending on your host name
resolution
- setup this might impose a non-negligible performance penalty.
+ By default, for TCP/IP-originated connections, the identifier of
the host
+ making the connection is its IP address. Turning this parameter
on tells
+ the system to record the resolved host name instead. Note that
depending
+ on your host name resolution setup this might impose a
non-negligible
+ performance penalty.
This parameter can only be set in the
<filename>postgresql.conf</filename>
file or on the server command line.
</para>
Both the connection logging routine and log_line_prefix %h / %r simply
report the "identifier of the host making the connection".
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-04-10 16:35:23 | Re: Capturing both IP address and hostname in the log |
Previous Message | Daniel Westermann (DWE) | 2025-04-10 16:26:54 | Re: Meson and Numa: C header not found |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-04-10 16:35:23 | Re: Capturing both IP address and hostname in the log |
Previous Message | Tom Lane | 2025-04-10 16:19:41 | Re: Add missing PGDLLIMPORT markings |