Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: "Tom Dunstan" <pgsql(at)tomd(dot)cc>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Bruce Momjian" <momjian(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Date: 2008-04-25 20:53:35
Message-ID: 29202.1209156815@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> On Sat, Apr 26, 2008 at 6:33 AM, Tom Dunstan wrote:
>> I've already suggested some alternatives in the reply to Brendan that
>> would solve some of this, but I suppose another gross-seeming way to
>> stop surprise rewrites would be to never do one unless given a FORCE
>> REWRITE clause on the ALTER statement or something like that, and fail
>> if a rewrite is required not specified.

> That would be okay too, but I think I'd prefer proceeding with the
> rewrite after emitting a NOTICE. If the db admin decides not to go
> ahead, or wait to do it after hours, she can always hit ^C, right?

The more I think about it, the less I think that we want to support such
a feature at all. Consider that it'd require taking a fairly strong
lock (surely at least locking out other writers) on every table using
the enum, in who-knows-what order. The odds of completing without
deadlock seem to be right about nil.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Dunstan 2008-04-25 21:10:06 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Previous Message Brendan Jurd 2008-04-25 20:49:07 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Dunstan 2008-04-25 21:10:06 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Previous Message Brendan Jurd 2008-04-25 20:49:07 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing