Re: Log connection establishment timings
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Fujii Masao <masao.fujii@oss.nttdata.com>, Guillaume Lelarge <guillaume@lelarge.info>, Pg Hackers <pgsql-hackers@postgresql.org>, Daniel Gustafsson <daniel@yesql.se>, andrey.chudnovskiy@microsoft.com, Jelte Fennema-Nio <postgres@jeltef.nl>, Jacob Champion <jacob.champion@enterprisedb.com>
Date: 2025-03-10T06:24:29Z
Lists: pgsql-hackers
Hi, On Fri, Mar 07, 2025 at 03:29:14PM -0500, Melanie Plageman wrote: > On Fri, Mar 7, 2025 at 6:16 AM Bertrand Drouvot > <bertranddrouvot.pg@gmail.com> wrote: > > But at the end, what we're "really" interested in this thread, given its $SUBJECT, > > is to actually log the timings. > > I'm not sure that people would enable this option much if > it was called ready_for_use, since just logging when we are ready for > query is likely not that valuable. Agreed. > So, I would call "received" and "authorized" stages and the > authentication ID message not a stage. I think I should not call these > "log_connections stages" in the docs and comments and instead call > them "log_connections options". Makes sense to me. > And I am wondering if the "timings" option should be called "timings" > or "durations"? I want to convey that it is about printing connection > setup durations and not about whether or not we measure timings. But > log_connections=durations sounds more like it logs the total duration > of the connection setup and not component parts... I agree that both could be misinterpreted (even if the documentation should clear any doubts). Anyway, it's probably better to put more details in the option name then, something like "setup_timings" maybe? > I actually think even if we change the option name, it could be > valuable to have the message begin with "connection ready for use"; > otherwise, it's unclear when we are printing the message. Good point, I do agree. > Logging > messages are very tied to what was happening when they were emitted. > Usually they include some context on when they were emitted. Thus, I > think it makes sense to somehow contextualize the message in this way > in the text. It does make the message rather long, though... > Just use "connection ready" maybe? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
Replace deprecated log_connections values in docs and tests
- cb1456423d39 18.0 landed