Re: How to know whether a table is locked ?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: How to know whether a table is locked ?
Дата
Msg-id 200204232055.g3NKtvV17981@candle.pha.pa.us
обсуждение исходный текст
Ответ на How to know whether a table is locked ?  ("Nicolas Bazin" <nbazin@ingenico.com.au>)
Список 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 по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Documentation on page files
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: "make report"