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 1rfyhV-003QZ3-Hl for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Mar 2024 08:57:06 +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 1rfyhS-00CUpL-Ht for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Mar 2024 08:57:03 +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 1rfyhS-00CUpC-7c for pgsql-bugs@lists.postgresql.org; Fri, 01 Mar 2024 08:57:02 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rfyhK-002Id1-Dj for pgsql-bugs@lists.postgresql.org; Fri, 01 Mar 2024 08:57:01 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40fd72f7125so12839365e9.1 for ; Fri, 01 Mar 2024 00:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aiven.io; s=google; t=1709283413; x=1709888213; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J4GGHKNbw7auUfRU8rpywiX1eBz6nd2zRcOsI7zr47o=; b=gXQXqQDikHU7NBz8JJVGOShwwX57xz+f9s8lv8XjhchY6n1CNb/2B+EDgh7SPFqbrj W6k1Ih66GAoGQ5mfeUFWzCWdWmpB9Oh2PKkt+Cm6H1agB7XI7LFcOY/k9aRyhtO5xStl 2NyGbQ+BfkW8Oo9ik6f3EfZ75/r9YEqzmGGyQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709283413; x=1709888213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J4GGHKNbw7auUfRU8rpywiX1eBz6nd2zRcOsI7zr47o=; b=uuIeY6BHePIyjSOi6hoW3x4RjTr3R7AX6Jj4o1W7Qfgy2Bk0zrVmATZ5FfEfNPLXZG 9QkymXe6aK2xOpaDl9y5peaKZAapgUEI5wBek9dPi6XmbuV953TQbtQfQeSFgUHGVpIL 9tKQEgq2/ltvGH76oOni+bul026Gg48iVXydiTCMNSb5F42ACX3+DL2S6gFgYsx+RLLY DG8O0tcCy8c7z60bie3ggol5kan05X22cMGn6GSG0KzOMSd9nNtNUfX0uJBxin3FS71R vkJrn73i4kTDbqA3QnufymZ5sp+srLCjxlgtkLMKES2ei0Rr+173vzo2L+0bPBIWf7d9 nhbw== X-Gm-Message-State: AOJu0YwMBOSPlog39xiT1wfzEpF3gcP2sJVSlk1iKPgUv+8pT6ZdMZOZ cYVDHFO0XNluNXzFEHHmdzlqjJmgDB4oaHSxa6dpyydnulSYCe5sy6Ov2wzJi2vAH5fWc6nPyBl gR7GbpmwstRY27357WKYsu2VV1pwway5BbB2IejCYUmaksSGA0MNN7D7EsUyyaIdEVXeNdAmmGM P8X+rVnMkERW/yPZpsHSQKEuf6TrMi/9DjhCgXsxOT4yo1zQ3pMmNC X-Google-Smtp-Source: AGHT+IEQ5ebO/YLB6kFjNa4+sKYfz4ubL88IvMYcncz6J28/E1jMmtMenmoVkyB0gAOElMPTlNiq3g== X-Received: by 2002:a05:600c:4fc6:b0:412:9751:d773 with SMTP id o6-20020a05600c4fc600b004129751d773mr804524wmq.37.1709283413212; Fri, 01 Mar 2024 00:56:53 -0800 (PST) Received: from aivenlaptop.localnet ([45.13.105.93]) by smtp.gmail.com with ESMTPSA id x4-20020a05600c21c400b00412afd8425esm7640806wmj.24.2024.03.01.00.56.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 00:56:52 -0800 (PST) From: Ronan Dunklau To: pgsql-bugs Subject: FSM Corruption (was: Could not read block at end of the relation) Date: Fri, 01 Mar 2024 09:56:51 +0100 Message-ID: <1958255.PYKUYFuaPT@aivenlaptop> In-Reply-To: <1878547.tdWV9SEqCh@aivenlaptop> References: <1878547.tdWV9SEqCh@aivenlaptop> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart22201039.EfDdHjke4D" Content-Transfer-Encoding: 7Bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --nextPart22201039.EfDdHjke4D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Le mardi 27 f=E9vrier 2024, 11:34:14 CET Ronan Dunklau a =E9crit : > I suspected the FSM could be corrupted in some way but taking a look at it > just after the errors have been triggered, the offending (non > existing)blocks are just not present in the FSM either. I think I may have missed something on my first look. On other affected=20 clusters, the FSM is definitely corrupted. So it looks like we have an FSM= =20 corruption bug on our hands. The occurence of this bug happening makes it hard to reproduce, but it's=20 definitely frequent enough we witnessed it on a dozen PostgreSQL clusters.= =20 In our case, we need to repair the FSM. The instructions on the wiki do wor= k,=20 but maybe we should add something like the attached patch (modeled after th= e=20 same feature in pg_visibility) to make it possible to repair the FSM=20 corruption online. What do you think about it ? The investigation of the corruption is still ongoing. Best regards, =2D- Ronan Dunklau --nextPart22201039.EfDdHjke4D Content-Disposition: attachment; filename="0001-Provide-a-pg_truncate_freespacemap-function.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Provide-a-pg_truncate_freespacemap-function.patch"