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 1rhJ6e-00Alem-Hi for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Mar 2024 00:56:32 +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 1rhJ6c-00C2PX-7a for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Mar 2024 00:56:30 +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 1rhJ6b-00C2PO-W8 for pgsql-bugs@lists.postgresql.org; Tue, 05 Mar 2024 00:56:30 +0000 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhJ6Z-002o39-VU for pgsql-bugs@lists.postgresql.org; Tue, 05 Mar 2024 00:56:29 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id AE5F61380098; Mon, 4 Mar 2024 19:56:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 04 Mar 2024 19:56:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1709600186; x=1709686586; bh=X5eIRXXXiS 7/blTExm5BfwhnJYaAeJ0caZkb21YGPJQ=; b=bUDJpnWmU8xZWqBqpcUqGVF612 ioynC5l7lxdYPjWpLa4uUWpuEvWi9fuYFWw42a1IdGNVNzWGJAOfSSYleZSv4afn 4LrnFBTgTiM6c/RvcHf5RybwwZZ3sMDxqBS6I9H7w2u8Fbj0mmjeBXWyl3uDNvIf 2tFprkOsu6MhqkalbrP8D32EWHkPQevk7AeqajhHnVKnWl5k2eeQ/473VtwPqdRq neotM9R55WVW0l6+qxKe4XJdoZPXSwg0B2PjsPA3sNd6jVu/rxeWt5px6sCo/LJY xuZS8TJs0ZJzT7DTVbmsmsXtiyaRH87FSYnTSGRDlLsbaaTeddS7sL35SbFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1709600186; x=1709686586; bh=X5eIRXXXiS7/blTExm5BfwhnJYaA eJ0caZkb21YGPJQ=; b=qx57C2doq6TU9xWh7q0jIqAojp4BkoZS7xAdxfhFOLFJ X4hNm4r4O0lLvfaLObZJVwblyeyaBtcaS2PushxjbGgut2Fxec7q+2D4v2aiLWAT PR7ADGC21ckUcG1PPnPRq+9JAqSREC5rbPp+/XGakDtDNq6jE9IdwdafZT7r/jQr mIwndy4JpW9yECabzeAgSSyzUZraZMEGPRKy1W4xigTK0OAcetT8+3r4KqlTOzO9 viT6uRM8Tsr1QXkrnmKxPCYODu/NU925eF2N7FIrpFvcs10YMM5bPDaR0mmn3uRO fzuk3zcT7edEqYW+stOwtzb31TSrMhST6bsUB/9WYQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheekgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Mar 2024 19:56:23 -0500 (EST) Date: Tue, 5 Mar 2024 09:56:12 +0900 From: Michael Paquier To: Noah Misch Cc: Ronan Dunklau , pgsql-bugs Subject: Re: FSM Corruption (was: Could not read block at end of the relation) Message-ID: References: <3549385.iIbC2pHGDl@aivenlaptop> <20240304230503.a4.nmisch@google.com> <3470254.QJadu78ljV@aivenlaptop> <20240305001346.35.nmisch@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dQkawD2YJxuXA3T6" Content-Disposition: inline In-Reply-To: <20240305001346.35.nmisch@google.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --dQkawD2YJxuXA3T6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 04, 2024 at 04:13:46PM -0800, Noah Misch wrote: > I agree each AM can use generic FPI code. I'm looking at code like this = as > needing change under this candidate design: >=20 > static void > spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno) > { > ... > if (PageIsNew(page) || PageIsEmpty(page)) > { > RecordFreeIndexPage(index, blkno); >=20 > The change there would be fairly simple, but non-core access methods may > require similar simple changes. That's fine if this approach has other > reasons to win, but it is a drawback. A grep of pgxn code shows "rum" as= the > only module containing a RecordFreeIndexPage() call. No module contains a > RecordPageWithFreeSpace() call. So this drawback is all but negligible. This design does not sound that bad to be, FWIW, if what you are discussing impacts data inserts enough so be noticeable in the default cases. There are not that many out-of-core index AMs out there, and "rum" is as far as I know not supported but any of the major cloud vendors. So contacting the authors of such AMs and raising awareness would be enough. So I would worry much more about performance. My 2c.=20 (You should be able to implement a cheap test using two injection points, from what I can read, if you need coordination between three actions.) -- Michael --dQkawD2YJxuXA3T6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmXmbawACgkQnvQgOdby QH057RAAnWuts0OlP+eCACSrSdbCvaPJ50rIEw/XnU2CgQAy4kEIXI7Vm1JBjC6+ fNlmI5PWnkHRwO1QqwOeTwoayxbOljucM17I/uj4p97DipKu6MCKMCGiu/8O2t27 o2jiC/97+a0al46ScWt69wLQJ9J+5aTTQZmz4feyD0gaprhOynKkx7V4mb7lYlT8 /k/h9FPGSb6SIGif1nTJcfauIaO1n5H+kLuYV//0rorKUVgJlTKLh353QfMRjLkK b2NQ0f/vmd1pbhwGQeIBT1BXUUa4aYSHx71p/ntze56d94fBSDAQQZKSVhYGpG4i X7PPoQ/UdanElKHFxoo2pbaIm8KmqkUp9kTXAeYzouZHBkJy+q2bLYz3+OvrkfaL GmprT1K6aACXui/EXkZVOWSqL7pcXEUgRuWz35C4nWDUteHXAeZqrz5mWSpwxO2o IF2QaUfx6WgBpXqDnH5yz8GANYr81g3HUHySyk5ydkETQdivTvy5DWCg3vwV49tz PO4GkOPa6sLjQ6o0WAs/mVSFVnPjPEQR2HR9IMk1sIF9titYyYf9IT2zoRUMwcdv k9Gre4wH6a+MffO1hJW3JHvPBn6ucaih0pnJ2kiM2llT2jj2b4Is3uFBeJeof85j rl2IBDIAzxRl5QAdUPfe1ssxPTqYoSXnb5W2ShcoWXxx1TreBug= =voeW -----END PGP SIGNATURE----- --dQkawD2YJxuXA3T6--