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

From Fujii Masao
Subject Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()
Date
Msg-id CAHGQGwFg-2LYk-=m0R7Z5wnm_j9MH-=NK2P++LgPUvoFU6SNJQ@mail.gmail.com
Whole thread
In response to Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
On Wed, Apr 1, 2026 at 12:44 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> 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.

Thanks! I've pushed the patch.

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Add ldapservice connection parameter
Next
From: Tomas Vondra
Date:
Subject: Re: EXPLAIN: showing ReadStream / prefetch stats