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: "Tom Dunstan" <pgsql(at)tomd(dot)cc>
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:48:57
Message-ID: 29036.1209156537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

"Tom Dunstan" <pgsql(at)tomd(dot)cc> writes:
> 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.

If we take OIDs out of the picture it wouldn't be nondeterministic.

I think with something like your 16bit/16bit design, and say ten free
codes between each original assignment, it'd be okay to not support the
rewriting stuff at all. The frequency with which people would hit the
restriction would be so low it wouldn't be worth supporting the code for
it, especially since we couldn't do it any more efficiently than a
manual ALTER COLUMN TYPE replacement would.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2008-04-25 20:49:07 Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Previous Message Kevin Grittner 2008-04-25 20:44:34 Re: Proposed patch - psql wraps at window width