Re: Logging which local address was connected to in log_line_prefix

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, david(at)pgmasters(dot)net
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Logging which local address was connected to in log_line_prefix
Date: 2024-11-18 15:07:33
Message-ID: ee3a0d8b-d24c-4f4c-b644-ff25a4004c13@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Greg

On 11.07.24 18:09, Greg Sabino Mullane wrote:
> Thanks for the review. Please find attached a new version with proper
> tabs and indenting.
>
> Cheers,
> Greg
>

I'm testing this new log prefix and I'm wondering whether the following
behaviour is expected. The value of '%L' is different in the following
cases:

postgres=# SHOW log_line_prefix;
 log_line_prefix
-----------------
 %m [%p] -> %L
(1 row)

--

postgres=# SELECT 1/0;

2024-11-18 16:00:42.720 CET [3135117] -> 192.168.178.27 ERROR:  division
by zero
2024-11-18 16:00:42.720 CET [3135117] -> 192.168.178.27 STATEMENT: 
SELECT 1/0;

--

postgres=# SELECT pg_reload_conf();

2024-11-18 16:01:23.273 CET [3114980] -> [local] LOG:  received SIGHUP,
reloading configuration files

--

postgres=# CHECKPOINT;

2024-11-18 16:01:46.758 CET [3114981] -> [local] LOG:  checkpoint
starting: immediate force wait
2024-11-18 16:01:46.769 CET [3114981] -> [local] LOG:  checkpoint
complete: wrote 0 buffers (0.0%), wrote 0 SLRU buffers; 0 WAL file(s)
added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.012
s; sync files=0, longest=0.000 s, average=0.000 s; distance=0 kB,
estimate=25924 kB; lsn=0/26166430, redo lsn=0/261663D8

Is it supposed to be like this?

Thanks for the patch!

--
Jim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Emanuele Musella 2024-11-18 15:59:53 Re: Parametrization minimum password lenght
Previous Message Robert Haas 2024-11-18 15:06:36 Re: FW: Building Postgres 17.0 with meson