Re: PostgreSQL transaction locking problem - Mailing list pgsql-general

From Tom Lane
Subject Re: PostgreSQL transaction locking problem
Date
Msg-id 17713.1012676299@sss.pgh.pa.us
Whole thread Raw
In response to PostgreSQL transaction locking problem  ("Jeff Martin" <jeff@dgjc.org>)
Responses Re: PostgreSQL transaction locking problem  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
"Jeff Martin" <jeff@dgjc.org> writes:
> LOCK TABLE Test IN EXCLUSIVE MODE;

> /* This function should be able to operate concurrently BUT CANNOT */

How you figure that?  EXCLUSIVE lock is clearly documented to be
self-conflicting; so only one process can hold it at a time.  See
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/locking-tables.html

If concurrency is important I'd suggest generating your ID values using
a sequence generator, rather than trying to build your own
implementation.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: OUTER JOIN is not yet supported
Next
From: "Jeff Martin"
Date:
Subject: Indices for foreign keys