Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 15200633799 for ; Sat, 6 Feb 2010 02:12:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 75637-07 for ; Sat, 6 Feb 2010 06:11:38 +0000 (UTC) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by mail.postgresql.org (Postfix) with ESMTP id 42336632FA7 for ; Sat, 6 Feb 2010 02:11:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx3.hub.org (Postfix) with ESMTP id 872A337B687 for ; Sat, 6 Feb 2010 02:11:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o166BbYr014785; Sat, 6 Feb 2010 01:11:37 -0500 (EST) To: Ibrahim Harrani cc: pgsql-admin@postgresql.org Subject: Re: vacuum deadlock In-reply-to: <530068a1002050143n26ee05c6hda0de69f5ed97a9d@mail.gmail.com> References: <530068a1002050143n26ee05c6hda0de69f5ed97a9d@mail.gmail.com> Comments: In-reply-to Ibrahim Harrani message dated "Fri, 05 Feb 2010 11:43:53 +0200" Date: Sat, 06 Feb 2010 01:11:36 -0500 Message-ID: <14784.1265436696@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.258 tagged_above=-10 required=5 tests=AWL=-1.073, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201002/52 X-Sequence-Number: 33655 Ibrahim Harrani writes: > I got a deadlock while vacuuming all databases with vacuumdb command. > vacuumdb: vacuuming of database "mydb" failed: ERROR: deadlock detected > DETAIL: Process 1294 waits for AccessExclusiveLock on relation 2662 of > database ; blocked by process 1807. > Process 1807 waits for AccessShareLock on relation 1259 of database 16389; > blocked by process 1294. vacuumdb -f you mean? An ordinary vacuum wouldn't be trying to take AccessExclusiveLock. It might be that you have an instance of a failure that was identified just a couple weeks ago: http://archives.postgresql.org/pgsql-committers/2010-01/msg00199.php regards, tom lane