Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler() - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()
Date
Msg-id acyUrI2kV64lfOio@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Hi,

On Wed, Apr 01, 2026 at 12:17:28PM +0900, Fujii Masao wrote:
> On Mon, Mar 30, 2026 at 1:21 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > Shouldn't we add a comment to the handler function header stating that
> > SetLatch should be called by the caller? procsignal_sigusr1_handler()
> > is currently the only caller and handles it, but this would ensure any
> > future callers are responsible for the same.
> 
> I *guess* the original comment was added because readers of the interrupt
> handling code might just wonder why SetLatch() isn't called. If so, it makes
> sense to keep that explanation in the handler functions themselves.
> 
> The existing comment seems sufficient to me. The code isn't complicated enough
> to require more comment for future use of functions in advance, and we can
> revisit it if the functions change in the future. Based on this, I'm thinking
> to commit v2 patch.

That sounds reasonable to me to proceed as v2 is doing.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: More speedups for tuple deformation
Next
From: Chao Li
Date:
Subject: Re: [oauth] Split and extend PGOAUTHDEBUG