public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fujii Masao <[email protected]>
To: Nisha Moond <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: shveta malik <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion?
Date: Thu, 9 Apr 2026 03:09:12 +0900
Message-ID: <CAHGQGwFWBEDhW6=fnO4b9zsJEjy863jQDmsAZE=EwUHqXZGB=Q@mail.gmail.com> (raw)
In-Reply-To: <CABdArM7B8Pnd+pZD201cZ0a1YfzoFytmbQw5XtEb84sD=rM92Q@mail.gmail.com>
References: <CAHGQGwFzNYroAxSoyJhqTU-pH=t4Ej6RyvhVmBZ91Exj_TPMMQ@mail.gmail.com>
	<CAA4eK1+CrQNqiPDKv1wYfdkbX0FARJoi1=0ioaAqkLzbq2vG1w@mail.gmail.com>
	<CAHGQGwHABvuCoyM24HUiFZ5oJq_CoFomjt_cqD-0cJLMjFXJjQ@mail.gmail.com>
	<CAA4eK1LzZGfRANPAnv6NpKCH2ENuZO6HswgY14A=xsOXmucPhw@mail.gmail.com>
	<CABdArM6nepct0uxizCnZqy-kAjjTOndvu7bWtaNcmknuxx82Hg@mail.gmail.com>
	<CAJpy0uBhJB4HqouLXegD=miSkZfZp86tTC2K0K6nf=bHCcsPLQ@mail.gmail.com>
	<CABdArM6Mfhk2+9TVR_D3cgfPWPfHDuZEg7MOc5KqULwt0OcQUg@mail.gmail.com>
	<CAA4eK1+d2vN80-Yvy_Hr=ATF3XL5db+_W-sXF=2Vxm+OFBO82w@mail.gmail.com>
	<CAA4eK1KxU4b53GUor41A55x+Bx-DdOaQ9g1DqURyRY2Cg-hhPQ@mail.gmail.com>
	<CABdArM6pmn5yFqiU33KTYBXYM=Vny2ULnJY_gqFbsMEdt+1dPA@mail.gmail.com>
	<CAHGQGwEsEjXbCthXb02=HScBW7C=BHmygv9SK1VGCcc-9bmTsw@mail.gmail.com>
	<CABdArM5rrhSmFvVL4C5LL0iea-R0HRtB=ZvD=ereoTDa1Tm=NA@mail.gmail.com>
	<CAJpy0uD5brcAOpM8+UGfpzrm4pu-vsSfQUT2zgmcKsXEb8++4Q@mail.gmail.com>
	<CABdArM6E2aBj0FUjr2870sZUQqc6mpV1xSM=sqUFd2tKbfUQHA@mail.gmail.com>
	<TY4PR01MB16907318494FF276465E97DF79453A@TY4PR01MB16907.jpnprd01.prod.outlook.com>
	<CABdArM5RqLna+Y3CF=0BKew-WyxoAKXgcaOnXG1DZpMEiogCqw@mail.gmail.com>
	<CAHGQGwF1=zu478YX1kNaX+qaNp9DH_p+5ZdSfFdTa=JuynJufQ@mail.gmail.com>
	<CABdArM7OsLhyactNNUZ+Wygc_ybv4hhgje9c+h+=PHm3QdS4iQ@mail.gmail.com>
	<CAHGQGwHndKa--mCKAaSpAtdTte_3RJkUueZcDSqdUASqTsDK0Q@mail.gmail.com>
	<CAA4eK1JwVewYZc7eyF9x2-G+Y1ikgU5+a5gmQR+ssft++V51ZA@mail.gmail.com>
	<CAHGQGwHo8f+d3wF-beh6fQnftAkJUyd4mLm2Kg_m41Dg+6dCQQ@mail.gmail.com>
	<CAA4eK1Kb_-zVDcoTP34FZjYcgXAHkUu-vmmGYtH5Tg0o+jW_mQ@mail.gmail.com>
	<CAHGQGwGprr+1ycMFpkni4fOM=CGt7iO1yGnJROHqU59sewV0-Q@mail.gmail.com>
	<CAHGQGwH_AAbtsiYDJt65N7_4PJ0CgOJmBEaCq68e5_tcuG_vXw@mail.gmail.com>
	<CAHGQGwF7QvpRZL6sT3m5EeuacL4SePqmMu1+zJiJc3V2u-tBOA@mail.gmail.com>
	<CABdArM7B8Pnd+pZD201cZ0a1YfzoFytmbQw5XtEb84sD=rM92Q@mail.gmail.com>

On Wed, Apr 8, 2026 at 6:45 PM Nisha Moond <[email protected]> wrote:
> Regarding the pg17 change, NUM_PROCSIGNALS is not a process signal
> reason but simply represents the array size, and its value will also
> increase in pg18 (+1) after this backpatch.
> AFAIU, the concern is that extensions might rely on the old compiled
> values of PROCSIG_*, so we should avoid changing their order. However,
> extensions should also not depend on NUM_PROCSIGNALS directly,
> otherwise the pg18 backpatch would pose the same ABI concern. So, it
> seems safe for pg17 as well.
> I also checked core extensions and did not find NUM_PROCSIGNALS being used.

So the question is whether any extensions or third-party code depend on
NUM_PROCSIGNALS. I also couldn't find any such usage, so it seems safe from
an ABI perspective to change its value.


> That said, I think both approaches - adding the new entry at the end
> and defining NUM_PROCSIGNALS outside as done in the patch or adding it
> just before NUM_PROCSIGNALS (like below)  are semantically the same.
> ….
>   PROCSIG_RECOVERY_CONFLICT_LAST = PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK,
> + PROCSIG_SLOTSYNC_MESSAGE /* ask slot synchronization to stop */
> +
> NUM_PROCSIGNALS /* Must be last! */
>  } ProcSignalReason;
>
> As NUM_PROCSIGNALS increments in both cases, I don’t see any
> additional benefit in defining it outside. Thoughts?

Yes, you're right. So, in v17, I'll just move PROCSIG_SLOTSYNC_MESSAGE to
just before NUM_PROCSIGNALS.

Regards,

-- 
Fujii Masao





view thread (42+ messages)

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: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion?
  In-Reply-To: <CAHGQGwFWBEDhW6=fnO4b9zsJEjy863jQDmsAZE=EwUHqXZGB=Q@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