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 1tNx47-0039ZJ-0t for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Dec 2024 16:38:27 +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 1tNx46-00Giku-9F for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Dec 2024 16:38:26 +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 1tNx45-00Gikm-Sq for pgsql-hackers@lists.postgresql.org; Wed, 18 Dec 2024 16:38:25 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tNx43-000EGv-6k for pgsql-hackers@postgresql.org; Wed, 18 Dec 2024 16:38:24 +0000 Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-3ab37d98dd4so23051615ab.3 for ; Wed, 18 Dec 2024 08:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734539902; x=1735144702; 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=jTVgdehShSx+CqJ4MNTsYYNCc5vYHYDUxzY8+JKxXO8=; b=DjMrMuLm45CHEkeOWkvpSxmuNDtfg0vfRsS5yPsrEbbiWb48VbDMqMW276WGvJXhlK HFPTf5sI7BBAx99uQgUvcAY0BecDqwVBGTxbFMSeErnod2OnNw+Nyf4UaeTZG7TrhkSS vP0G7LafUU9mKes/BiFw4GI4yDGe20WcuWeMss2FuaicqYrSLLNTfkgSShjqIEqnaX/A CYZOWudyOZL9V+CoZ2etehRbTN7xRSJ9XoG9gNUjHIou6hFXscbTWld7Z4ug5y4KCSU1 NNScsESOUjYfNA0xf8Z8vpgmpaWVj2aRupfaElXwps6GiS1I1002EdC8/OspocrTLjjW E3Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734539902; x=1735144702; 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=jTVgdehShSx+CqJ4MNTsYYNCc5vYHYDUxzY8+JKxXO8=; b=GQ+3loT45Dy45rCFzwl8z8KacMf2oNBhMlJS6Ob/YLqbmp20bXsaSITmdMmp2zU96p sCNKSeGGmRC8Kuy8UWWql6KbjvJoSJgay1z8j4udTDvvmGw43UAqoezLZrEqidTjZwTk +NbivUudHQ9mVvqOAojnizEeOFx5d6FE4VDh3g4UkHgfHhtGDw/KqCHLaHTYrowLHl/Y ceMC2VBJUT4C4npx6HLcIXXZGifMRLcbl/lQw4qkjArs94ieABG3SWiP0GLX4x1q6kDx HsLutjfXkoYJQ17/gFy2DvzIVic+5jyCD9j5Lvob96XuDlYGPMgjc/y5tHJ0yXGVfFnY 5F+g== X-Forwarded-Encrypted: i=1; AJvYcCVBPOUyweApo1wYVP8G+qoXwgRxKB6z711NeW3N//W7BabVzMusMSHehkJZsK+PUrlAn4/5Q/mQ5C6ijUTr@postgresql.org X-Gm-Message-State: AOJu0YyW55/jdZyWY8+0JUWG6zxO+ZX5ASA8LWdAthS1NMQO+TDlQ58L 4o/XzsGn6r/O/XuScoibT39bLqWOmXEFcwI60BSPQFXlNwWESt1L X-Gm-Gg: ASbGnctdPlvIGv7TX3KfT2iMqxWJ6kfydt3oIFmp2YAf8XMCLj/izu5k9f52gCuqR7O RuG51IqsCF2XoDV4LR8nea+mhPg0pfcm11N3uGbzqvmC4axBUKgZR+JlWw9XMomWSinc1URTUgM QpGImQEDGQkiZemwFpo8E6JOjiRQivngef+k0u1hbjSZ7Kizav2hZ1jFvw5GMlshs+Ac1H8payo kJCrlG9kl5eA+hzTpzprDyKHGddcMVFHK9CmtiwZ4Mu/G2Q+Zx0fRItodxaMrvmwXaZlIiT/GTc qJHc9HAFzNiL1DAmI+86aYjiNJ8/iP0qP5OHg83iAvCX5dk= X-Google-Smtp-Source: AGHT+IF1apspBbw6IPiF+BmvgMzdToEGzZRIF+98oCrWxlFCKw46uHsEzWRoHH+qnD8IrALrp/9pQw== X-Received: by 2002:a05:6e02:1a0c:b0:3a7:d7dd:e709 with SMTP id e9e14a558f8ab-3c011b45b3amr2013465ab.7.1734539902313; Wed, 18 Dec 2024 08:38:22 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4e5e3c6a483sm2232834173.155.2024.12.18.08.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 08:38:21 -0800 (PST) Date: Wed, 18 Dec 2024 10:38:19 -0600 From: Nathan Bossart To: Robert Pang Cc: Michael Paquier , 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: <20220411165257.GB1915258@nathanxps13> <20220412.154631.417529439388886590.horikyota.ntt@gmail.com> <20220412162742.GB2062175@nathanxps13> <20220502173907.GB3351307@nathanxps13> <20220502230613.GA3398932@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Dec 17, 2024 at 04:50:16PM -0800, Robert Pang wrote: > We recently observed a few cases where Postgres running on Linux > encountered an issue with WAL segment files. Specifically, two WAL > segments were linked to the same physical file after Postgres ran out > of memory and the OOM killer terminated one of its processes. This > resulted in the WAL segments overwriting each other and Postgres > failing a later recovery. Yikes! > We found this fix [1] that has been applied to Postgres 16, but the > cases we observed were running Postgres 15. Given that older major > versions will be supported for a good number of years, and the > potential for irrecoverability exists (even if rare), we would like to > discuss the possibility of back-patching this fix. IMHO this is a good time to reevaluate. It looks like we originally didn't back-patch out of an abundance of caution, but now that this one has had time to bake, I think it's worth seriously considering, especially now that we have a report from the field. -- nathan