Re: NOLOGGING option, or ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: NOLOGGING option, or ?
Дата
Msg-id 21427.1117665152@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: NOLOGGING option, or ?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: NOLOGGING option, or ?  (Simon Riggs <simon@2ndquadrant.com>)
Re: NOLOGGING option, or ?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> One idea would be to look at the table file size first.  If it has zero
> blocks, lock the table and if it still has zero blocks, do the no-WAL
> copy.

I think that's a bad idea.  It would make the behavior unpredictable
--- sometimes a COPY will take an exclusive lock, and other times not;
and the reason why is at a lower semantic level than the user is
supposed to know about.

Before you say "this is not important", consider the nontrivial risk
that the stronger lock will cause a deadlock failure.  I don't think
that it's acceptable for lock strength to be unpredictable.
        regards, tom lane


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

Предыдущее
От: "Luke Lonergan"
Дата:
Сообщение: Re: NOLOGGING option, or ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: NOLOGGING option, or ?