Re: TRUNCATE SERIALIZABLE and frozen COPY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TRUNCATE SERIALIZABLE and frozen COPY
Дата
Msg-id 12670.1352478461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TRUNCATE SERIALIZABLE and frozen COPY  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: TRUNCATE SERIALIZABLE and frozen COPY  (Robert Haas <robertmhaas@gmail.com>)
Re: TRUNCATE SERIALIZABLE and frozen COPY  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 9 November 2012 15:34, Kevin Grittner <kgrittn@mail.com> wrote:
>> If we're not talking about making conflicts with other transactions
>> behave just the same as an unqualified DELETE from a user
>> perspective, I'm not sure what the goal is, exactly.

> Reasonable question.

> My goal is to allow COPY to load frozen tuples without causing MVCC violations.

If that's the goal, I question why you're insisting on touching
TRUNCATE's behavior.  We already have the principle that "TRUNCATE is
like DELETE except not concurrent-safe".  Why not just invent a
non-concurrent-safe option to COPY that loads prefrozen tuples into a
new heap, and call it good?  There will be visibility oddness from that
definition, sure, but AFAICS there will be visibility oddness from what
you're talking about too.  You'll just have expended a very great deal
of effort to make the weirdness a bit different.  Even if the TRUNCATE
part of it were perfectly clean, the "load prefrozen tuples" part won't
be --- so I'm not seeing the value of changing TRUNCATE.
        regards, tom lane



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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: TRUNCATE SERIALIZABLE and frozen COPY
Следующее
От: Robert Haas
Дата:
Сообщение: Re: TRUNCATE SERIALIZABLE and frozen COPY