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 1tqH95-002Efn-B8 for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 19:44:39 +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 1tqH94-006LkD-1t for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 19:44:38 +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 1tqH93-006Lk5-Nh for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 19:44:37 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqH90-001MFF-0f for pgsql-hackers@postgresql.org; Thu, 06 Mar 2025 19:44:37 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3d42a77b897so8572085ab.1 for ; Thu, 06 Mar 2025 11:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741290273; x=1741895073; darn=postgresql.org; h=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=OF8oysd+wzFcvwMVVS5jTsCKuL1HDW/x+hEsOWqg12U=; b=M9/wbTOccIoBeafOTEhOQP+5U9GSzlUWocpLwflvE+jIc/85O5bBSQMqZLDzDGwqfb hS+XkyaFZpAU6hUXRmLHAk1QHPDnGw3SynxpGzMZWb8BENE2+fV41RSfxngHmwomLJoO 6EEdYfKLF4OaKF+Z1UdoRBoUt+4Y9bh8/YqOd39bex28eJMw/8inn7VRcIB7B0t20gLR v2fvmXzhQWbPdTQTSJs/+jnr26gXXPCGyH8PgU8onW+6IqFDisLATkL/QzB1GyfHFm3R lgiOWnbVWS2ympPQQZ0MLQhLct/fW/ZGeIqk2YqNL93skzCHbqQ7bEjrAUyN+ycd87zV l6AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741290273; x=1741895073; h=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=OF8oysd+wzFcvwMVVS5jTsCKuL1HDW/x+hEsOWqg12U=; b=giCC0fgWmJiMIsJUL6ObVXNibk4rK2hSr8MCs/yx/sQ1nY+s+FrCoLiX2h65DNrBjf Fif1WJyt/n9aqMNpi5ImVc+PLx0/tuqL+tc/y+szY/pSjPTVorelsKMpU+oZ8LENh77K PJlaZFiOU0ZmA/ASftw59unUwKJjVuxwsgDzNX6/qprn4cksRytGXeg+9zjH7ROwstIp dtLgFyqcQpyt3baSj9O2zf+0WEt/0ORbkXLiB7P6qpHgHl/zw0th94xIYFhvElUjuy1u QzzaK1Au/JRV504TxFoXgJun85b2P7JJt2g0dJ4b8nc4llyBGn2xViBe1SmpP0Pu+jeJ q6Hw== X-Forwarded-Encrypted: i=1; AJvYcCXCI8Z3Tt45i58TOIIRfl7z9/MtHV1474a3vyoD4ovgMcT25Izjmpl6ToenWPeV45wENU9l6SAX0vDDSjdQ@postgresql.org X-Gm-Message-State: AOJu0YzJLAkgpHcoSXzVsCcbVDKUoAbVChK7Mu1dFq4dxoT9+r/3QcJI QSQINwS8lOGkmpvnlcl6GwOGRj3ioYKyQmCkTmoqRJBRV40osnjK X-Gm-Gg: ASbGnctiJC4EnH/f7zONrI7ngHwpXQEog99pOW6GPdn5+V+SUqgNVnEQ4puCLrLLzbz 3WlDnHSTC1cEkw/WHZjgj5g1zbPdUsBMXK/ZWhGFDbmHR8/WX73sITN9kfmqOuY2X/X+w3xvnBY ql360e92S9bzkSQBoKndSo8bhPFzmcuDF/p0y/CCcgxVonJB4FV5w5BuocMiCS3WCIKULL7oFBd pLfUkGir2vceuSxBk4Y0opk7AFUcvLVp0CJzMpXyiPmUZRGJfxy5FXpeWST3dSd3+Lxiyi4IBve GEJAb8rGJPdGDc1+5EyRoU89oFS4268ivbYkFN+WVjNf1LEln15aRxtM/suROqCG0LwVWM0x43s o7Wj8ZSlOXSO+LIMu7LRWOABcjdazpXfDNoY= X-Google-Smtp-Source: AGHT+IG7cYbBhb9lQhh+FeRFJYF+jZUwfdmmRng5wFliAL7/pP0Z4dd5vhlAMUJap2Bf3YyvWqvTCQ== X-Received: by 2002:a05:6e02:11:b0:3d4:3c21:ba71 with SMTP id e9e14a558f8ab-3d4419ff144mr11038585ab.18.1741290273483; Thu, 06 Mar 2025 11:44:33 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3d43b586a62sm4413505ab.44.2025.03.06.11.44.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Mar 2025 11:44:32 -0800 (PST) Date: Thu, 6 Mar 2025 13:44:30 -0600 From: Nathan Bossart To: Noah Misch Cc: Michael Paquier , 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: References: <20220502173907.GB3351307@nathanxps13> <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: <20250306193013.36.nmisch@google.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 06, 2025 at 11:30:13AM -0800, Noah Misch wrote: > Options I see: > > 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. -- nathan