X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EA67D474E44 for ; Thu, 6 Feb 2003 06:14:42 -0500 (EST) Received: from web80307.mail.yahoo.com (web80307.mail.yahoo.com [66.218.79.23]) by postgresql.org (Postfix) with SMTP id 483D8474E42 for ; Thu, 6 Feb 2003 06:14:42 -0500 (EST) Message-ID: <20030206111444.26314.qmail@web80307.mail.yahoo.com> Received: from [203.87.150.116] by web80307.mail.yahoo.com via HTTP; Thu, 06 Feb 2003 03:14:44 PST Date: Thu, 6 Feb 2003 03:14:44 -0800 (PST) From: Ludwig Lim Subject: Re: Lock timeout detection in postgres 7.3.1 To: Christoph Haller Cc: PostgreSQL Mailing List In-Reply-To: <3E423019.E7CC1825@rodos.fzk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/111 X-Sequence-Number: 11509 --- Christoph Haller wrote: > > I'm working on > PostgreSQL 7.2.3 on hppa-hp-hpux10.20, compiled by > GCC 2.95.2 > and found a similar behaviour. > > T1 (within psql): > BEGIN; DELETE FROM ; > DELETE n > > T2 (within psql): > BEGIN; DELETE FROM ; > > > The documentation says (within Server Runtime > Environment) > 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 or not. The > If I get this right, the T2 psql process should > terminate within one > second, shouldn't it? > The postgresql.conf file is as it was right after > the installation > #deadlock_timeout = 1000 > > So, I doubt this a bug, but still, there must be a > misunderstanding or > something else > I don't know about. Could someone please enlighten > us. > I don't think there is a deadlock in the example given above. If I'm not mistaken a deadlock occurs if both transactions are waiting for each other to release the lock (i.e T1 waits for T2 to release locks/resources while T2 is also waiting for T1 to release locks/resources. In the above example, T1 doesn't wait for T2 to do something before finishes the transaction (Only T2 is waiting for T1 to finish), hence the condition for deadlock is not met. ludwig. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com