Re: Log connection establishment timings - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Log connection establishment timings
Date
Msg-id CAAKRu_Y7MjP6HGku90a+t2uD3Vzp3Z4+EnYMnQ3kKQTOPURiUg@mail.gmail.com
Whole thread Raw
In response to Re: Log connection establishment timings  (Andres Freund <andres@anarazel.de>)
Responses Re: Log connection establishment timings
Re: Log connection establishment timings
Re: Log connection establishment timings
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible
Next
From: Robert Haas
Date:
Subject: Re: what's going on with lapwing?