pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: Christoph Haller <ch@rodos.fzk.de>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Lock timeout detection in postgres 7.3.1
Date: Thu, 6 Feb 2003 03:14:44 -0800 (PST)
Message-ID: <20030206111444.26314.qmail@web80307.mail.yahoo.com> (raw)
In-Reply-To: <3E423019.E7CC1825@rodos.fzk.de>


--- Christoph Haller <ch@rodos.fzk.de> 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 <some_table> ;
> DELETE n
> 
> T2 (within psql):
> BEGIN; DELETE FROM <some_table> ;
> <waiting forever>
> 
> 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



view thread (7+ messages)  latest in thread

Message-ID: <20030206111444.26314.qmail@web80307.mail.yahoo.com>
Permalink:  ../20030206111444.26314.qmail@web80307.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030206111444.26314.qmail@web80307.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lud_nowhere_man@yahoo.com, ch@rodos.fzk.de
  Subject: Re: Lock timeout detection in postgres 7.3.1
  In-Reply-To: <20030206111444.26314.qmail@web80307.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox