public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Dilip Kumar <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()
Date: Wed, 1 Apr 2026 03:44:44 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHGQGwGCuccg81-PCMFbKDuwU-R7aNTD21WpkB9aL_5qopTURg@mail.gmail.com>
References: <CALj2ACWd5apddj6Cd885WwJ6LquYu_G81C4GoR4xSoDV1x-FEA@mail.gmail.com>
	<[email protected]>
	<CAHGQGwFBnBQZbt4e9qjZoiM0GW2eXCvS=Ny5wt+s1-+iJpK15A@mail.gmail.com>
	<[email protected]>
	<CAFiTN-vfzMucegigUQhOQgE0FNGhf1ixauQ1fYkbNsvTpBOZRQ@mail.gmail.com>
	<CAHGQGwGCuccg81-PCMFbKDuwU-R7aNTD21WpkB9aL_5qopTURg@mail.gmail.com>

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 <[email protected]> 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





view thread (9+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox