Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXJ14-0004SJ-Ux for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Mar 2023 09:44:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pXJ13-0006fL-33 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Mar 2023 09:44:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXJ12-0006fC-Pr for pgsql-hackers@lists.postgresql.org; Wed, 01 Mar 2023 09:44:52 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pXJ11-0005g3-LW for pgsql-hackers@lists.postgresql.org; Wed, 01 Mar 2023 09:44:52 +0000 Received: by mail-lj1-x235.google.com with SMTP id a4so10014061ljr.9 for ; Wed, 01 Mar 2023 01:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=zGM2vmf5T43PwCRM7y78C4BHBHgLN34bT4Wph1gBYrw=; b=MC6VBX+ob+dUcsi9EoUcxUZZ664Mc3GO5tfuLVv0zjtVtb1FgtV7HV1QGzlggVAt14 wqd0rLo7A5ujR9dWrgda98BGOIg2AMRXYuBLpZQakSzratBebqhwLpnCmkUmRlb2vKsa iXtoUZpJHM+yHLIJCQ2GgJ5PjFP2iE8el5UXHjyneb5zBJPxM7TDAxGPFvs1Kr+vE0DF oQbWgqyvd29ZPu2v8hT2w1CWiUdVvYp6vAFQxph65K9v8NDLGE6PMvwiqcqH6dL9YzYW b5JT89igdhVqdi0K3r2UVsFsMxBxe/9LQWRkL574XlAt2z/GdFPWA2mjoVDTsmPt4Ctz z88w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zGM2vmf5T43PwCRM7y78C4BHBHgLN34bT4Wph1gBYrw=; b=BrpQ7KHIHDXPlBXHxEZRhgQZblU93HTZe10tOk4Lvm5TByjQp5IJzMTQFoPFtVjf+8 OOe/ZSkhmGToOZO2hUfxCnOgUyp+EwiGE6QMehAg+2j+3uteIeMLEPswDkL3T/cKF5K4 aVQNIQdbNpKw3caz/Ikk4usUSKxNbDP/a5gjD1VcW/xrPcYvXTX6Rok0omgk+u4jExww bdf40kcKSPPDOeE+xJY8zHfiNTffj4Ozg7OTwL+Oafey0eDkMAgh7ev7F5ylXy06UF+j /aU40J3CTT7vU6U5dUKXalQ3xzo+zP+r/ZiBvlswMs05IQy/qI06TuQjY/w5CULs8EL/ /tUw== X-Gm-Message-State: AO0yUKWuK5bpw4jr2NYNUqfXhM3azIkoduq2DoPycZJjsizID73z1UsI DR7Hd4lrVCwNmho7v0YICpL8AEl+DmZu8m906Jo= X-Google-Smtp-Source: AK7set/zpJPtcdwbDC8+LAVdt/VpBd0BQvefteieCXzqugMzj7MGWScJ4rQ8DD7WlHyOzxHYaevCgSn0rYOhkWv4/5c= X-Received: by 2002:a2e:8e70:0:b0:295:d63a:949b with SMTP id t16-20020a2e8e70000000b00295d63a949bmr415668ljk.4.1677663888621; Wed, 01 Mar 2023 01:44:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kuntal Ghosh Date: Wed, 1 Mar 2023 15:14:36 +0530 Message-ID: Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler() To: Bharath Rupireddy Cc: 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 Tue, Feb 28, 2023 at 9:01=E2=80=AFPM Bharath Rupireddy wrote: > > Most of the multiplexed SIGUSR1 handlers are setting latch explicitly > when the procsignal_sigusr1_handler() can do that for them at the end. > These multiplexed handlers are currently being used as SIGUSR1 > handlers, not as independent handlers, so no problem if SetLatch() is > removed from them. A few others do it right by saying /* latch will be > set by procsignal_sigusr1_handler */. Although, calling SetLatch() in > quick succession does no harm (it just returns if the latch was > previously set), it seems unnecessary. > +1 --=20 Thanks & Regards, Kuntal Ghosh