Re: Log connection establishment timings
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.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>
Date: 2025-03-06T23:16:07Z
Lists: pgsql-hackers
Attachments
- v12-0002-Add-connection-establishment-duration-logging.patch (text/x-patch) patch v12-0002
- v12-0001-Modularize-log_connections-output.patch (text/x-patch) patch v12-0001
On Thu, Mar 6, 2025 at 2:10 PM Andres Freund <andres@anarazel.de> wrote: > > I think it'd be better to use absolute times and store them as such in > ConnectionTimes or whatever. That way we have information about when a > connection was established for some future SQL functions and for debugging > problems. Attached v12 does this (uses timestamps instead of instr_time). I've done some assorted cleanup. Most notably: I removed LOG_CONNECTION_NONE because it could lead to wrong results to have a bitmask with a flag value that is 0 (it could be set at the same time other flags are set, so you could never use it correctly). I updated the tests and moved them from the postmaster test suite to the authentication test suite. They seemed like a slightly better fit there. I changed the user facing references to ready-for-query to ready-to-use (it seemed less confusing). I changed the process creation duration in the EXEC_BACKEND case to _not_ include the overhead of copying data from shared memory and reloading GUCs and the other setup done to get the backend in the right state. Jacob at some point had asked about this, and I didn't have a satisfactory answer. I'm not really sure what would be more useful to end users. - Melanie
Commits
-
Replace deprecated log_connections values in docs and tests
- cb1456423d39 18.0 landed