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-22 01:59:04
Message-ID: ZTSB6JcPcpta3AGc@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

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.

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

Only you can decide what is important to you.

Attachment Content-Type Size
varlena_short.diff text/x-diff 2.3 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message jian he 2023-10-22 15:37:32 opclass. See below for details. cannot found the "below".
Previous Message Bruce Momjian 2023-10-22 01:56:13 Re: The documentation for storage type 'plain' actually allows single byte header

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-10-22 02:04:15 Re: Guiding principle for dropping LLVM versions?
Previous Message Bruce Momjian 2023-10-22 01:56:13 Re: The documentation for storage type 'plain' actually allows single byte header