Re: How to know whether a table is locked ? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: How to know whether a table is locked ?
Date
Msg-id 200204232055.g3NKtvV17981@candle.pha.pa.us
Whole thread Raw
In response to How to know whether a table is locked ?  ("Nicolas Bazin" <nbazin@ingenico.com.au>)
List pgsql-hackers
Nicolas Bazin wrote:
> I read a thread about table lock timeout but don't know whether
> anything has been done about it.
> 
> Here is what I'd like to do:  I don't want my transactions to
> be on hold for too long so I'd like to use a syntax I use on
> INFORMIX already:  SET LOCK MODE TO [WAIT [second] | NOT WAIT]
> I'm using ecpg and I think I'm up to make a patch to it to
> support the WAIT [second] with the asynchronous functions but
> I need a way to know whether a statement would lock from the
> back-end to implement the NOT WAIT.  Is there a way?

We are discussing a SET timeout parameter that would do something
similar.  However, it will not be done until 7.3, at the earliest.  The
only solution right now would be to do an alarm() and issue a query
cancel after the alarm sounds.

-- Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Documentation on page files
Next
From: Peter Eisentraut
Date:
Subject: Re: "make report"