From: Tomasz Zielonka To: PostgreSQL bugs Date: Mon, 3 Sep 2001 06:55:57 +0200 Mail-Followup-To: Tomasz Zielonka , PostgreSQL bugs User-Agent: Mutt/1.2i Hi! Platform: PostgreSQL 7.1.3, Linux 2.4.8, egcs 2.91.66 PostgreSQL forgets to release lock until shutdown in this scenario: CREATE TABLE dummy (X integer); session1 session2 ------------------------------------------------------------ BEGIN; | |BEGIN; SELECT * FROM dummy; | |SELECT * FROM dummy; LOCK TABLE dummy; | |LOCK TABLE dummy; deadlock.... \q \q Deadlock is OK here, but I can't access dummy table until I restart postmaster Subject: Re: [BUGS] Error in backend/storage/lmgr/proc.c: ProcSleep() From: Tom Lane To: Tomasz Zielonka cc: PostgreSQL bugs Date: Mon, 03 Sep 2001 22:37:11 -0400 Comments: In-reply-to Tomasz Zielonka message dated "Mon, 03 Sep 2001 06:55:57 +0200" Tomasz Zielonka writes: > Platform: PostgreSQL 7.1.3, Linux 2.4.8, egcs 2.91.66 > PostgreSQL forgets to release lock until shutdown in this scenario: Good catch! This has been broken since 7.1 ... surprising that no one discovered the problem sooner. I think that rather than removing the early-deadlock-detection code as you suggest, it's better to make it work correctly. I have applied a patch that allows RemoveFromWaitQueue() to be used, so that the recovery path is the same as if HandleDeadLock had been invoked. regards, tom lane