Re: ALTER EXTENSION UPGRADE, v3

Поиск
Список
Период
Сортировка
От Kääriäinen Anssi
Тема Re: ALTER EXTENSION UPGRADE, v3
Дата
Msg-id BC19EF15D84DC143A22D6A8F2590F0A76606140B95@EXMAIL.stakes.fi
обсуждение исходный текст
Ответ на Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
________________________________________
From: pgsql-hackers-owner@postgresql.org [pgsql-hackers-owner@postgresql.org] On Behalf Of Tom Lane [tgl@sss.pgh.pa.us]
Sent: Friday, February 11, 2011 7:35 PM
To: Dimitri Fontaine
Cc: David E. Wheeler; Robert Haas; Josh Berkus; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] ALTER EXTENSION UPGRADE, v3

"We will add logic to find a chain of update scripts leading from oldv to
v, in case that exact combination is not available in the extension's
script directory.  (NOTE: maybe in the CREATE ... FROM case, it would be
a better idea to not do that search, but insist on finding exactly
extname-oldv-v.sql?  That would provide at least a little bit of extra
protection against wrong FROM choice.  Not sure how much it helps
though.)

Version strings will have no hard-wired semantics except equality; we
don't need a sorting rule."

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. It can have some impact on how to find the update chain to the
desiredversion (loops in the graph), although standard graph traversal algorithms should handle this just fine. The
worstcase 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.

All this can of course be avoided by documenting that even if it is possible to define downgrade script, don't do it...
- AnssiPS. I hope this mail comes out somewhat sanely formatted, using our lovely OWA-webmail here...


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

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