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.96) (envelope-from ) id 1vzbBL-0019J0-2U for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Mar 2026 14:02:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vzbBK-00GcOi-0e for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Mar 2026 14:02:02 +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.96) (envelope-from ) id 1vzbBJ-00GcOZ-0w for pgsql-hackers@lists.postgresql.org; Mon, 09 Mar 2026 14:02:02 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vzbBE-00000001IDE-3AcD for pgsql-hackers@postgresql.org; Mon, 09 Mar 2026 14:02:00 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 721147A00C0; Mon, 9 Mar 2026 10:01:55 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 09 Mar 2026 10:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding: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=1773064915; x=1773151315; bh=9auZgBhrys3N/6qER89q80XQKlcSFIPlHQiitlGlIT8=; b= rcDaYhZeOR2UsVYYxcwd1LYU4o0FkBy/7VWURleGdP7zf/lAaRtyjh3CtuaYaYbH 9PnrdjePEHFsfCn+s/EV/rmi5sQnzJrdMkGCRLkDyKOiJKSx7WI1Inkyfqrv3rpM 6Vclx4biUEb1FlxmMsZ/tu8gxhk8DjgPxhRIrLV7iOSPH0Lk0+LJn0V4rOfYvQhB CMDvR3ZklccqhSjlKBrQApmTA6bx6U4ShnRZUR7fOxpjlYUnYhF9WNEr/095fXYm Xfj3yHbDUQ3EAWGuaTiYlrhXXQM32tRUi24vo74cCgmr7bLVqf5cdoX2mSM4ToD6 4+hKnLfIWCnduNy80W6reA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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-sender:x-me-sender:x-sasl-enc; s=fm1; t=1773064915; x= 1773151315; bh=9auZgBhrys3N/6qER89q80XQKlcSFIPlHQiitlGlIT8=; b=N oJxpUdMC3WVl9M5C1mpIsn2vS4TaKRU31QbQLLhd5S6F4qMQAe5liyR0O7j+wZgX sqpdJ5sR4jtNDO4vq8yD09i2CY+mQdLYh/TNhGlkBiywuyzmjKplU6VxrOA1rkcR WPYsAA+KKEqHFdvLqD/CU15EKVVLyLLCcIm+8qj0cDu/mLpnvaWeA0IaGLDriaii ONs5Q5qrACuMk8sL3JzBq5Dl4l1NmKifNwTf+VUZmLDzrvGWaLXd88wbj8JqzxcK SPH4kKmxS/iVcDFvmFO96cunQiRqzD5I9j+eO6+5OBo1ElhaOBIn11Cv4oA/lyY1 d6Elrx7D1r7IxaB9fSLLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvjeekvdelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggugfgjsehtkefstddttdejnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedtleelvdfgjedvffeiueekfeeuleffhfegfffhgfffkeevueehieehhfei gffhvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohephedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtoheprgihuhhshhhtihifrghrihdrshhlghdtudesgh hmrghilhdrtghomhdprhgtphhtthhopehhthgrmhhfihgushesghhmrghilhdrtghomhdp rhgtphhtthhopehordgrlhgvgigrnhgurhgvrdhfvghlihhpvgesghhmrghilhdrtghomh dprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhr ghdprhgtphhtthhopehtohhmrghssehvohhnughrrgdrmhgv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Mar 2026 10:01:54 -0400 (EDT) Date: Mon, 9 Mar 2026 10:01:53 -0400 From: Andres Freund To: Greg Sabino Mullane Cc: Tomas Vondra , Alexandre Felipe , Ayush Tiwari , pgsql-hackers@postgresql.org Subject: Re: tid_blockno() and tid_offset() accessor functions Message-ID: References: <57388743-e380-4145-8b77-86ed23b062de@vondra.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-03-09 09:34:46 -0400, Greg Sabino Mullane wrote: > On Sun, Mar 8, 2026 at 3:31 PM Tomas Vondra wrote: > > > No opinion. For displaying the bogus TID value (like "(-1,0)") it's > > probably OK to show values that are a bit weird. If anything, we should > > be more careful on input, it's too late for tid_block() to decide what to > > do with an "impossible" TID value. > > > > This one doesn't sit right with me. I think it's not too late. No reason > why tid_block cannot be stricter here than tid itself and complain. Other > than that, the patch looks good to me. I don't see any advantage in that. These functions are useful for inspecting tid values that come from some source. When would you *ever* gain *anything* from not being able to see the block / offset of a tid datum that you already have? This isn't an end user focused type / set of accessor functions were being particularly careful about input validation will perhaps prevent users from making mistakes... Greetings, Andres Freund