Re: PG_PAGE_LAYOUT_VERSION 5 - time for change

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PG_PAGE_LAYOUT_VERSION 5 - time for change
Дата
Msg-id 28973.1225408489@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PG_PAGE_LAYOUT_VERSION 5 - time for change  (Zdenek Kotala <Zdenek.Kotala@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  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> 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;

This is unworkable (hint: the compiler will decide sizeof the struct
must be a multiple of 4).  I am also frightened to death of the proposal
to swap various bits around between infomask and infomask2 --- that is
*guaranteed* to break code silently.  And you didn't explain exactly
what it buys, anyway.  Not space savings in the Datum form; alignment
issues will prevent that.

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

I think this is a pretty bad idea, because it'll eat space on every page
for data that is only useful to indexes.  I don't believe that clog will
find it interesting either.  To share buffers with clog will require
a change in buffer lookup tags, not buffer contents.

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

I don't like 3a any more than Greg does.  3b sounds good until you
reflect that a genuinely variable chunk size would preclude random
access to sub-ranges of a toast value.  A column ID might be worth
adding for robustness purposes, though reducing the toast chunk payload
size to make that possible will cause you fits for in-place upgrade.
        regards, tom lane


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

Предыдущее
От: "David Rowley"
Дата:
Сообщение: Re: TABLE command
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: PG_PAGE_LAYOUT_VERSION 5 - time for change