X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6B4F2D1B1B0 for ; Wed, 30 Jun 2004 12:43:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34370-09 for ; Wed, 30 Jun 2004 15:43:40 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A3174D1B1D2 for ; Wed, 30 Jun 2004 12:43:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5UFhdBh009420; Wed, 30 Jun 2004 11:43:39 -0400 (EDT) To: Litao Wu Cc: pgsql-performance@postgresql.org Subject: Re: reindex and copy - deadlock? In-reply-to: <20040630150816.96381.qmail@web13121.mail.yahoo.com> References: <20040630150816.96381.qmail@web13121.mail.yahoo.com> Comments: In-reply-to Litao Wu message dated "Wed, 30 Jun 2004 08:08:16 -0700" Date: Wed, 30 Jun 2004 11:43:38 -0400 Message-ID: <9419.1088610218@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/325 X-Sequence-Number: 7383 Litao Wu writes: > It happened again. > This time it hangs when we drop/create index. > Here is gdb info with --enable-debug postgres. Well, that pretty much removes all doubt: something has left the buffer context lock (cntx_lock) set on a buffer that certainly ought to be free. The problem here is that REINDEX (or CREATE INDEX in this case) is the victim, not the perpetrator, so we still don't know exactly what's causing the error. We need to go backwards in time, so to speak, to identify the code that's leaving the buffer locked when it shouldn't. I don't offhand have a good idea about how to do that. Is there another process that is also getting stuck when REINDEX does (if so please get a backtrace from it too)? BTW, what Postgres version are you using again? The line numbers in your trace don't square with any current version of bufmgr.c ... regards, tom lane