Re: singletons per row in table AND locking response

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: singletons per row in table AND locking response
Дата
Msg-id 20090710234650.GQ5407@samason.me.uk
обсуждение исходный текст
Ответ на singletons per row in table AND locking response  (Dennis Gearon <gearond@sbcglobal.net>)
Список pgsql-general
On Tue, Jul 07, 2009 at 06:45:36PM -0700, Dennis Gearon wrote:
> When locking is involved, does a transaction wait for access to a row
> or table, or does it just fail back to the calling code? Would it be
> up to my PHP code to keep hammeing for access to a row/table, or could
> a user defined function do that?

It defaults to waiting for the lock to be released, but will fail if you
tell it to.  Sounds as though you want to be using row-level locks,
it will allow more concurrency where possible, but table level locks
are also possible.  PG also makes a distinction between "share" locks
(multiple transactions can have a share lock on any table or row) and
"update" locks (this locks out share and other update locks).

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: [Fwd: Re: How to trace client sql requests?]
Следующее
От: "Scot Kreienkamp"
Дата:
Сообщение: Re: Idle in transaction help