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 1w8JUl-000PWZ-0c for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 14:58:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8JUj-006Z2x-22 for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Apr 2026 14:58:06 +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 1w8JUj-006Z2p-19 for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 14:58:05 +0000 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8JUh-00000000CfI-4AmR for pgsql-hackers@lists.postgresql.org; Thu, 02 Apr 2026 14:58:04 +0000 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-415c8a4d2e6so428603fac.0 for ; Thu, 02 Apr 2026 07:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775141883; cv=none; d=google.com; s=arc-20240605; b=Xzbd8fQ7SIbymNUbVK7TXaw/r2pWXYH9hRIkckZfsgXV6VBKsa9R9CK9XX1EvjmoaU H5FBKDcH5q2aGjVoYS3uJferKKCPnX2HePBkC2nopRsswsBqGqfqiFDkjRt4Ai93h6Qp YCLkNtCLWn/20Rspi35XPYz8R0qjocjQjaxrDMlViCysBdyW+WUP7R+4bOBkgqw95xT4 PhwGYEt/hvWigjZwVYULrGJxf4PWcpXGEsjzpHN27WSk1pJcnqNJZzdRRGupxEHprN2H KlQxqRZ8bJre9wrfZ5oGuzsmu01gfj3tZqdlO0y2Z2M07sDciuuo/FX8GOl/etuYFUAf dUmA== 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=Fc504tBEIV8/d110lzjbSlTs0ZQzghUs4FogECzu+jQ=; fh=GwbSYDWhunpYIGpLvr4M3s1CB/ZYI4bLBddiq9pJ9rE=; b=F6/o9Wik3oKCetea+sowDj2ey1MM8W9gW7O19Vca4jWC2CP68zjE1rDlEB5I6tAW4U v/x8Mbs4CfGSASr5C03FgJtKSCWR6uOV8UX20/P8dKgRZDp0ZnlItslUR1bedcPR1g19 mL7CKA6dNy4bMmwQ6xMVU13hnRCEXKU3zWqEuKJbnUW2uNaMv1vZBG7nU0Gsgrt4n1KK Um3B3sTHGp2k0NG+aZxtCFlWWfqJLrDK1GGE4fkiCCsePy2Vdrg0xgfzvgUdycsnERB3 uVg5C1jB+KHMxH74/5UeHbmSmVt9ta2TAWIFQTfJZ1fqxfC+KeDYJvLl9g9Ksr+47K9Q QDMw==; 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=1775141883; x=1775746683; 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=Fc504tBEIV8/d110lzjbSlTs0ZQzghUs4FogECzu+jQ=; b=oypGKlPZSEIr4039u/1vF1mZmG2Fm5DJ8FFpiLKOTBLw26QnY5zlKbbfta7LnVoE5y x9QSd8IbpfmV/XHqHk871iZs/ICjqjLZ2+v0pl9fmkTh14M8upBIDzAaR5usgwG+nVJH T6JpJAJmRJw/94i4Yno2Ol3KizSI2rUw8N5BpjolwV5k79FGLPySVmaJUd6aSo29v2At NynEol0D3Aff3eHeBu+sIaCWQmgWUrmVgxLpa27i9kWazBuxkMkUcWY2LIT7MsXTTT/W dACQUTzw+HJTuR9+8rjzGf0wS/D/sgqaZkwFURMgAvdlCLYIrf6VY+fsZhnSpbz5+gkW UtzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775141883; x=1775746683; 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=Fc504tBEIV8/d110lzjbSlTs0ZQzghUs4FogECzu+jQ=; b=LcsMCN7Gv/jyExsEaFAee5/GKsLEIqlD0qRerIggN4apN3lZquBzt3xa5vaSFwq3Oe rNkpA01gWQIJvT8hg3xdhrADgkLmXAa4Id3p99LWsNNVzGntBTAsO/X2QbXxr81tgl7v 4JbvfvS50A5EOVfeiSXw7VQRxUW61Lo8/o0A0kRh6aq0HfSYKXCY+7CRpyxc2fCAUBDA 3l3w2IDTIADBM4BimL4RrvEjXBhF23XwiK6LGQEhk+JIHVwMQd1DgqOlk4XTGZj9uVuW EyX5/JPPrpAJVKtXWerUDBDlB5Kn3UMMGTATr5/sxkl34ute/Bm/1QamUdAwdkxKxozF IwFQ== X-Forwarded-Encrypted: i=1; AJvYcCWRPBK2ZHZQeTRJQ0IENvgr6i/jOostJtI9bUKRTDhopMKs9gFJSCWIS9QW+BxEaMBokfZIg6k9hgfLPb/U@lists.postgresql.org X-Gm-Message-State: AOJu0YyIgx6FyZOpNfCYI4XZ+FUK7f2JTRDE/9Rt0b/JW7+zHWXLCOUu q/MfLqN1XMqF9VJa9gAoxkLnZBXsLVLiFatWHjOC4+X2HHv69vOGQ6t+ExX9gVnQ3glQ0T+DsOw eexgVpCtl1xd8a4Bg/BGwjNt3MY3u1iU= X-Gm-Gg: ATEYQzwcCcVZWq6lSRfc/tt0ixrtLSdtApQoF41gKz43KdMtX1nATf/eIUT2YxKWFeo EASydlWQ9Hc7+oEbED5pR7jqcOIZsxDJ1p8inNrM/0spEsSIz5NGucNTGL0e7g+fnWyOGQjiYhP 7OQQnxFCzeGVOowg/Yk309g6YMVHXL5GzNNRtVs3UZad9F7Ns+qrqGMY+Ryhsk2tA+rATAhJ99a YuhhDMGascuenBEJ+XLky0y4Dg4bqxR6A+7VASI2JRheBgSegm7XdKfr7KkINCEFdEDWZGKPIx9 CL7Lh5/WRWfv2nfusIRH4rgausUOBfZpBi/mCd+Lg/fejl9NiLhe X-Received: by 2002:a05:6820:1c90:b0:681:aa84:9c37 with SMTP id 006d021491bc7-681aa849c94mr530936eaf.23.1775141883116; Thu, 02 Apr 2026 07:58:03 -0700 (PDT) MIME-Version: 1.0 References: <29CA73B2-872A-4D7D-B8E9-D89F76DC18AF@gmail.com> In-Reply-To: From: Fujii Masao Date: Thu, 2 Apr 2026 23:57:50 +0900 X-Gm-Features: AQROBzDt1hL5i4sstiiB1KR9BFTf61a6hVvAzox9OY76yYMMUkmNmJdHsHZeVt0 Message-ID: Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler() To: Bertrand Drouvot Cc: Dilip Kumar , Chao Li , Bharath Rupireddy , 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 1, 2026 at 12:44=E2=80=AFPM Bertrand Drouvot wrote: > > Hi, > > On Wed, Apr 01, 2026 at 12:17:28PM +0900, Fujii Masao wrote: > > On Mon, Mar 30, 2026 at 1:21=E2=80=AFPM Dilip Kumar wrote: > > > Shouldn't we add a comment to the handler function header stating tha= t > > > SetLatch should be called by the caller? procsignal_sigusr1_handler() > > > is currently the only caller and handles it, but this would ensure an= y > > > future callers are responsible for the same. > > > > I *guess* the original comment was added because readers of the interru= pt > > 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 th= inking > > to commit v2 patch. > > That sounds reasonable to me to proceed as v2 is doing. Thanks! I've pushed the patch. Regards, --=20 Fujii Masao