Re: ALTER EXTENSION UPGRADE, v3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER EXTENSION UPGRADE, v3
Дата
Msg-id 15959.1297451759@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER EXTENSION UPGRADE, v3  (Kääriäinen Anssi <anssi.kaariainen@thl.fi>)
Ответы Re: ALTER EXTENSION UPGRADE, v3  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: ALTER EXTENSION UPGRADE, v3  (marcin mank <marcin.mank@gmail.com>)
Список pgsql-hackers
Kääriäinen Anssi <anssi.kaariainen@thl.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Range Types: empty ranges
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Range Types: empty ranges