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 1ruwVq-008gyo-RJ for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2024 15:38:55 +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 1ruwVq-002DsE-0p for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Apr 2024 15:38:54 +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 1ruwVp-002Dri-Hm for pgsql-bugs@lists.postgresql.org; Thu, 11 Apr 2024 15:38:53 +0000 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ruwVm-000OaW-Q1 for pgsql-bugs@lists.postgresql.org; Thu, 11 Apr 2024 15:38:52 +0000 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-61500da846fso64270207b3.1 for ; Thu, 11 Apr 2024 08:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1712849928; x=1713454728; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1kcy1pf7aeE2HwCiNcsrC1HvdHRWnCLPVVY1poge8sY=; b=fcW2u4MnnP2UX33T8Yx3ORuQFIt0ZFbON/z/NvqX7sTvmLVVox0LIttu+sgXP+B/SU dQ+qAtNjPzM64+hP9lLvWOx+ySzF2zxOAo86uh8+TF0zMhWokgjUMsS4lEi08dsonh3/ epjHOoF/QogolUQlcmU5/7fPGzRe2fXt1wFAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712849928; x=1713454728; h=user-agent:in-reply-to:content-transfer-encoding :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=1kcy1pf7aeE2HwCiNcsrC1HvdHRWnCLPVVY1poge8sY=; b=RMn0cU2tS9llnYEg+DA5R5eQji7g8B0rMa0NvHjNKF87yxKIAVP2JzTKJsTqf1ZxJQ rstL360ym9AmMmVhZjY/tPWB979ImlTKqFZ+qZTLAcVwnufU4vZO+7B0SLK4xilvsGHg p4hD+pwLQBUBrkRLlxSpEiV1sYg/I4eAerBSTOoN3JIixeHklXccZGyaq6d08Gzw4pvT 07SN1yktjiisuNs+iaGAAORXfdyp6BOcJKXPKZ/8RFxz+aYU+3oLwfiUGjMi1oCJBIL6 UgSJZXkDoWb2onJknu91G1FBJRTRZICLdbkSiao2SIPFzc8cvJro5cJ7+f0aq6gBcVST HqKQ== X-Forwarded-Encrypted: i=1; AJvYcCUFNPNSmszmuY90yyaq5egPwZFL9HpeTxI5mdZAO0YZUQG6bdvPVoruvtghROlxCjSdRdiG0em5WTZ4ZqB8dVYJL/EXJ12SWcmCqMqNTrDz X-Gm-Message-State: AOJu0YwgryBk/N+ICcG1OFG1pWSH12yg0ualSDQA2gUQy3dmnV6GCnP4 UxZXFUgHfa7J8SuN3hsrHkMadn6cp3hn9cXL7qerU41chReTG+Wa8z7FPHMEQA== X-Google-Smtp-Source: AGHT+IFlDNhzyAxvzGDvKRROiYd6d1WXyKozr0C8yEUb5TF9fIdghDQJ8bTyfxkZDE97Hnv7X/kJRw== X-Received: by 2002:a81:4f16:0:b0:611:67c:e6dc with SMTP id d22-20020a814f16000000b00611067ce6dcmr5557140ywb.13.1712849928633; Thu, 11 Apr 2024 08:38:48 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id j14-20020a81c40e000000b0061805d46435sm362865ywi.98.2024.04.11.08.38.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2024 08:38:47 -0700 (PDT) Date: Thu, 11 Apr 2024 08:38:43 -0700 From: Noah Misch To: Ronan Dunklau Cc: Michael Paquier , pgsql-bugs Subject: Re: FSM Corruption (was: Could not read block at end of the relation) Message-ID: <20240411153843.20@rfd.leadboat.com> References: <6055942.lOV4Wx5bFT@aivenlaptop> <20240406223037.c5@rfd.leadboat.com> <5959995.31r3eYUQgx@aivenlaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5959995.31r3eYUQgx@aivenlaptop> 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 Thu, Apr 11, 2024 at 09:36:50AM +0200, Ronan Dunklau wrote: > Le dimanche 7 avril 2024, 00:30:37 CEST Noah Misch a écrit : > > Your v3 has the right functionality. As further confirmation of the fix, I > > tried reverting the non-test parts of commit 917dc7d "Fix WAL-logging of FSM > > and VM truncation". That commit's 008_fsm_truncation.pl fails with 917dc7d > > reverted from master, and adding this patch makes it pass again. I ran > > pgindent and edited comments. I think the attached version is ready to go. > > Thank you Noah, the updated comments are much better. I think it should be > backported at least to 16 since the chances of tripping on that behaviour are > quite high here, but what about previous versions ? It should be reachable in all branches, just needing concurrent extension lock waiters to reach before v16. Hence, my plan is to back-patch it all the way. It applies with negligible conflicts back to v12.