How to know whether a table is locked ?

From: "Nicolas Bazin" <nbazin(at)ingenico(dot)com(dot)au>
To: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: How to know whether a table is locked ?
Date: 2002-04-22 02:00:09
Message-ID: 004101c1e9a1$6eb55ab0$660d090a@software.ingenico.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-04-22 02:11:44 Re: commands subdirectory continued -code cleanup
Previous Message Tatsuo Ishii 2002-04-22 01:27:23 Re: failed regression tests