Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wAXLE-0004KB-1C for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Apr 2026 18:09:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAXLC-001A0x-1V for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Apr 2026 18:09:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wAXLC-001A0o-0B for pgsql-hackers@lists.postgresql.org; Wed, 08 Apr 2026 18:09:27 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wAXLA-00000000273-47o1 for pgsql-hackers@lists.postgresql.org; Wed, 08 Apr 2026 18:09:26 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-423b7100bedso43885fac.2 for ; Wed, 08 Apr 2026 11:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775671765; cv=none; d=google.com; s=arc-20240605; b=jTf7KsFwoKvhf1e4BC8E9YLdVsp/01Ka1nYeOYzer8OCi54cPv7+7eJWBu/5YiCVpV AfmtXp+OQwnggI9W97Vj/qQjACFB9qz20jbbJBi89czF44QVi9jUH/S7Fa3W/hzBvLfA p/7+VoeLEnwLdXTBemXz6ArACC2OXonfTcmk5nZHXV63nIHNrNKSBGqBLzLZ40J5d4x0 1XB3A5R+885GrHO7jd0dl/p0qxrdlB7QeUwznlPD/F5S7W4B8ocFLYY4ofphrMalPlqv H3hgc4col6Tkrr19DlkjtdRQUFHG+SbcnTfWOqtcRk54TZMBuwat/Lx3fs5lzmaLZglF rXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=F5eCc46rRHr6A4GqXAeDet9a95qMP7jYPPn+0ZsnEZY=; fh=0FaIQd/42AsxMELK1KG7GcPENmo4b+m+JwGKxpEyisQ=; b=Run9Kp7XOEOm5aDrivPScxrLioLxyi0Ep8nhtjVHYlw15vmjJjwfXH+PuHPtUjRugu 0/T/CZ9hr0v0LJgelrNQ/FY7n7uK47OrXKa1H0vBRNN1Us6X0Zk4IJ1GxvxG2Thn/T05 1cUqy3Gi+uxg9EK0XE/g27/pLmGa9AxkSbOYjOo+4eFOy5ln9BR/tANItQM+5fbVNN44 IEllw8xPLBF90r6+4fAao66NZAgqo/qXU3x37dlmxThnE0dMPBqYZlJvmhgNascKGq9Z pWKxyBo+/xRGfQbdYkHKbD4chljb5qSZ1dfX9Ps+LMZirytxyMI+EKrLf6wY4RBuzgrZ JF8A==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775671765; x=1776276565; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=F5eCc46rRHr6A4GqXAeDet9a95qMP7jYPPn+0ZsnEZY=; b=YHRmMLyu/j/Wg6FoiV7Bnc3TPioi+xLnWhj1f1D/qsY7XAznWip/4SS14tL0+0Yq1s tzOvbnWu5TROyie4iiXGcYsf6+jNUXGkzuRaq5i1ZE8OgizlwBoZO7qnGPubERDm2G+p VQdw26Fm7AEV6mRkfsNOL04Zhw1MFKRufxuiuXjv2fvYC/zvwx7VEdmba+4mdgFQFMLL jR2rC+cDDBVWDG7QV/9pZ7eWe6Yb/cawYKDXxmrkdGvhGPtmomj/+XMd8dOHhS/P4a1r C5rKwVNagb81kT5CYJ5ufTWmKJYmmI/l72nrTHkhS3be2xMgNiE5j1B7/4hmJC7yuml5 VxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775671765; x=1776276565; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F5eCc46rRHr6A4GqXAeDet9a95qMP7jYPPn+0ZsnEZY=; b=AbD3+Gy7FnVRkpfZkwcA1n8AYmE7yyYavYV8m3kkicWHPrBdw94lRHilWw0x1XT9Z1 CCHTwwgYD4oVdrbPrsL1fS+sBSPk0/Vdyb7o4YjR43TthZQheSghblGEdprl5VfdMvpc NHvSQkhwTljXnJn/nfkY1SafDHKoCef1O+Qf3UE620BjSoTRoUKlmgnDNR40BmrSYF2D yRHHoDhX7VPxw8u6fHvyfLgk1Jq0113LYF4R9vQmjpLZdQvhz/Lq3yJ40hcPaHk12Stc wocA5Ypbq5kWIRWVoYFKPCavG6uPvh0Z5zP+tuEvL65TMi83HzcFr3hCybUYALw97IB4 /ndg== X-Forwarded-Encrypted: i=1; AJvYcCWOGPl+JHdA+yfjwxeo357e85NKJW2tUFVejhEz2Vm5XpFsC9IOj8Puvsc1Y/6Uuwt+HToFDrOc7MiUPPWR@lists.postgresql.org X-Gm-Message-State: AOJu0YzupO5tI+sy/lUFYlf8pqapOHYpC2IWiuDCr7BVncZwBam4tR2c KtIMz9FrjJc17gXxhOWgyS0FUWDA/H75rRk1VzpUSy2OLI59y60hrh0x9eZCqBA+gcBiKzGRQ0m N1aSWVLeVC1WUY6xwCTsn9rKqS+XJ684= X-Gm-Gg: AeBDiettNW+zy8/CFR3s9y56xM84+QvRwuq+kMBRLIbn/CRInjpnOCWEL7/pwlpQm90 D9Wu0GDngTBG0Yp+b7vOd/gJ8pwA/IFB3sW5ZDRUkP26KtXxXezGYz9wHhSpjqPRmPHDDWtNzWR ULQp9+Fw692ei8SAS7GTZc2IaLBkNQAu0L9BH91jT0SlaeQPIYFNiwfTr/LsSvNICITKiREG63W uC/oK0Of70cLiM6+YZYLiezIhYBjCp6EEWRDXqfG80FMCBIDcRoz4UtzlmZxytbT21+40WP0c1c gY8/SGkmKoOhI/9osrvYe79UjYLcH7HLc6zo6mFH8Q== X-Received: by 2002:a05:6820:f014:b0:67e:30a6:c8f7 with SMTP id 006d021491bc7-6821d5366ecmr11924723eaf.14.1775671764767; Wed, 08 Apr 2026 11:09:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fujii Masao Date: Thu, 9 Apr 2026 03:09:12 +0900 X-Gm-Features: AQROBzAcwqmlx_N1Fd14P5_k8PRaNuSwZRA1EOQ6LU4rsyH6KERMWs_OvK7VBZM Message-ID: Subject: Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion? To: Nisha Moond Cc: Amit Kapila , "Zhijie Hou (Fujitsu)" , shveta malik , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 8, 2026 at 6:45=E2=80=AFPM Nisha Moond 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 use= d. 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. > =E2=80=A6. > PROCSIG_RECOVERY_CONFLICT_LAST =3D PROCSIG_RECOVERY_CONFLICT_STARTUP_DE= ADLOCK, > + PROCSIG_SLOTSYNC_MESSAGE /* ask slot synchronization to stop */ > + > NUM_PROCSIGNALS /* Must be last! */ > } ProcSignalReason; > > As NUM_PROCSIGNALS increments in both cases, I don=E2=80=99t 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, --=20 Fujii Masao