Re: Flush some statistics within running transactions - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Flush some statistics within running transactions
Date
Msg-id aXmuKZz8sXPLCumT@paquier.xyz
Whole thread Raw
In response to Re: Flush some statistics within running transactions  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Flush some statistics within running transactions
List pgsql-hackers
On Mon, Jan 26, 2026 at 06:59:28AM +0000, Bertrand Drouvot wrote:
> The attached, to apply on top of 0001, fix the issue. However it handles only the
> WaitLatch in ProcSleep() case and I start to have concern about the others WaitLatch()
> that would/could be "woken up" every 1s.

Hmm, I indeed suspect that is may not be the only one..  This is much bigger.

> Using disable_timeout() and enable_timeout_after() in WaitEventSetWait() does not
> look like a great answer to this concern, so I wonder if we should use a larger
> flush frequency instead (as proposed up-thread), thoughts?

Only a larger frequency is not the correct answer here.  It would just
reduce the frequency of the extra lock wait messages for one: these
should never appear more than necessary.  And how about for example
extension code?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "Xiangyu Liang"
Date:
Subject: Fix grammar in comment describing LP_DEAD hint safety
Next
From: Michael Paquier
Date:
Subject: Re: Fix grammar in comment describing LP_DEAD hint safety