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 1sEG0N-000TTr-Hs for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jun 2024 22:18:17 +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 1sEG0N-00DGS8-IZ for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jun 2024 22:18:15 +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 1sEG0M-00DGQV-PL for pgsql-hackers@lists.postgresql.org; Mon, 03 Jun 2024 22:18:15 +0000 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEG0F-003JOl-Qe for pgsql-hackers@lists.postgresql.org; Mon, 03 Jun 2024 22:18:13 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 029211380057; Mon, 3 Jun 2024 18:18:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 03 Jun 2024 18:18:06 -0400 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=1717453085; x=1717539485; bh=U+4bUa03YX gMckMTFtQlN/wCBvRgRnVv4albTvtwVf0=; b=fp+LW3GBr7LgomUOlC5NiVhAPF AphP/6By9i/wgwLpNcadJAuG0rbT5/eEkji9Dp53R1RAwRi16CO6lI/a10waY3yk jOheMrfhaX1zg1XwrBHY/8JNg8k3eZs8xk/d5N0mfzSxTinZbFTPFujA17lzImND QB00NRugdXXd2QNJBa8Cz8KIsI64kANam8YiViUziXjYRfl9QyzBLAgd65S5tJws duXzSOfUdV9NmwwcgKIxeMldYVo1JMwTY4gyP7aISTimoIow/4d9xlX7HrlyX8+J 9O58pwHxnBd9OD2mBcSY4qjkonPxv/33llpXPnHI0/OJzwB1nznjxYM574zw== 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=1717453085; x=1717539485; bh=U+4bUa03YXgMckMTFtQlN/wCBvRg RnVv4albTvtwVf0=; b=Xnb/dWMgGHW5T6m+Bnk3sW9SJ0nFpJo1bYU8u3DJO7eq oPc4yDXs2x3VJ8kSXj6jsf3Tov0hL8IUycJQk9j7AwwO5l0n7h7Jgwd3p/iV/yiT DPPGkaLtma3ZuA3XzEF8xRgMW/N9/45F2mGz3MJeUd9AedNcjkKlhYzX4zFDw0Ms n7/bzTImCd/1FvIHY2gm2byI/71z2Q/+nf9ZoI0MzKBjUBC5HkbV1o6iHWRcmMtU QOSObhwb4hPenv6F6njR9DXuMuNQyF5d4PTGK7ZQPW1gv9wIkv/osiL4M2tERRS4 K+7DLLevGlE/VrgluTARhN9gPw1jzBof8ykNvruKZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelfedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Jun 2024 18:18:04 -0400 (EDT) Date: Tue, 4 Jun 2024 07:17:51 +0900 From: Michael Paquier To: Tom Lane Cc: Xing Guo , pgsql-hackers@lists.postgresql.org Subject: Re: Fix an incorrect assertion condition in mdwritev(). Message-ID: References: <1933.1716695945@sss.pgh.pa.us> <1992.1716696526@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PeBgWm32vyAMMaZt" Content-Disposition: inline In-Reply-To: <1992.1716696526@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --PeBgWm32vyAMMaZt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 26, 2024 at 12:08:46AM -0400, Tom Lane wrote: > After a few minutes' thought, how about: >=20 > Assert((uint64) blocknum + (uint64) nblocks <=3D (uint64) mdnblocks(reln= , forknum)); >=20 > This'd stop being helpful if we ever widen BlockNumber to 64 bits, > but I think that's unlikely. (Partitioning seems like a better answer > for giant tables.) No idea if this will happen or not, but that's not the only area where we are going to need a native uint128 implementation to control the overflows with uint64. What you are suggesting is good enough for me, so I've applied on HEAD a version using that. -- Michael --PeBgWm32vyAMMaZt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmZeQQ8ACgkQnvQgOdby QH1qLw/+KPIqYfxBD1SohW74Wwbeho5iv9JInnZ4LlPpXRLZ48zAvOp0fNQ3aR4U boNx+LP4i8dWlSN9fWUNwIBLPQmoYQIpfs4lrUtflwGAwTf2d+p2tUmN5JCVXKgM EhPfA8Z6XOHIiy2tHV8gTIVDSwxHMJCGZypT02cSdqfikCqG9IGIqNuHBMEfEukC Mo2kYPJZNnjQoIR2xUptBpu0FK9vq/N/fGifHbWjCOwUWiytLyQY7O2rppWWMRCf iKosiql6xH/sJClhNhgexaT94IH5bQ7PWHY1ZbyZG0Bbd0jxKOJiOKQZSJYtDlFT 0mkgSopbKCH59zBxWm+CekY+jEGRSb92cSfg0+a+NX4jXsbgzSlaKsOIyrnpnvUE Kn1Hj9voEzCMfK1D87599lkenTN0GwCULpbuBfTpejBGP6wCjqf4/jgb7UGnK+ih p/xWxktBzQaEqethqoPElTv5j088gM1ZOBVbK5Hjs1066WncOOZuAUkU93S4DCc4 YyXT6jS2MIzGtNKLxfeqaFvUgChL6siUAUXmwIyjKYjDYXEhFfI5K3Noo/QHjEit A4HFRRNserSqZJVSUv3Lt6y1OzJoszPN15UiVqzLWmpkz3zPvttnU5wHRs66KcmM aKDLP7J0gt5k6LFxQ6jaRO68660z2REhSzp+82bQbtH09Ln/WxM= =NnUz -----END PGP SIGNATURE----- --PeBgWm32vyAMMaZt--