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 1o9S6l-0002Rk-HR for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jul 2022 14:03:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o9S6k-0006IN-5z for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jul 2022 14:03:54 +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 1o9S6j-0006Ez-TC for pgsql-hackers@lists.postgresql.org; Thu, 07 Jul 2022 14:03:53 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9S6d-00054a-Lb for pgsql-hackers@postgresql.org; Thu, 07 Jul 2022 14:03:52 +0000 Received: from [192.168.11.6] (p2388109-ipbf1027funabasi.chiba.ocn.ne.jp [118.6.6.109]) by oss.nttdata.com (Postfix) with ESMTPSA id E608D60427; Thu, 7 Jul 2022 23:03:44 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.6 at oss.nttdata.com Message-ID: <768e6cb3-256d-9c0b-1797-62420ffca7ae@oss.nttdata.com> Date: Thu, 7 Jul 2022 23:03:43 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: remove more archiving overhead Content-Language: en-US To: Nathan Bossart , Kyotaro Horiguchi Cc: pgsql-hackers@postgresql.org References: <20220222011948.GA3850532@nathanxps13> <20220222173711.GA3852671@nathanxps13> <20220222195229.GA42988@nathanxps13> <20220224.141349.1809640551882183816.horikyota.ntt@gmail.com> <20220224175553.GA660690@nathanxps13> <20220407222327.GA1363808@nathanxps13> From: Fujii Masao In-Reply-To: <20220407222327.GA1363808@nathanxps13> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022/04/08 7:23, Nathan Bossart wrote: > On Thu, Feb 24, 2022 at 09:55:53AM -0800, Nathan Bossart wrote: >> Yes. I found that a crash at an unfortunate moment can produce multiple >> links to the same file in pg_wal, which seemed bad independent of archival. >> By fixing that (i.e., switching from durable_rename_excl() to >> durable_rename()), we not only avoid this problem, but we also avoid trying >> to archive a file the server is concurrently writing. Then, after a crash, >> the WAL file to archive should either not exist (which is handled by the >> archiver) or contain the same contents as any preexisting archives. > > I moved the fix for this to a new thread [0] since I think it should be > back-patched. I've attached a new patch that only contains the part > related to reducing archiving overhead. Thanks for updating the patch. It looks good to me. Barring any objection, I'm thinking to commit it. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION