"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> Gregory Stark <gsstark@mit.edu> writes:
>> In it I said that removing the 2-byte cases had no advantages but actually
>> since then I've thought of one. It makes the toaster code simpler since it can
>> just set a bit in the four-byte header just as it does now. It doesn't have to
>> worry about converting to a 2-byte header.
>
> Run that by me again? A toast pointer datum ought to have a 1-byte
> header, since its only twenty-something bytes long.
I was referring to compressed inline data.
By not having inline compressed data be 2-byte headers it eliminates having to
check a lot of corner cases and reduces the changes in tuptoaster.c since it
means pg_lzcompress can return a normal 4-byte header and nobody has to
convert it to a 2-byte header.
So I am doing that for now. I suspect we'll never get around to reintroducing
2-byte headers, but we could if we wanted to. It would be a small change
everywhere else but an annoying bunch of fiddly changes in tuptoaster.c.
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com