Re: Add bump memory context type and use it for tuplesorts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add bump memory context type and use it for tuplesorts
Date
Msg-id 3551157.1708132248@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add bump memory context type and use it for tuplesorts  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Responses Re: Add bump memory context type and use it for tuplesorts
List pgsql-hackers
Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
> On 2/17/24 00:14, Tom Lane wrote:
>> The conclusion was that the specific invalid values didn't matter as
>> much on the other platforms as they do with glibc.  But right now you
>> have a fifty-fifty chance that a pointer to garbage will look valid.
>> Do we want to increase those odds?

> Not sure. The ability to detect bogus pointers seems valuable, but is
> the difference between 4/8 and 3/8 really qualitatively different? If it
> is, maybe we should try to increase it by simply adding a bit.

I think it'd be worth taking a fresh look at the bit allocation in the
header word to see if we can squeeze another bit without too much
pain.  There's basically no remaining headroom in the current design,
and it starts to seem like we want some.  (I'm also wondering whether
the palloc_aligned stuff should have been done some other way than
by consuming a context type ID.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: Add pg_basetype() function to obtain a DOMAIN base type
Next
From: vignesh C
Date:
Subject: Re: pg_upgrade and logical replication