Re: Short varlena headers and arrays - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Short varlena headers and arrays
Date
Msg-id 87ps86ngie.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Short varlena headers and arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Short varlena headers and arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>> Once this is done it may be worth having arrays convert to short varlenas as
>> well.
>
> Elements of arrays are not subject to being toasted by themselves, so
> I don't think you can make that work.  At least not without breaking
> wide swaths of code that works fine today.

You think it's more likely there are places that build arrays and then read
the items back without passing through detoast than there are places that
build tuples and do so?



Btw I ran into some problems with system tables. Since many of them are read
using the GETSTRUCT method and in that method the first varlena field should
be safely accessible, i would have to not skip the alignment for the first
varlena field in system tables. Instead I just punt on all system tables. The
only one that seems like it'll be loss on is pg_statistic and there the
biggest problem is the space wasted inside the arrays, not before the varlena
fields.

Also, int2vector and oidvector don't expect to be toasted so I've skipped them
as well. If we want to have an escape hatch they would have to be so marked.
For now I just hard coded them.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Multiple Storage per Tablespace, or Volumes
Next
From: Magnus Hagander
Date:
Subject: Re: Multiple Storage per Tablespace, or Volumes