Re: [PATCH] Space reservation v02
От | Robert Haas |
---|---|
Тема | Re: [PATCH] Space reservation v02 |
Дата | |
Msg-id | 603c8f070901310855l31c9dc8dta69f5d16ea09826f@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Space reservation v02 (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: [PATCH] Space reservation v02
Re: [PATCH] Space reservation v02 |
Список | pgsql-hackers |
> Ofcourse, the simplest way to me for handling type changes seems to be > to keep the old type OID reserved and have the new version of the type > with a new OID. Then the entire problem vanishes. But it was decided a > long time ago not to do that. Why was that decision made? Suppose you have a type called widget and you decide it sucks and you want to reimplement it. So in release N+1, you rename the old type to old_shitty_widget and leave it with the same OID, add the new type under the name widget with a different oid, and document that old_shitty_widget should not be used. Then in release N+2 you remove old_shitty_widget altogether. People who upgrade via pg_dump will automatically get the new and improved widget type because that is what is now called widget. But people who in-place upgrade will end up with the old_shitty_widget type. Then you just run some dead simple postupdate script that goes through and issues ALTER TABLE commands to change each old_shitty_widget column to a widget column. ...Robert
В списке pgsql-hackers по дате отправления: