pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Prototype: In-place upgrade
3+ messages / 2 participants
[nested] [flat]

* Prototype: In-place upgrade
@ 2008-08-31 21:44  Zdenek Kotala <Zdenek.Kotala@Sun.COM>
  0 siblings, 1 reply; 3+ messages in thread

From: Zdenek Kotala @ 2008-08-31 21:44 UTC (permalink / raw)
  To: 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

Attachments:

  upgrade.patch.gz (application/x-gzip, 58.5K) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Prototype: In-place upgrade
@ 2008-09-04 21:15  Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  parent: Zdenek Kotala <Zdenek.Kotala@Sun.COM>
  0 siblings, 1 reply; 3+ messages in thread

From: Heikki Linnakangas @ 2008-09-04 21:15 UTC (permalink / raw)
  To: Zdenek Kotala <Zdenek.Kotala@Sun.COM>; +Cc: pgsql-hackers

The patch seems to be missing the new htup.c file.

Zdenek Kotala wrote:
> 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


-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Prototype: In-place upgrade
@ 2008-09-05 09:20  Zdenek Kotala <Zdenek.Kotala@Sun.COM>
  parent: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Zdenek Kotala @ 2008-09-05 09:20 UTC (permalink / raw)
  To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>; +Cc: pgsql-hackers

Heikki Linnakangas napsal(a):
> The patch seems to be missing the new htup.c file.

Upps, I'm sorry I'm going to fix it and I will send new version asap.

	Zdenek


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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-09-05 09:20 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-08-31 21:44 Prototype: In-place upgrade Zdenek Kotala <Zdenek.Kotala@Sun.COM>
2008-09-04 21:15 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2008-09-05 09:20   ` Zdenek Kotala <Zdenek.Kotala@Sun.COM>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox