Re: client_connection_check_interval default value - Mailing list pgsql-hackers

From Ants Aasma
Subject Re: client_connection_check_interval default value
Date
Msg-id CANwKhkN7DAY832b6Vefb3guzi2CCyF89HT1_Jei8PUP2rop0MA@mail.gmail.com
Whole thread Raw
In response to Re: client_connection_check_interval default value  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: client_connection_check_interval default value
List pgsql-hackers
On Wed, 18 Feb 2026 at 10:03, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> On Wed, 2026-02-18 at 14:30 +0900, Fujii Masao wrote:
> > On Fri, Feb 6, 2026 at 9:01 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > > > The issue is that backends blocked in ProcSleep() are woken up every
> > > > client_connection_check_interval and may emit a "still waiting" message
> > > > each time if log_lock_waits is enabled. To mitigate this, just one idea is
> > > > to add a flag to track whether the "still waiting" message has already been
> > > > emitted during a call to ProcSleep(), and suppress further messages
> > > > once it has been logged.
> > >
> > > Independently of what's the default, it seems like it'd be valuable to
> > > make that interaction better.  I think it is reasonable to keep on
> > > emitting "still waiting" every so often, but we could probably
> > > rate-limit that to a lot less than every 2 seconds.
> >
> > Attached is a patch that rate-limits the "still waiting on lock" message
> > to at most once every 10s.
> >
> > I chose 10s instead of the suggested 2s, since 2s felt too short. But we can
> > discuss the appropriate interval and adjust it if needed. The value is
> > currently hard-coded, as making it configurable does not seem necessary.
>
> I think that 10 seconds is good.

I think 10 seconds is way too small. Having one long locker blocking a
couple hundred backends is something that happens somewhat regularly.
A 10s interval would result in tens of "still waiting" per second. It
will just make it harder to sift out what is actually going on between
all the waiters squawking "are we there yet?" in a loop.

I think something above 5 minutes would be more appropriate.

Regards,
Ants Aasma



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Use standard die() handler for SIGTERM in bgworkers
Next
From: Peter Smith
Date:
Subject: Re: DOCS - Server Applications [option] should be [option...]