Skip site navigation (1) Skip section navigation (2)

PG_PAGE_LAYOUT_VERSION 5 - time for change

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: PG_PAGE_LAYOUT_VERSION 5 - time for change
Date: 2008-10-30 19:44:18
Message-ID: 490A0E92.7070202@sun.com (view raw or flat)
Thread:
Lists: 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 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


Responses

pgsql-hackers by date

Next:From: Gregory StarkDate: 2008-10-30 20:02:50
Subject: Updated posix fadvise patch v19
Previous:From: Jason LongDate: 2008-10-30 19:07:40
Subject: Re: Decreasing WAL size effects

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group