Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 2DBB3687EC6 for ; Tue, 22 Jun 2010 11:48:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 43621-05 for ; Tue, 22 Jun 2010 14:48:07 +0000 (UTC) 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 mail.postgresql.org (Postfix) with ESMTP id 016C8687EC3 for ; Tue, 22 Jun 2010 11:48:06 -0300 (ADT) 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 o5MEm4tt001495; Tue, 22 Jun 2010 10:48:04 -0400 (EDT) To: Uwe Bartels cc: pgsql-admin@postgresql.org Subject: Re: blocking automatic vacuum In-reply-to: References: Comments: In-reply-to Uwe Bartels message dated "Tue, 22 Jun 2010 15:36:44 +0200" Date: Tue, 22 Jun 2010 10:48:03 -0400 Message-ID: <1494.1277218083@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/156 X-Sequence-Number: 34934 Uwe Bartels writes: > last ween i've seen a blocking "automatic vacuum". > as i understood, this is not supposed to happen. in the past i saw vacuum > processes disappear, in case of the need of a lock. What that sounds like is it was an anti-wraparound vacuum. Autovacuum won't cancel those to avoid delaying other processes. Now, RowExclusiveLock doesn't conflict with an autovacuum, so there is more going on here than you've showed us. The other obvious question is how did you get to the point where an anti-wraparound vacuum became necessary. I speculate that you are doing something that does conflict with vacuum (ie, SHARE UPDATE EXCLUSIVE lock or higher), and are doing it so often that regular autovacuum runs on the table never manage to complete. This is very bad, because you're going to have a serious bloat problem if autovac keeps getting canceled. You need to look at what sort of DDL you are repetitively executing on that table, and find a way to do it a lot less often. regards, tom lane