public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bharath Rupireddy <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Drouvot, Bertrand <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()
Date: Sun, 29 Mar 2026 18:30:00 -0700
Message-ID: <CALj2ACV6a64cqQksb-0nga886dZyu-G8zhPwpqn23JEV=uUgCw@mail.gmail.com> (raw)
In-Reply-To: <CAHGQGwFBnBQZbt4e9qjZoiM0GW2eXCvS=Ny5wt+s1-+iJpK15A@mail.gmail.com>
References: <CALj2ACWd5apddj6Cd885WwJ6LquYu_G81C4GoR4xSoDV1x-FEA@mail.gmail.com>
<[email protected]>
<CAHGQGwFBnBQZbt4e9qjZoiM0GW2eXCvS=Ny5wt+s1-+iJpK15A@mail.gmail.com>
Hi,
On Sun, Mar 29, 2026 at 5:30 PM Fujii Masao <[email protected]> wrote:
>
> While reviewing the patch in [1], I noticed this issue and ended up here.
> I agree with the approach and have attached a revised version of the patch.
Thank you for reviving this patch.
> I understand the concern. There's no guarantee that PostgreSQL functions
> behave identically across major versions, so removing redundant SetLatch()
> calls is generally fine. However, as you are concerned, extensions might call
> these functions and implicitly rely on the extra SetLatch(). Since the patch
> doesn't change the API, such behavioral changes may be hard for extension
> authors to notice. Also they will be not in release notes. In practice,
> they would probably catch this during testing against a new major version,
> though.
I'm still +1 for removing these redundant SetLatch calls from the
multiplexed SIGUSR1 handlers. It not only keeps the signal handlers
consistent but also avoids an additional function call and memory
barrier from within the signal handler (a micro optimization).
I reviewed the v2 patch and it looks good to me.
--
Bharath Rupireddy
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]
Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()
In-Reply-To: <CALj2ACV6a64cqQksb-0nga886dZyu-G8zhPwpqn23JEV=uUgCw@mail.gmail.com>
* 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