Re: Using multi-row technique with COPY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using multi-row technique with COPY
Дата
Msg-id 9120.1133292628@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using multi-row technique with COPY  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Using multi-row technique with COPY  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> One idea for default behavior would be to use EXCLUSIVE when the table
> is zero size.  I think that would do pg_dump and most of the user cases,
> and of course users could override the default by using a keyword.  We
> could emit a NOTICE if an an exclusive lock is used without an EXCLUSIVE
> keyword.  One problem I see is that there is no way to insure zero size
> without a lock that blocks other writers.  Is that reliable?

No, and if you try to upgrade your lock after checking, you create a
deadlock problem.

Something that would probably be reasonable, and require *no* weird new
syntax, is to shortcut in a COPY into a table created in the current
transaction.  I believe we still keep a flag in the relcache indicating
whether that's the case ...
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Using multi-row technique with COPY
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Using multi-row technique with COPY