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?







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?
Mon, 22 Apr 2002 12:00:09 +1000
"Nicolas Bazin" <nbazin@ingenico.com.au>
How to know whether a table is locked ?
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, Pennsylvania 19026

Tue, 23 Apr 2002 16:55:57 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: How to know whether a table is locked ?