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

2023-01-15 Thread Andres Freund
Hi, On 2023-01-15 16:49:01 -0800, Andres Freund wrote: > I don't see how we can fix this mess entirely without tracking the storage > type a lot more widely. Most importantly in targetlists, as we use the > targetlists to compute the tupledescs of executor nodes, which then influence > where we bu

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

2023-01-15 Thread Andres Freund
Hi, On 2023-01-15 18:41:22 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2023-01-15 18:08:21 -0500, Tom Lane wrote: > >> ri_newTupleSlot has the tupdesc we want, planSlot is a virtual slot > >> that has the bogus tupdesc, and for some reason heap_form_tuple is > >> getting called with pla

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

2023-01-15 Thread Tom Lane
Andres Freund writes: > On 2023-01-15 18:08:21 -0500, Tom Lane wrote: >> ri_newTupleSlot has the tupdesc we want, planSlot is a virtual slot >> that has the bogus tupdesc, and for some reason heap_form_tuple is >> getting called with planSlot's tupdesc not ri_newTupleSlot's. > The way we copy a s

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

2023-01-15 Thread Andres Freund
Hi, On 2023-01-15 18:08:21 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2023-01-15 16:40:27 -0500, Tom Lane wrote: > >> The documentation is correct, what is broken is the code. I'm not > >> sure when we broke it > > > I've not thought through this fully. But after a first look, this mi

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

2023-01-15 Thread Tom Lane
Andres Freund writes: > On 2023-01-15 16:40:27 -0500, Tom Lane wrote: >> The documentation is correct, what is broken is the code. I'm not >> sure when we broke it > I've not thought through this fully. But after a first look, this might be > hard to fix without incuring a lot of overhead / comp

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

2023-01-15 Thread Andres Freund
Hi, On 2023-01-15 16:40:27 -0500, Tom Lane wrote: > The documentation is correct, what is broken is the code. I'm not > sure when we broke it Looks to be an old issue, predating the slot type stuff. It reproduces at least as far back as 10. I've not thought through this fully. But after a first

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

2023-01-15 Thread Tom Lane
Laurenz Albe writes: > On Tue, 2023-01-10 at 15:53 +, PG Doc comments form wrote: >>> PLAIN prevents either compression or out-of-line storage; furthermore it >>> disables use of single-byte headers for varlena types. This is the only >>> possible strategy for columns of non-TOAST-able data ty