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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing
Дата
Msg-id 29036.1209156537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing  ("Tom Dunstan" <pgsql@tomd.cc>)
Ответы Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing  ("Tom Dunstan" <pgsql@tomd.cc>)
Список pgsql-hackers
"Tom Dunstan" <pgsql@tomd.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Proposed patch - psql wraps at window width
Следующее
От: "Brendan Jurd"
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Update: < * Allow adding enumerated values to an existing