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 1ngW2K-0002pt-Vn for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Apr 2022 18:23:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ngW2I-00014h-SQ for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Apr 2022 18:23:42 +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 1ngW2I-00013x-GA for pgsql-hackers@lists.postgresql.org; Mon, 18 Apr 2022 18:23:42 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ngW2G-00074d-7w for pgsql-hackers@postgresql.org; Mon, 18 Apr 2022 18:23:41 +0000 Received: by mail-pl1-x634.google.com with SMTP id c12so13000578plr.6 for ; Mon, 18 Apr 2022 11:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=SHyq1HmdY4uKF2XTy1Fe+p05kTUzyWXAWI558ppJdHE=; b=KB9iz3tafc7BsiXyc1tFjshJHAnoyqMdK4h1s7sf28kqg6EvR+g8cyHLrubM4zp9oT S63NZsvKbg42X5auCHtbpyTXuS5qGwJHWlOgCeDxn5Bhou4laIFKoIIPrmhpchJOZxCx sKei5kHM780GkWjwoy5lKaAcnpsQW4GOTrJSNUe9mQLQBdLu4O0P1wuL98hixOOLLlFa 83kmfkVptvh4gJEQEeJC+QbSgIDDacBTrAp4PmXz6Irbrynm9KUonzbPOm+FS8IM8Hb0 LWeuOzrKBYsG/5BfeewqUsUM4uSkZ5FazqtlmFjtro0aYsuqu10Htl0QQuOseSVIbH4z rPEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SHyq1HmdY4uKF2XTy1Fe+p05kTUzyWXAWI558ppJdHE=; b=mtY5jzsQBlEVBu7blhkVizIJv2UdRvnybaefxtAN54czxwGh7BJ0vSoJOPiHEBSPFp kR9LluthVTi9gF5k33zIF8s+nK5iif71Q4CBFZTuicycAw4FDShN/V65jZuKywWofw0u nhNYtPH+yME+iIlsaBjletIL6ld3Yzg87CnNt01gsI2qjoKUhkeaYupN8Xw3YZm8KkYS 117HMbOUPWO8QGB0LZmUCIBdI43jAKbIUTWwMsi9usaME4v3iwvMjJY93iruhadKa/Rt JnGT1G8bqh+zxSxzYDeRlhZjrfV3W6J3FOMt1LIciWvPMCJrxx2CtaIDQVapuxUmG685 HKZQ== X-Gm-Message-State: AOAM530Shls6UF6e4yC3Sy8D4EwcNYrO/RXdoLzUIc1AylB0A+sT2H2w OfAIjed/niQmO73kfPeA4eI= X-Google-Smtp-Source: ABdhPJwc0Hybr4RCt3ijZjsquXh9Mt+RBhdXHspvaSpXQlDPmSvCFaFxKrgLR0v92ns8CMKXXxPlxg== X-Received: by 2002:a17:90b:1e10:b0:1ce:8478:ea09 with SMTP id pg16-20020a17090b1e1000b001ce8478ea09mr20050812pjb.134.1650306219261; Mon, 18 Apr 2022 11:23:39 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id s35-20020a17090a2f2600b001cd67e544e4sm13634668pjd.2.2022.04.18.11.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 11:23:38 -0700 (PDT) Date: Mon, 18 Apr 2022 11:23:36 -0700 From: Nathan Bossart To: Michael Paquier Cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: avoid multiple hard links to same WAL file after a crash Message-ID: <20220418182336.GA2298576@nathanxps13> References: <20220407182954.GA1231544@nathanxps13> <20220408165312.GB1409034@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 18, 2022 at 04:48:35PM +0900, Michael Paquier wrote: > Saying that, it would be nice to see durable_rename_excl() gone as it > has created quite a bit of pain for us in the past years. Yeah, I think this is the right thing to do. Patch upthread [0]. For back-branches, I suspect we'll want to remove all uses of durable_rename_excl() but leave the function around for any extensions that are using it. Of course, we'd also need a big comment imploring folks not to add any more callers. Another option would be to change the behavior of durable_rename_excl() to something that we think is safer (e.g., stat then rename), but that might just introduce a different set of problems. [0] https://postgr.es/m/20220408194345.GA1541826%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com