Re: Lock timeout detection in postgres 7.3.1

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tomasz Myrta <jasiek(at)klaster(dot)net>
Cc: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>, pgsql-sql(at)postgresql(dot)org, shariq77(at)yahoo(dot)com, lud_nowhere_man(at)yahoo(dot)com
Subject: Re: Lock timeout detection in postgres 7.3.1
Date: 2003-02-12 03:00:55
Message-ID: 200302120300.h1C30t224373@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tomasz Myrta wrote:
> Christoph Haller wrote:
> <cut>
> > Yupp, I agree.
> > But from former DBMS I was dealing with,
> > I know this SET TIMEOUT called feature, which if properly set
> > terminated processes like that hanging on T2.
> > Is there something comparable within Postgres?
>
> PostgreSQL 7.3 Documentation
> 3.4. Run-time Configuration
> STATEMENT_TIMEOUT (integer)
> Aborts any statement that takes over the specified number of milliseconds. A value of zero turns off the timer.
> DEADLOCK_TIMEOUT (integer)
> This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition
>
>
> In this case I suppose 2 things:
> - table has a lot of records and you should just wait to finish operation.
> - another query locked the table and it is realy a deadlock

One of the uses of STATEMENT_TIMEOUT is to allow a LOCK or query to fail
if it doesn't complete in a short time. We don't have a special timer
to say if we are waiting on a lock for a specified time --- just a
query-level timer.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2003-02-12 03:46:15 Re: What is wrong with this identification configuration?
Previous Message Wei Weng 2003-02-12 02:45:49 Re: What is wrong with this identification configuration?