From: | "Tom Dunstan" <pgsql(at)tomd(dot)cc> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | "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:33:24 |
Message-ID: | ca33c0a30804251333x3b4e0aak9d6af7669bc44879@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Fri, Apr 25, 2008 at 11:57 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> We already support rewriting tables ... (albeit only one at a time, I
> admit. Doing it for more than one can cause deadlocks).
>
> Still, if the user wants to pay the cost, why should we prohibit it?
One scenario I'm not happy about is this: the friendly db admin has
happily added an extra value to the end before and the operation has
been a snap - no rewriting required. But this time either a) oid
wraparound has occurred, b) she's inserted one or c) she's reordered
them. Bam - we start rewriting the entire database. That's not the
kind of surprise I like giving people, and the current situation of
either don't allow updates at all, or the alternative to surprises of
always rewrite everything seem pretty deficient. And I don't want to
only allow updates if they won't cause a rewrite, it's
nondeterministic.
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.
> So the user can create a new enum with the options he
> wants, then rewrite his tables one by one, then drop the original.
They can pretty much do this now, they just need to define an implicit
cast I think.
Cheers
Tom
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2008-04-25 20:34:14 | Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Previous Message | Alvaro Herrera | 2008-04-25 20:20:45 | Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2008-04-25 20:34:14 | Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |
Previous Message | Alvaro Herrera | 2008-04-25 20:20:45 | Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing |