Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAwPS-000zmR-5S for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Nov 2024 19:18:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tAwPP-008ppx-7Y for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Nov 2024 19:18:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAwPO-008ppf-FD for pgsql-hackers@lists.postgresql.org; Tue, 12 Nov 2024 19:18:39 +0000 Received: from fout-b1-smtp.messagingengine.com ([202.12.124.144]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAwPL-001X8z-U9 for pgsql-hackers@postgresql.org; Tue, 12 Nov 2024 19:18:37 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.stl.internal (Postfix) with ESMTP id 44E15114014B; Tue, 12 Nov 2024 14:18:35 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Tue, 12 Nov 2024 14:18:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731439115; x=1731525515; bh=k qeiDWPNxHtsmIX3HdzUUctw13fi6XuuMjWa6o6dlMM=; b=m9ReACmNuzgtJi7VN 40TZK6+hjoGzUsEtHhnOeVul/Rl1a1rPygAXMpQcCFxESWRbMnr6mm8tVLx8j10+ ll4lwubLydfIGGO8Do9MH+8TwZ35vfEyiQzprQFMJXU/2AgzYGoUZhRhr9TuBDCM gkCWjxklaz7SHDzBld1Pv2sI0lfcm8xOtq1TSUI8W7EO/6SUJ52+8Nxj/9fLowd/ frGHTBoEmo2B4iHRhAT2NWWlUQu/HLkBFbVxj+l3RKvztwBdhQBkBSAdOle2tGtH 1eGPcj8gsGCOkE3F5P00J2Lkb5YAPbQ/KLY0WBisX5Bx90LqgrDjY/BJhTXZxjtS hG1gg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeggdduudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvve fukfggtggugfgjsehmkeerredttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghr rgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtth gvrhhnpeduleekkefgtddttedtkefguddvieffleetgeejiefhteehkeevfeettdduvdfh ueenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhv hhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepledpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepkhhouhestghlvggrrhdqtghouggvrdgtohhmpdhrtghpthhtohep sghunhhgihhnrgesghhmrghilhdrtghomhdprhgtphhtthhopegthigsvghruggvmhhnse hgmhgrihhlrdgtohhmpdhrtghpthhtohephhhorhhikhihohhtrgdrnhhtthesghhmrghi lhdrtghomhdprhgtphhtthhopehsmhhithhhphgsvddvhedtsehgmhgrihhlrdgtohhmpd hrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghs qhhlrdhorhhgpdhrtghpthhtohepthhorhhikhhoshhhihgrsehoshhsrdhnthhtuggrth grrdgtohhmpdhrtghpthhtohepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidprhgt phhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Nov 2024 14:18:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1731439110; bh=kzMsqFfNiMTh/eTFF0ajhTAgsdAla379rPEqoRMC7CU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=H2tqLo9EgVoOF3wwGXsCJAtEhv5i/VwV66BSob1baZ50tX+06xW0g1SkaNlXhJal9 TdhEZ4PzdqqPvIniHykrtw5y5nGeSH7ejmKMF6YTJggpRjTXGOc57foNNZga3mqN3F vBg1o+jetsN/jOdvMWKNCTS1VknGBHSplm8kG9y9wzZ4V+MoIsf8f7y7Ude4grHWGh WLH5/OHvPHdyWoyklxwIHUqa0EHTj2itlDSm4vAcd0gzMNFYzWZ4zT9faHZnExld6b v4FjzoVhC0RZRfUH3U+q8H6y/+z6APtBF1C52lFif9QE1R0OfpkCPmgWKjNHyq81sq uOebW92op91tg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 221C195; Tue, 12 Nov 2024 20:18:30 +0100 (CET) Date: Tue, 12 Nov 2024 20:18:30 +0100 From: Alvaro Herrera To: Alexander Kukushkin Cc: Sutou Kouhei , smithpb2250@gmail.com, torikoshia@oss.nttdata.com, horikyota.ntt@gmail.com, michael@paquier.xyz, pgsql-hackers@postgresql.org, bungina@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: pg_rewind WAL segments deletion pitfall Message-ID: <202411121918.beiyanf6gfnb@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="csdiumi66hplrfon" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --csdiumi66hplrfon Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello After reading the whole thread a couple of times to make sure I understood the problem correctly, I think the approach in the v10 patch is a reasonable one. I agree that it's better for maintainability to keep a separate hash table. I made some cosmetic adjustments -- didn't find any fault in the code. I also verified that the test is hitting the problematic case. So here's v11, which I'll try to get out tomorrow. I also assessed back-patching this. There's some conflicts, but nothing serious, back to 14. Unfortunately, 13 lacks requisite infrastructure, so I think it'll have to stay as it is. (12 is dead.) Can you please verify that my explanation in the commit message is sound? Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Cada quien es cada cual y baja las escaleras como quiere" (JMSerrat) --csdiumi66hplrfon Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v11-0001-Be-more-picky-with-WAL-segment-deletion-in-pg_re.patch" Content-Transfer-Encoding: 8bit