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 1oC0kZ-0004qk-Az for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jul 2022 15:27:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oC0kY-00084c-93 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jul 2022 15:27:34 +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 1oC0kY-00084T-02 for pgsql-hackers@lists.postgresql.org; Thu, 14 Jul 2022 15:27:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC0kR-0004JG-OK for pgsql-hackers@lists.postgresql.org; Thu, 14 Jul 2022 15:27:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26EFRO9n2835512; Thu, 14 Jul 2022 11:27:24 -0400 From: Tom Lane To: Alvaro Herrera cc: Thomas Munro , Andres Freund , Pg Hackers Subject: Re: EINTR in ftruncate() In-reply-to: <20220714144652.jph7exiywushg4gc@alvherre.pgsql> References: <20220714144652.jph7exiywushg4gc@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 14 Jul 2022 16:46:52 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2835510.1657812444.1@sss.pgh.pa.us> Date: Thu, 14 Jul 2022 11:27:24 -0400 Message-ID: <2835511.1657812444@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > ISTM it would be cleaner to patch PG_SETMASK to have a second argument > and to return the original mask if that's not NULL. This is more > invasive, but there aren't that many callsites of that macro. [ shoulda read your message before replying ] Given that this needs back-patched, I think changing PG_SETMASK is a bad idea: there might be outside callers. However, we could add another macro with the additional argument. PG_GET_AND_SET_MASK? regards, tom lane