Re: Save a few bytes in pg_attribute

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Save a few bytes in pg_attribute
Date: 2023-03-21 20:11:46
Message-ID: 20230321201146.yukskxrfsmb5n6jj@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-03-21 15:26:38 -0400, Tom Lane wrote:
> Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> writes:
> > ... with that patch we actually don't need the attcacheoff in the
> > pg_atttribute struct: it only needs to be present in the derived
> > "TupleAttrAlignData" structs which carry the
> > length/alignment/storage/byval info.
>
> Yeah, I was wondering about that too: keeping attcacheoff as local
> state in slots might get us all its win without so much conceptual
> dirtiness.

It's also the place where it's the least likely to help - afaict attcacheoff
is only really beneficial for fastgetattr(). Which conditions it's use more
strictly - not only can there not be any NULLs before the accessed column,
there may not be any NULLs in the tuple at all.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2023-03-21 20:18:35 Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Previous Message Matthias van de Meent 2023-03-21 20:02:08 Re: Save a few bytes in pg_attribute