Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwAWP-0004sy-Gg for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2022 22:39:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nwAWO-0000dj-90 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2022 22:39:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwAWN-0000da-US for pgsql-hackers@lists.postgresql.org; Tue, 31 May 2022 22:39:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwAWL-0003Z0-0y for pgsql-hackers@lists.postgresql.org; Tue, 31 May 2022 22:39:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24VMdNrJ355851; Tue, 31 May 2022 18:39:23 -0400 From: Tom Lane To: Robert Haas cc: Thomas Munro , Kyotaro Horiguchi , Justin Pryzby , PostgreSQL Hackers Subject: Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485) In-reply-to: References: <20220519193839.GT19626@telsasoft.com> <208993.1652994963@sss.pgh.pa.us> <20220520.120014.1649415417205853644.horikyota.ntt@gmail.com> <321315.1654027805@sss.pgh.pa.us> <331489.1654031367@sss.pgh.pa.us> <347628.1654033929@sss.pgh.pa.us> <351605.1654035253@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 31 May 2022 18:29:14 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <355849.1654036763.1@sss.pgh.pa.us> Date: Tue, 31 May 2022 18:39:23 -0400 Message-ID: <355850.1654036763@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Tue, May 31, 2022 at 6:14 PM Tom Lane wrote: >> However, now that I've corrected that mistaken image ... I wonder if >> it could make sense to redefine relptr as self-relative? That ought >> to provide some notational savings since you'd only need to carry >> around the relptr's own address not that plus a base address. >> Probably not something to consider for v15 though. > I think that would be pretty hard to make work, since copying around a > relative pointer would change its meaning. Code like "relptr_foo x = > *y" would be broken, for example, but the compiler would not complain. Sure, but the current definition is far from error-proof as well: nothing stops you from using the wrong base address with a relptr's value. Anyway, it's just idle speculation at this point. regards, tom lane