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

Re: [PATCH] Space reservation v02

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(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 21:21:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Jan 31, 2009, at 2:44 PM, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com 
 > wrote:

> Robert Haas wrote:
>> 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.
> Altering column type with ALTER TABLE needs to exclusively-lock and  
> rewrite the whole table, so you might as well pg_dump+restore that  
> table.

Not at all.  Lots of DDL operations take table locks, but they're  
still a lot more convenient than dump+restore. Think dependencies.

A stickier wicket is how to handle functions and views that depend on  
the old type, so maybe this isn't quite as clean as I thought.


In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2009-01-31 22:08:15
Subject: Re: foreign_data test fails with non-C locale
Previous:From: Heikki LinnakangasDate: 2009-01-31 20:41:26
Subject: Re: Hot standby, recovery infra

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