Re: case for lock_timeout - Mailing list pgsql-general

From Rajesh Kumar Mallah
Subject Re: case for lock_timeout
Date
Msg-id 40E38964.8090301@trade-india.com
Whole thread Raw
In response to Re: case for lock_timeout  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: case for lock_timeout  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:

><mallah@trade-india.com> writes:
>
>
>>I feel lock_timeout it will be a nice feature . Lemme know what would be
>>the solution of the above problem from existing set of  features.
>>
>>
>
>AFAICS statement_timeout would work just fine for that; or you could
>use NOWAIT.
>
>

ok, you mean we should put statement timeout with statements
that potentially lock table exclusively. eg



OTHER SQLS 1....
set statement_timeout = <some reasonable time>
DROP TABLE table_name;
set statement_timeout = 0;
OTHER SQLS 2....


BTW does drop table or alter table have any other reasons
to timeout other than waiting for a lock ? In former case
the query will get cancelled for an invalid reason.


Regds
mallah.

>            regards, tom lane
>
>
>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems restarting after database crashed (signal 11).
Next
From: "Scott Marlowe"
Date:
Subject: Re: Query inside transaction