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 1ts6fl-00FHOq-SW for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Mar 2025 20:57:57 +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 1ts6fk-006qjv-5J for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Mar 2025 20:57:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ts6fj-006qjm-RN for pgsql-hackers@lists.postgresql.org; Tue, 11 Mar 2025 20:57:55 +0000 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ts6fg-002IwW-1p for pgsql-hackers@postgresql.org; Tue, 11 Mar 2025 20:57:55 +0000 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-2bc66e26179so2511556fac.2 for ; Tue, 11 Mar 2025 13:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1741726672; x=1742331472; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=7RYU8ok2DdsywKKwF84tGGygTUWV/qOrXZSrJqocLr8=; b=SjfkgOsSiHolH2sUk2DERo6VpabUVZH4mHJ89KaSUFpgZRx8VAjS4oK6BEWszsMjiN nRgadPR4PfGBObRzcd+jEC2exwLy/OjKHmElAhFyhqo1EzZLskOQFRblcB15fYHYYVfZ Q7dvjo4cutdhDBGjXodK8lGNenL06rAuNSXys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741726672; x=1742331472; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7RYU8ok2DdsywKKwF84tGGygTUWV/qOrXZSrJqocLr8=; b=KzYh3+stfY4P9uU7N4xLVIUXyQ/zZTcnNsU5xnuWXhHlS0azbK4KgoAwL3bQFFxYM9 w0Qu5J7n/oyBhVAS0nA0C+vDVzf4BLPEDv59IRkyLUfZwwFESgqDqBxvb865+5N0qhZP g0r1ofRXLLFfCOHBtH4I82fikJqt2PhOV8NkfpRFItUNgIt20o2iZpCtftmzUxmTkkRI iWl3iuK/ltUnC7PDthYGNsEBu23ewn/s1Pgr5UpOREDupcW0C7rOi7xTbeggaqzZd7XC F+KF6nOHmMf9ILTXChg7KwbDJCRoNICn6s2dV1Ss1CZzKNXrW1SUKpsrrvrGHc33Jgow epwA== X-Forwarded-Encrypted: i=1; AJvYcCX61skf8dK1WopbPN271PKZsdWehatWak4uCJogJVZKPNnSL48BY+SW/Mf7kq1YFW3dzGvT1E53IakCI1jA@postgresql.org X-Gm-Message-State: AOJu0YxsW9RKU9rwMkN/YSddg+/Fxl9JUN/fiSENBdNB1jFljwkEdpYb z9gxDRG0cQmIJLa+CDeaS4TvFMI2OvdfltxcvMCecBkwvQBh8BLsig3j8En9vA== X-Gm-Gg: ASbGncsv/Q5IvvQA0Lu2PA7WeTsxvoC1k4WjuuYePjPz1YMlG1O7jZkMXzGW4f2PN4a wBloSbBI9s+QkfMYEGYhsy8w1lhw/ZyCwNjYCLcfSp35xPK18YZxORcSK64IemIwqnM5HnGGQek 9bJ1YD8xORtLosIhCFxa5tHQe5ZCQo7hGVcABL2N7UvAX7hh30HkhwyxCunFOBu2Dejh2LQNlnb tygVVWtvefKJNv6e36qcutNGeoZlTLzShuvatZweaARgONSQX2dhd2lai15rDTjUjD6bfP3iSJE S4RNqeXeYOnAhsLDoUx5tphIqVsAIdgJcc+ao9M= X-Google-Smtp-Source: AGHT+IFtbkveTJ55UkkdwbQCvhk1mQ2QMDnrG/MWU9Jl9GcJ0yXq/g4oT2CF3t8T2G0aTQ0A2rEBug== X-Received: by 2002:a05:6871:6a0:b0:2c2:4f6f:5b59 with SMTP id 586e51a60fabf-2c260f8e72cmr11347499fac.2.1741726672140; Tue, 11 Mar 2025 13:57:52 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72b80bc95ffsm1253764a34.52.2025.03.11.13.57.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Mar 2025 13:57:51 -0700 (PDT) Date: Tue, 11 Mar 2025 13:57:49 -0700 From: Noah Misch To: Michael Paquier Cc: Nathan Bossart , Andres Freund , Robert Pang , Kyotaro Horiguchi , Tom Lane , robertmhaas@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Back-patch of: avoid multiple hard links to same WAL file after a crash Message-ID: <20250311205749.a8.nmisch@google.com> References: <20220502230613.GA3398932@nathanxps13> <7chjz7zeigbsbt7nim4cj6zryflzcpy2lgenas3yh7cpvwf3gb@m6cwqzlvfd6q> <20250306193013.36.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 10, 2025 at 02:25:28PM +0900, Michael Paquier wrote: > On Thu, Mar 06, 2025 at 01:44:30PM -0600, Nathan Bossart wrote: > > On Thu, Mar 06, 2025 at 11:30:13AM -0800, Noah Misch wrote: > >> 1. Make v14 and v13 skip WAL recycling and preallocation during archive > >> recovery, like newer branches do. I think that means back-patching the six > >> commits cc2c7d6~4 cc2c7d6~3 cc2c7d6~2 cc2c7d6~1 cc2c7d6 e36cbef. > >> > >> 2. Revert 1f95181b44c843729caaa688f74babe9403b5850 and its v13 counterpart. > >> Avoid multiple hard links by making durable_rename_excl() first rename > >> oldfile to a temporary name. (I haven't thought this through in detail. > >> It may not suffice.) > >> > >> I'm leaning toward (1) at least enough to see how messy the back-patch would > >> be, since I don't like risks of designing old-branch-specific solutions when > >> v15/v16/v17 have a proven solution. What else should we be thinking about > >> before deciding? > > > > I agree with first attempting a back-patch. All of this stuff is from > > 2021-2022, so it's had time to bake and is IMHO lower risk. > Could it be possible for you to double-check and also run > more tests if your enviroments help? Thanks for crafting back-branch versions. I've queued a task to confirm I get the same result. There's a test case I'll polish, too.