Re: Mail getting through? Short varlena headers - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Mail getting through? Short varlena headers
Date
Msg-id 87ire2q9ry.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Mail getting through? Short varlena headers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: buildfarm failure in XML code
Next
From: "Pavan Deolasee"
Date:
Subject: Re: HOT for PostgreSQL 8.3