X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 05E314758FE for ; Tue, 11 Feb 2003 22:01:04 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 0DD6C475843 for ; Tue, 11 Feb 2003 22:01:02 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h1C30t224373; Tue, 11 Feb 2003 22:00:55 -0500 (EST) From: Bruce Momjian Message-Id: <200302120300.h1C30t224373@candle.pha.pa.us> Subject: Re: Lock timeout detection in postgres 7.3.1 In-Reply-To: <3E438A7D.1020103@klaster.net> To: Tomasz Myrta Date: Tue, 11 Feb 2003 22:00:55 -0500 (EST) Cc: Christoph Haller , pgsql-sql@postgresql.org, shariq77@yahoo.com, lud_nowhere_man@yahoo.com X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/232 X-Sequence-Number: 11630 Tomasz Myrta wrote: > Christoph Haller wrote: > > > 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@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073