Re: Basic locking question

Поиск
Список
Период
Сортировка
От Ben
Тема Re: Basic locking question
Дата
Msg-id 431E2572.9030004@silentmedia.com
обсуждение исходный текст
Ответ на Re: Basic locking question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Basic locking question  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Right, I understand the badness of the situation, but unfortunately the
keys are externally generated and I have no control over them.

So I'm looking for "lock <tablename> in exclusive mode"?

Tom Lane wrote:

>Pretty much the only thing you can do about that is to take an exclusive
>table-level lock.  This is simple but pretty awful for concurrency
>(since the lock blocks everyone else from inserting ANY key, not only
>the one you are inserting).
>
>Consider using a sequence object to generate the keys, instead.
>
>            regards, tom lane
>
>


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Basic locking question
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: SLOOOOOOOW