PG_PAGE_LAYOUT_VERSION 5 - time for change

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема PG_PAGE_LAYOUT_VERSION 5 - time for change
Дата
Msg-id 490A0E92.7070202@sun.com
обсуждение исходный текст
Ответы Re: PG_PAGE_LAYOUT_VERSION 5 - time for change  (Gregory Stark <stark@enterprisedb.com>)
Re: PG_PAGE_LAYOUT_VERSION 5 - time for change  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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
xactID */
 
        union        {                CommandId       t_cid;                TransactionId   t_xvac;   /* VACUUM FULL
xactID */        }                       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
identificationinto 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martin Pihlak
Дата:
Сообщение: Re: contrib/pg_stat_statements
Следующее
От: Gregory Stark
Дата:
Сообщение: Updated posix fadvise patch v19