Re: Row level locking - Mailing list pgsql-general

From Carlos Benkendorf
Subject Re: Row level locking
Date
Msg-id 20051012115636.74002.qmail@web35502.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Row level locking  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Row level locking  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
List pgsql-general
We have applications that are sometimes locked by a long time application and I would like to avoid these by coding something to discover if the rows are locked before working with them.
 
Both applications use only inserts in a table with a primary key.
 
I´m sure that it is not the rigth approach, but I could not figure something better. Any suggestions?
 
Benkendorf
 

Michael Fuhr <mike@fuhr.org> escreveu:
On Wed, Oct 12, 2005 at 04:11:00AM +0000, Carlos Benkendorf wrote:
> How can I know which rows are locked?

There's no query that says "show me all rows that are locked"; even
if there was, it would be out of date by the time you got the
results. PostgreSQL 8.1 will enhance pg_locks to show tuple locks
in certain cases but it won't show all tuple locks.

Why do you want to know? What are you trying to do?

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Promoção Yahoo! Acesso Grátis: a cada hora navegada você acumula cupons e concorre a mais de 500 prêmios! Participe!

pgsql-general by date:

Previous
From: Ivan Pavlov
Date:
Subject: Re: error in SELECT from store procedure
Next
From: Andrew Sullivan
Date:
Subject: Re: PostgreSQL 8.1 vs. MySQL 5.0?