From: | Carlos Benkendorf <carlosbenkendorf(at)yahoo(dot)com(dot)br> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Row level locking |
Date: | 2005-10-12 11:56:36 |
Message-ID: | 20051012115636.74002.qmail@web35502.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)fuhr(dot)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!
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2005-10-12 12:10:59 | Re: PostgreSQL 8.1 vs. MySQL 5.0? |
Previous Message | Ivan Pavlov | 2005-10-12 11:35:52 | Re: error in SELECT from store procedure |