public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: Tefft, Michael J <[email protected]>
Cc: [email protected]
Cc: Melanie Plageman <[email protected]>
Subject: Re: Capturing both IP address and hostname in the log
Date: Thu, 10 Apr 2025 12:00:32 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <BN8PR04MB550874EE58EC715656C3D3D2D0B72@BN8PR04MB5508.namprd04.prod.outlook.com>
<[email protected]>
[ moving to -hackers ]
Adrian Klaver <[email protected]> writes:
> On 4/10/25 05:22, Tefft, Michael J wrote:
>> We have set log_hostname ON and we get hostname reported – but we do not
>> get IP address. We would like to capture both.
>> Is there a way to capture both IP address and hostname in the log
>> messages? Or must we choose “one or the ootehr”?
> I see the same thing. It seems either or.
Melanie recently committed a patch (9219093ca) that purports to
generalize our log_connections logging ability:
Convert the boolean log_connections GUC into a list GUC comprised of the
connection aspects to log.
This gives users more control over the volume and kind of connection
logging.
The current log_connections options are 'receipt', 'authentication', and
'authorization'. The empty string disables all connection logging. 'all'
enables all available connection logging.
I wonder if it'd be reasonable to remove the separate log_hostname GUC
and fold it into this infrastructure, and while doing so make it
possible to log either or both of the client IP address and hostname.
(For that matter, I think there is interest in being able to capture
the server IP address too, cf 3516ea768. You might wish to log the
IP address only once, not in every log line.)
regards, tom lane
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Capturing both IP address and hostname in the log
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox