On 2015-02-18 21:00:43 -0500, Tom Lane wrote:
> Michael Paquier <michael.paqu...@gmail.com> writes:
> > 3) heapam.c in three places with HeapTupleHeaderData:
> >         struct
> >         {
> >                 HeapTupleHeaderData hdr;
> >                 char            data[MaxHeapTupleSize];
> >         }                       tbuf;
> 
> And this, though I'm not sure if we'd have to change the size of the
> padding data[] member.

I don't think so.
/*
 * MaxHeapTupleSize is the maximum allowed size of a heap tuple, including
 * header and MAXALIGN alignment padding.  Basically it's BLCKSZ minus the
 * other stuff that has to be on a disk page.  Since heap pages use no
 * "special space", there's no deduction for that.
...
#define MaxHeapTupleSize  (BLCKSZ - MAXALIGN(SizeOfPageHeaderData + 
sizeof(ItemIdData)))

> > 5) reorderbuffer.h with its use of HeapTupleHeaderData:
> 
> Hmm.  Andres will have to answer for that one ;-)

That should be fairly uncomplicated to replace.
...
        /* tuple, stored sequentially */
        HeapTupleData tuple;
        HeapTupleHeaderData header;
        char            data[MaxHeapTupleSize];

probably can just be replaced by a union of data and header part - as
quoted above MaxHeapTupleSize actually contains space for the
header. It's a bit annoying because potentially some output plugin might
reference .header - but they can just be changed to reference
tuple.t_data instead.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to