From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Zdenek Kotala <Zdenek(dot)Kotala(at)sun(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Space reservation v02 |
Date: | 2009-01-31 16:55:48 |
Message-ID: | 603c8f070901310855l31c9dc8dta69f5d16ea09826f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Grzegorz Jaskiewicz | 2009-01-31 16:56:32 | Re: adding stuff to parser, question |
Previous Message | Grzegorz Jaskiewicz | 2009-01-31 16:46:26 | adding stuff to parser, question |