Re: ALTER EXTENSION UPGRADE, v3

From: marcin mank <marcin(dot)mank(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kääriäinen Anssi <anssi(dot)kaariainen(at)thl(dot)fi>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER EXTENSION UPGRADE, v3
Date: 2011-02-12 01:55:57
Message-ID: AANLkTimvXuHt6ef+tu5wfpNBJWPdt-3z91q+_j_=3j5+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 11, 2011 at 8:15 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> =?iso-8859-1?Q?K=E4=E4ri=E4inen_Anssi?= <anssi(dot)kaariainen(at)thl(dot)fi> writes:
>> This has the side effect that you can also have downgrade scripts. I
>> don't know if this is designed or just coincidental, so thought it
>> would be worth mentioning.
>> The worst case is that if you are upgrading from 1.2 to 2.0 the path
>> is 1.2 -> 1.1 -> 2.0, even if there exists a path 1.2 -> 1.8 -> 1.9 ->
>> 2.0. This could potentially result in data loss, if the downgrade
>> drops some columns or something like that.
>
> Hmm.  That seems like it would require a rather pathological collection
> of upgrade scripts.  In particular why would you have a one-step upgrade
> from 1.1 to 2.0 but no short path from 1.2?
>

Say we have 20 versions, with up- and downgrade scripts between
consecutive versions, and a fast path from 5 to 20.
if we are at version 6, it would go 6->5->20. if 6->5 drops a table,
we`re in trouble.

Greetings
Marcin Mańk

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2011-02-12 02:02:06 Re: Careful PL/Perl Release Not Required
Previous Message Greg Stark 2011-02-12 01:17:36 Re: Debian readline/libedit breakage