Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] Space reservation v02

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: (view raw, whole thread or download thread mbox)
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.


In response to


pgsql-hackers by date

Next:From: Grzegorz JaskiewiczDate: 2009-01-31 16:56:32
Subject: Re: adding stuff to parser, question
Previous:From: Grzegorz JaskiewiczDate: 2009-01-31 16:46:26
Subject: adding stuff to parser, question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group