Re: ALTER EXTENSION UPGRADE, v3
Marcin Mańk <marcin.mank@gmail.com>
From: marcin mank <marcin.mank@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kääriäinen Anssi <anssi.kaariainen@thl.fi>, 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-12T01:55:57Z
Lists: pgsql-hackers
On Fri, Feb 11, 2011 at 8:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > =?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. >> 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