Re: The documentation for storage type 'plain' actually allows single byte header

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, suchithjn22(at)gmail(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: The documentation for storage type 'plain' actually allows single byte header
Date: 2023-10-31 13:10:56
Message-ID: ZUD84FfPPWv2A-ip@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Sat, Oct 21, 2023 at 09:59:04PM -0400, Bruce Momjian wrote:
> On Sat, Oct 21, 2023 at 09:56:13PM -0400, Bruce Momjian wrote:
> > I did some more research. It turns out that the source slot/planSlot is
> > populating its pg_attribute information via makeTargetEntry() and it
> > has no concept of a storage type.
> >
> > Digging further, I found that we cannot get rid of the the use of
> > att->attstorage != TYPSTORAGE_PLAIN in macros ATT_IS_PACKABLE and
> > VARLENA_ATT_IS_PACKABLE macros in src/backend/access/common/heaptuple.c
> > because there are internal uses of fill_val() that can't handle packed
> > varlena headers.
> >
> > I ended up with a doc patch that adds a C comment about this odd
> > behavior and removes doc text about PLAIN storage not using packed
> > headers.
>
> Oops, patch attached.

Patch applied to all supported versions.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2023-10-31 14:21:50 Re: 'value' has special behaviour in alter system
Previous Message PG Doc comments form 2023-10-31 12:41:13 ^@ operator vs start_with function

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-10-31 13:26:01 Re: Document parameter count limit
Previous Message Bruce Momjian 2023-10-31 12:51:48 Re: [PATCH] postgresql.conf.sample comment alignment.