Re: Debugging deadlocks

From: frank(at)joerdens(dot)de
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Guy Rouillier <guyr(at)masergy(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Debugging deadlocks
Date: 2005-03-30 20:59:52
Message-ID: 20050330205952.GB22569@mail.archi-me-des.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Mar 27, 2005 at 01:37:44AM -0700, Michael Fuhr wrote:
[]
> The current implementation supports only
> exclusive row-level locks (SELECT FOR UPDATE), but I think Alvaro
> might be working on shared row-level locks for a future release.

Hmm ... are you saying that SELECT FOR UPDATE exquires an exclusive lock
on the row in question in the sense that it conflicts with other
*readers* trying to access that row? The documentation would appear to
say otherwise:

-- snip --
Row-level locks do not affect data querying; they block writers to the
same row only. To acquire a row-level lock on a row without actually
modifying the row, select the row with SELECT FOR UPDATE.
-- snap --

(from: http://www.vitavoom.com/postgresql-docs/explicit-locking.html)

and

-- snip --
A row-level lock on a specific row is automatically acquired when the
row is updated (or deleted or marked for update). The lock is held until
the transaction commits or rolls back. Row-level locks do not affect
data querying; they block writers to the same row only.
-- snap --

(from: http://www.postgresql.org/docs/7.4/static/explicit-locking.html)

but then I don't understand the original poster's problem at all, since
his queries are only *reading* the referenced tables??

Regards,

Frank

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message phil campaigne 2005-03-30 21:24:54 Re: Restore to a database with another name?
Previous Message phil campaigne 2005-03-30 20:58:02 Re: Restore to a database with another name?