It seems that we are going to bump Page Layout Version to version 5 (see CRC patch for detail). Maybe it is good time to do some other changes. There is a list of ideas (please, do not beat me :-). Some of them we discussed in Prato and Greg maybe have more.

1) HeapTupleHeader modification

typedef struct HeapTupleFields
{
        TransactionId t_xmin;           /* inserting xact ID */
        TransactionId t_xmax;           /* deleting or locking xact ID */

        union
        {
                CommandId       t_cid;
                TransactionId   t_xvac;   /* VACUUM FULL xact ID */
        }                       t_field3;
         uint16          t_infomask;
} HeapTupleFields;

typedef struct HeapTupleHeaderData
{
        union
        {
                HeapTupleFields t_heap;
                DatumTupleFields t_datum;
        }                       t_choice;

        ItemPointerData t_ctid;         /* current TID of this or newer tuple */

        /* Fields below here must match MinimalTupleData! */

        uint16          t_infomask2;
        uint8           t_hoff;

        /* ^ - 23 bytes - ^ */

        bits8           t_bits[1];
} HeapTupleHeaderData;

This also requires shuffle flags between infomask and infomask2. infomask2 should have only flag: HASNULL,HASOID,HASVARWIDTH and HASEXTERNAL And minimal tuple does not need infomask field which will contains only transaction hint bits. Unfortunately, structure alligment is not much friendly.

2) Add page type (e.g. btree) and subtype (e.g. metapage) flag into page header. I think It will be useful when we will use share buffer for clog.

3) TOAST modification
  a) TOAST table per attribute
  b) replace chunk id with offset+variable chunk size
  c) add column identification into first chunk

Thats all. I think infomask/infomask2 shuffle flag should be done. TOAST modification complicates in-place upgrade.

                Comments other ideas?

                        Zdenek


--
Zdenek Kotala              Sun Microsystems
Prague, Czech Republic     http://sun.com/postgresql


--
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