Re: ALTER EXTENSION UPGRADE, v3
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kääriäinen Anssi <anssi.kaariainen@thl.fi>
Cc: Dimitri Fontaine <dimitri@2ndQuadrant.fr>, "David E. Wheeler" <david@kineticode.com>, Robert Haas <robertmhaas@gmail.com>, Josh Berkus <josh@agliodbs.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2011-02-11T19:15:59Z
Lists: pgsql-hackers
=?iso-8859-1?Q?K=E4=E4ri=E4inen_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