Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3B3916322B9 for ; Tue, 13 Jan 2009 14:03:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 16349-04 for ; Tue, 13 Jan 2009 14:02:57 -0400 (AST) X-Greylist: delayed 00:09:04.441132 by SQLgrey-1.7.6 Received: from mail.int.journyx.com (mail.journyx.com [66.219.41.227]) by mail.postgresql.org (Postfix) with ESMTP id B7926632281 for ; Tue, 13 Jan 2009 14:02:57 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.int.journyx.com (Postfix) with ESMTP id 78ED87E416A for ; Tue, 13 Jan 2009 11:53:39 -0600 (CST) X-Virus-Scanned: amavisd-new at zimbra.int.journyx.com Received: from mail.int.journyx.com ([127.0.0.1]) by localhost (mail.int.journyx.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tIrd3MnAnfNC for ; Tue, 13 Jan 2009 11:53:04 -0600 (CST) Received: from whitneys (dhcp-100-188.int.journyx.com [192.168.100.188]) by mail.int.journyx.com (Postfix) with ESMTP id 80E667E4FD8 for ; Tue, 13 Jan 2009 11:35:55 -0600 (CST) From: "Scott Whitney" To: Subject: Strange deadlock error last night Date: Tue, 13 Jan 2009 11:37:00 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: Acl1pYlkQkof6OSiRQawWzgqH1nd9w== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Message-Id: <20090113173555.80E667E4FD8@mail.int.journyx.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200901/34 X-Sequence-Number: 31081 I'm about to begin researching this, but I thought I'd throw this out there and see if there are any quick responses. Last night, I got this: Jan 13 03:31:28 db01 postgres[23537]: [140-2] DETAIL: Process 23537 waits for AccessShareLock on relation 1260 of database 0; blocked by process 22228. Jan 13 03:31:28 db01 postgres[23537]: [140-3] Process 22228 waits for AccessShareLock on relation 1262 of database 0; blocked by process 6816. Jan 13 03:31:28 db01 postgres[23537]: [140-4] Process 6816 waits for AccessShareLock on relation 1260 of database 0; blocked by process 14624. Jan 13 03:31:28 db01 postgres[23537]: [140-5] Process 14624 waits for AccessExclusiveLock on relation 1260 of database 0; blocked by process 23537. Jan 13 03:31:28 db01 postgres[14624]: [243-1] ERROR: deadlock detected Jan 13 03:31:28 db01 postgres[14624]: [243-2] DETAIL: Process 14624 waits for AccessExclusiveLock on relation 1260 of database 0; blocked by process 22228. Jan 13 03:31:28 db01 postgres[14624]: [243-3] Process 22228 waits for AccessShareLock on relation 1262 of database 0; blocked by process 6816. Jan 13 03:31:28 db01 postgres[14624]: [243-4] Process 6816 waits for AccessShareLock on relation 1260 of database 0; blocked by process 14624. Jan 13 03:31:28 db01 postgres[6816]: [54-1] ERROR: deadlock detected Jan 13 03:31:29 db01 postgres[6816]: [54-2] DETAIL: Process 6816 waits for AccessShareLock on relation 1260 of database 0; blocked by process 22228. Jan 13 03:31:29 db01 postgres[6816]: [54-3] Process 22228 waits for AccessShareLock on relation 1262 of database 0; blocked by process 6816. Here's what the procs were doing at the time, according to the logs: ** Jan 12 03:32:08 db01 postgres[22228]: [279-1] WARNING: skipping "pg_database" --- only table or database owner can vacuum it ** Jan 12 03:33:42 db01 postgres[14624]: [242-1] WARNING: skipping "pg_database" --- only table or database owner can vacuum it Jan 13 03:30:36 db01 postgres[23537]: [139-1] WARNING: skipping "pg_authid" --- only table or database owner can vacuum it Jan 13 03:31:25 db01 postgres[6816]: [53-1] WARNING: skipping "pg_auth_members" --- only table or database owner can vacuum it ** Note that procs 14624 and 22228 do not appear on the same day at the same time. I have no record of any pg logging of those processes other than what you see above. That, unfortunately, doesn't necessarily tell me anything. It ended up locking up about 250 customer databases until I restarted the postmaster. This is version 8.1.4. Upgrading right now (even to a minor rev) is not really an option. This box has been up and running for 306 days. This postgres level has been installed for..err...well...at least Aug 9, 2006, based on some dates in the directories. I can't determine what "database 0" is. It's not a datid. I'm assuming it's a relative number based on what was going on at the time. We're running auto-vacuum, as we have been for years. A full vacuum happens every Saturday night. Any clever ideas? Requests for more information? Thanks in advance! Scott Whitney Journyx, Inc.