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 1njupQ-0005xq-ON for pgsql-committers@arkaria.postgresql.org; Thu, 28 Apr 2022 03:28:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1njupP-0000xA-9O for pgsql-committers@arkaria.postgresql.org; Thu, 28 Apr 2022 03:28:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njupP-0000w2-0n for pgsql-committers@lists.postgresql.org; Thu, 28 Apr 2022 03:28:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njupI-0000wU-2h for pgsql-committers@lists.postgresql.org; Thu, 28 Apr 2022 03:28:25 +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 23S3SIBj511363; Wed, 27 Apr 2022 23:28:19 -0400 From: Tom Lane To: Michael Paquier cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Replace existing durable_rename_excl() calls with durable_rename In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Thu, 28 Apr 2022 01:12:47 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <511361.1651116498.1@sss.pgh.pa.us> Date: Wed, 27 Apr 2022 23:28:18 -0400 Message-ID: <511362.1651116498@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > This change replaces all calls to durable_rename_excl() with > durable_rename(). This removes the protection against accidentally > overwriting an existing file, but some platforms are already living > without it, and all those code paths never expect an existing file (a > couple of assertions are added to check after that, in case). Assert'ing that an external (filesystem) condition holds seems like a bad idea. See buildfarm. regards, tom lane