Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 108E4B5DBE0 for ; Wed, 3 Aug 2011 11:50:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 06304-07 for ; Wed, 3 Aug 2011 14:50:19 +0000 (UTC) X-Greylist: delayed 00:26:45.812359 by SQLgrey-1.7.6 Received: from mail.adl-na.netspot.com.au (mail.adl-na.netspot.com.au [203.30.161.27]) by mail.postgresql.org (Postfix) with ESMTP id E4D02B5DBDB for ; Wed, 3 Aug 2011 11:50:18 -0300 (ADT) Received: from cookie-v711.netspot.com.au (unknown [192.160.71.129]) by mail.adl-na.netspot.com.au (Postfix) with ESMTP id BFC34E8195 for ; Wed, 3 Aug 2011 23:55:18 +0930 (CST) Received: from shared-mta-prod-nodea.adl-pu.netspot.com.au (shared-mta-prod-nodea.adl-pl.netspot.com.au [10.229.2.153]) by cookie-v711.netspot.com.au (Postfix) with ESMTP id 8BA08D4D040 for ; Wed, 3 Aug 2011 23:53:29 +0930 (CST) Received: from dhcp-248-34.net.adl-na.netspot.com.au (plaza-lb1-mip102.netspot.com.au [10.229.2.9]) (Authenticated sender: tom@oneshoeco.com) by shared-mta-prod-nodea.adl-pu.netspot.com.au (Postfix) with ESMTPA id 1D8F838588 for ; Wed, 3 Aug 2011 23:54:56 +0930 (CST) From: Tom Lanyon Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: PD_ALL_VISIBLE flag set - autovacuum ignoring dead tuples Date: Wed, 3 Aug 2011 23:53:28 +0930 Message-Id: To: pgsql-admin@postgresql.org Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/42 X-Sequence-Number: 38029 I'm seeing a heavy-update TOAST table which is not being effectively = autovacuum'd on 8.4.5. The stats collector shows n_dead_tup growing = very quickly, and autovacuum runs frequently, but never removes any dead = tuples. A manual vacuum does find many dead tuples (90+ % of the table) = to remove, and removes them properly. Whilst debugging, I found that there seems to be a large amount of the = old 'PD_ALL_VISIBLE incorrectly set...' warnings emitted during the = autovacuum run. My immediate assumption was that PD_ALL_VISIBLE is set on the page, and = so autovacuum skips it. However, from what I can see in = lazy_scan_heap(), all of the clean-up actually happens before we even = check the PD_ALL_VISIBLE flag and emit this warning. Can anyone confirm = that this is a warning message only, and shouldn't actually cause = autovacuum to skip pruning dead tuples? Am I seeing two different or related issues here? Thanks, Tom p.s. I'm aware there was a change to PD_ALL_VISIBLE in 8.4.8 but that = was to stop warning on a non-issue, so I don't believe it's the same.