Re: [WIP] In-place upgrade

From: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [WIP] In-place upgrade
Date: 2008-11-05 13:38:41
Message-ID: 0C0FFDB7-9E62-49AB-8BA7-842D2B1F375A@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I don't think this really qualifies as "in place upgrade" since it
would mean creating a whole second copy of all your data. And it's
only online got read-only queries too.

I think we need a way to upgrade the pages in place and deal with any
overflow data as exceptional cases or else there's hardly much point
in the exercise.

greg

On 5 Nov 2008, at 07:32 AM, "Robert Haas" <robertmhaas(at)gmail(dot)com> wrote:

>> An old page which never goes away. New page formats are introduced
>> for a
>> reason -- to support new features. An old page lying around
>> indefinitely means
>> some pages can't support those new features. Just as an example,
>> DBAs may be
>> surprised to find out that large swathes of their database are
>> still not
>> protected by CRC checksums months or years after having upgraded to
>> 8.4 (or
>> even 8.5 or 8.6 or ...). They would certainly want a way to ensure
>> all their
>> data is upgraded.
>
> OK, I see your point. In the absence of any old snapshots,
> convert-on-write allows you to forcibly upgrade the whole table by
> rewriting all of the tuples into new pages:
>
> UPDATE table SET col = col
>
> In the absence of page expansion, you can put logic into VACUUM to
> upgrade each page in place.
>
> If you have both old snapshots that you can't get rid of, and page
> expansion, then you have a big problem, which I guess brings us back
> to Heikki's point.
>
> ...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-11-05 14:01:58 Re: Synchronous replication patch v1
Previous Message Simon Riggs 2008-11-05 13:27:14 Re: Re: Hot standby v5 patch - restarted replica changes to warm standby mode