From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, andrey(dot)chudnovskiy(at)microsoft(dot)com, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
Subject: | Re: Log connection establishment timings |
Date: | 2025-03-05 23:40:10 |
Message-ID: | CAAKRu_a0qhRh7FrqMHYK-=CwzG12i3FFjhikx0ETd6vnWj=n6Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 5, 2025 at 10:46 AM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> As such, I wonder if my PGC_SET idea is not worth the effort and I
> should revise the earlier patch version which specified the stages but
> allow for on, off, true, yes, 1 for backwards compatibility and not
> include disconnections (so we don't remove the log_disconnections GUC
> this release).
Okay! Attached v10 does this. It turns log_connections into a string
but supports all the common values of the current log_connections
boolean.
So, you can specify
log_connections = authorized,authenticated
log_connections = 'all'
log_connections = on
etc
And only 'all' has to be quoted when not specified as a startup option
(which is true for other enum gucs that have 'all' as an option
because ALL is a Postgres keyword).
I've left log_disconnections alone.
I still need to comprehensively manually test it myself (so there
might still be bugs) and write a bit of test coverage for the new
values. The docs can probably also use some more massaging.
But, this is the first version of the patch where I am happy with the
interface and with the code. It isn't a breaking change (since on,
off, true, false, etc still work), so I think it is still okay to
target 18.
I went back through the thread and tried to be sure I addressed all of
the outstanding review comments on previous versions (since I
resurrected some previously dead patch features), but I can't be sure
I caught it all. Please don't hesitate to call out anything I missed.
I didn't enumerate all the possibilities in postgresql.conf.sample as
Fujii-san recommended in a previous review, because I didn't see many
other enum GUCs doing that. I am open to changing that if folks feel
strongly, though.
In 0002, because we take the timings for all wal sender and client
connection backends, now the new log message emitted in 0002 is more
like a stage, so I've named that option "ready_for_query". As such, I
wonder if I should change the output message to reflect that. What do
you think?
- Melanie
Attachment | Content-Type | Size |
---|---|---|
v10-0002-Add-connection-establishment-duration-logging.patch | text/x-patch | 14.5 KB |
v10-0001-Modularize-log_connections-output.patch | text/x-patch | 17.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2025-03-05 23:54:59 | Re: Disabling vacuum truncate for autovacuum |
Previous Message | Matthias van de Meent | 2025-03-05 23:39:03 | Re: Expanding HOT updates for expression and partial indexes |