Re: Proposal: In-Place upgrade concept

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: In-Place upgrade concept
Date: 2007-07-04 08:19:13
Message-ID: 20070704081913.GA19129@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 03, 2007 at 09:51:59PM -0400, Tom Lane wrote:
> Out-of-line datums aren't the only issue, either: consider inline
> compressed datums. A data representation change, even one that is known
> not to increase the ordinary uncompressed size of the datum, could
> easily render it slightly less compressible, resulting in a risk that
> the tuple doesn't fit on the page anymore. It hardly seems practical
> (maybe not even possible) to guarantee that this cannot happen.

Does the converted page have to fit into a single page? It's a bit of a
corner-case, there's slack on every page. Wouldn't it be possible to
replace an oversize tuple with a pointer to a new tuple on a new page
(indexes are the problem here).

> So maybe we are up against the conclusion that in-place updates cannot
> support datatype representation changes, at least not for toastable
> datatypes. We could still handle 'em by the expedient suggested
> upthread for user-defined types, ie the "new representation" is treated
> as a whole new type. That's not terribly appetizing though; I had
> expected we could be more efficient for the case of changes in built-in
> types.

Well, it seems to me 99% of cases can be handled easily, we just might
have to have a backup method for the cases where the simple cases
doesn't work...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2007-07-04 08:38:41 Re: Proposal: In-Place upgrade concept
Previous Message Zdenek Kotala 2007-07-04 07:39:25 Re: Proposal: In-Place upgrade concept