From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: singletons per row in table AND locking response |
Date: | 2009-07-10 23:46:50 |
Message-ID: | 20090710234650.GQ5407@samason.me.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Scot Kreienkamp | 2009-07-11 00:40:28 | Re: Idle in transaction help |
Previous Message | Erik Jones | 2009-07-10 23:39:00 | Re: [Fwd: Re: How to trace client sql requests?] |