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

Prototype: In-place upgrade

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Prototype: In-place upgrade
Date: 2008-08-31 21:44:02
Message-ID: 48BB10A2.60503@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Attached patch is prototype of in-place upgrade as was presented on PGCon this year.

Main idea is to learn postgres to handle different version of page and tuple 
structures.

1) page - Patch contains new page API and all code access page through this API. 
Functions check page version and return correct data to caller. It is mostly 
complete now. Only ItemId flags need finish.

2) tuple - HeapTuple structure has been extended with t_ver attribute which 
contains page layout version and direct access to HeapTupleHeader is forbidden. 
It is possible now only through HeapTuple* functions (see htup.c). 
(HeapTupleHeader access still stays in a several functions like heap_form_tuple).

This patch version still does not allow to read old database, but it shows how 
it should work. Main disadvantage of this approach is performance penalty.

Please, let me know your opinion about this approach.

Future work:
1) learn WAL to process different tuple structure version
2) tuple conversion to new version and put it into executor (ExecStoreTuple)
3) multiversion MaxItemSize constant

		thanks for your comments Zdenek


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


Attachment: upgrade.patch.gz
Description: application/x-gzip (58.5 KB)

Responses

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2008-08-31 21:55:21
Subject: Is this really really as designed or defined in some standard
Previous:From: Radek StrnadDate: 2008-08-31 21:32:30
Subject: WIP patch: Collation support

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