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 1ndxHn-00006i-Dt for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Apr 2022 16:53:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ndxHm-00022M-3v for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Apr 2022 16:53:06 +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 1ndxHl-00022C-Op for pgsql-hackers@lists.postgresql.org; Mon, 11 Apr 2022 16:53:05 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ndxHg-0003QL-Jk for pgsql-hackers@postgresql.org; Mon, 11 Apr 2022 16:53:04 +0000 Received: by mail-pf1-x42d.google.com with SMTP id a42so8555776pfx.7 for ; Mon, 11 Apr 2022 09:53:00 -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=HfOa17rCTojWlNzscTGGTokoH9YH7wgr0ucHUyZOPMo=; b=UwQPIRIK910+pPiLV+ieE2kpmaiHvuoPP5AkNU0cB2REF0iRAfC2wGSi/PyHIDz60k QyBa2X/mO/SqW0otU8ve1gKPUgS28wwtZq+ZWWTdkw0Jjil56LxATR5DtUQkVC8SMdjk kkx/EI/uFq/A56GBOHmitF9/ki3DVt8CGWQ4W3YtYFqOgtS1d+OM7y6DgZrJBAh/g6CJ 3Md9h0LzLsSwO9g+EGA/NWybRkm56cVDnBB6V0vp825OIqeWPA1ne2e+sf4VNh3VZJZR xC05WRiMClz2n61G3yWbMYMx+rHoDOuiMoYkXTpapKWEOn0rXNmg1QAc+fngQXJ/oJIP IYDA== 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=HfOa17rCTojWlNzscTGGTokoH9YH7wgr0ucHUyZOPMo=; b=Yaa3uoOXoNBrK2SPunH8oUR/ptuGME0AlQ3yvdVRzFvMwSt0+ri3ADDYCA/mWOl4Ny mAtjD2xrFuQ2RCTvyQREblV+q2Eu68UI//Eae6Ik4Rf7uoHZ8UlQRoWet5NcRAYdQJZA /Obz1TR+UfGOA3YMvO4Aq0kq6/hPE3okT+c4Z2I5HoRsqnhk/cSU4nLwKt/o0rAgzrgr ycPYmQN6eOZCR1XTLABUlhhU0JwfsKMYAZHp/xC8SDJ+r97uOnvpqr8TdwwHoNxlL/ST WVXnhjCTBA1YlDFrzwqQ1hmu5woRqMtNaA4vSJuTV/rUS/tuyIDZghHxYnreqplNyofQ ngig== X-Gm-Message-State: AOAM532iz11SrgRr+gpWG04sfA8c+/TiBl6HWyABhPpULHHe6nPQQKsx P6HH6PvHQK7/YvUEtPxM4WI= X-Google-Smtp-Source: ABdhPJyEroPPFQA14K6ZO4sqE8k2BJH7fyBuKoMQnnt/GEKM0+DLAsyjCCUO9aT+nRH59k913dFFLg== X-Received: by 2002:a63:2544:0:b0:39d:1173:148 with SMTP id l65-20020a632544000000b0039d11730148mr11960780pgl.352.1649695979756; Mon, 11 Apr 2022 09:52:59 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id i2-20020a625402000000b004fdf66ab35fsm27566658pfb.21.2022.04.11.09.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 09:52:59 -0700 (PDT) Date: Mon, 11 Apr 2022 09:52:57 -0700 From: Nathan Bossart To: Tom Lane Cc: Robert Haas , Kyotaro Horiguchi , "pgsql-hackers@postgresql.org" Subject: Re: avoid multiple hard links to same WAL file after a crash Message-ID: <20220411165257.GB1915258@nathanxps13> References: <20220407182954.GA1231544@nathanxps13> <20220411.181217.1988132552983948196.horikyota.ntt@gmail.com> <289699.1649694527@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <289699.1649694527@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Apr 11, 2022 at 12:28:47PM -0400, Tom Lane wrote: > Robert Haas writes: >> On Mon, Apr 11, 2022 at 5:12 AM Kyotaro Horiguchi >> wrote: >>> If this diagnosis is correct, the comment is proved to be paranoid. > >> It's sometimes difficult to understand what problems really old code >> comments are worrying about. For example, could they have been >> worrying about bugs in the code? Could they have been worrying about >> manual interference with the pg_wal directory? It's hard to know. > > "git blame" can be helpful here, if you trace back to when the comment > was written and then try to find the associated mailing-list discussion. > (That leap can be difficult for commits pre-dating our current > convention of including links in the commit message, but it's usually > not *that* hard to locate contemporaneous discussion.) I traced this back a while ago. I believe the link() was first added in November 2000 as part of f0e37a8. This even predates WAL recycling, which was added in July 2001 as part of 7d4d5c0. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com