Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485)
Date
Msg-id CA+hUKGLVL8M3rpOOsxw_CryyV5Fys+evfsRG9VA6u9_USmG3FQ@mail.gmail.com
Whole thread Raw
In response to Re: pg15b1: FailedAssertion("val > base", File: "...src/include/utils/relptr.h", Line: 67, PID: 30485)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Jun 23, 2022 at 2:09 AM Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Jun 22, 2022 at 12:34 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> > > For the record, the third idea proposed was to use 1 for the first
> > > byte, so that 0 is reserved for NULL and works with memset(0).  Here's
> > > an attempt at that.
> >
> > ... erm, though, duh, I forgot to adjust Assert(val > base).  One more time.
>
> I like this idea and think this might have the side benefit of making
> it harder to get away with accessing relptr_off directly.

Thanks.  Pushed, and back-patched to 14, where
min_dynamic_shared_memory arrived.

I wondered in passing if the stuff about relptr_declare() was still
needed to avoid confusing pgindent, since we tweaked the indent code a
bit for macros that take a typename, but it seems that it still
mangles "relptr(FooBar) some_struct_member;", putting extra whitespace
in front of it.  Hmmph.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Support logical replication of DDLs
Next
From: Masahiko Sawada
Date:
Subject: Re: Postgres do not allow to create many tables with more than 63-symbols prefix