Re: [WIP] In-place upgrade - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: [WIP] In-place upgrade
Date
Msg-id 20081105220739.GC3531@svana.org
Whole thread Raw
In response to Re: [WIP] In-place upgrade  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: [WIP] In-place upgrade  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On Wed, Nov 05, 2008 at 09:41:52PM +0000, Gregory Stark wrote:
> "Robert Haas" <robertmhaas@gmail.com> writes:
>
> >> Problem is how to move tuple from page to another and keep indexes in sync.
> >> One solution is to perform some think like "update" operation on the tuple.
> >> But you need exclusive lock on the page and pin counter have to be zero. And
> >> question is where it is safe operation.
> >
> > But doesn't this problem go away if you do it in a transaction?  You
> > set xmax on the old tuple, write the new tuple, and add index entries
> > just as you would for a normal update.
>
> But that doesn't actually solve the overflow problem on the old page...

Sure it does. You move just enough tuples that you can convert the page
without an overflow.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: [WIP] In-place upgrade
Next
From: "Kevin Grittner"
Date:
Subject: RAM-only temporary tables