Re: ALTER EXTENSION UPGRADE, v3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kääriäinen Anssi <anssi(dot)kaariainen(at)thl(dot)fi>
Cc: 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-11 19:15:59
Message-ID: 15959.1297451759@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?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.

Yeah, that's intentional and IMO worth supporting.

We do have to be sure that the chain-finding algorithm doesn't choke on
loops in the graph, but AFAICS Dijkstra's algorithm doesn't have a
problem with that. As long as we consider that each step has positive
cost, it won't execute a loop.

> 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?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-02-11 19:16:20 Re: Range Types: empty ranges
Previous Message Robert Haas 2011-02-11 19:14:36 Re: Range Types: empty ranges