Re: [PATCHES] TRUNCATE TABLE with IDENTITY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] TRUNCATE TABLE with IDENTITY
Дата
Msg-id 4909.1212942366@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] TRUNCATE TABLE with IDENTITY  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> 2. I had first dismissed Neil's idea of transactional sequence updates
>> as impossible, but on second look it could be done.  Suppose RESTART
>> IDENTITY does this for each sequence;
>>
>> * obtain AccessExclusiveLock;
>> * assign a new relfilenode;
>> * insert a sequence row with all parameters copied except
>> last_value copies start_value;
>> * hold AccessExclusiveLock till commit.

> Hmm, this kills the idea of moving sequence data to a single
> non-transactional catalog :-(

Well, there are a number of holes in our ideas of how to do that anyway.
But offhand I don't see why we couldn't distinguish regular heap_update
from update_in_place on single rows within a catalog.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: TODO, FAQs to Wiki?
Следующее
От: "Nathan Boley"
Дата:
Сообщение: Proposal - improve eqsel estimates by including histogram bucket numdistinct statistics