Re: [PATCH] Space reservation v02

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, 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 19:56:26
Message-ID: 4984ACEA.6060007@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
>> 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.

Yeah, that works. The other approach is to convert the data types along
with the new page format. That works too, and avoids having to keep
around the old type and all that deprecation and stuff.

I don't remember any hard decision on that, and we're not facing any
data type changes in this release IIRC. It is something we should
consider on a case-by-case basis when we get there. There might be
reasons to do it like that, if for example the old format can't be
converted to new format in a non-lossy fashion (e.g. float-timestamps ->
integer-timestamps). And authors of 3rd party data types are naturally
free to do what they want.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2009-01-31 20:32:37 Re: pgevent warnings on mingw
Previous Message Heikki Linnakangas 2009-01-31 19:44:43 Re: [PATCH] Space reservation v02