From: Tom Lanyon <tom+pgsql-admin@oneshoeco.com>
To: pgsql-admin@postgresql.org
Subject: PD_ALL_VISIBLE flag set - autovacuum ignoring dead tuples
Date: Wed, 3 Aug 2011 23:53:28 +0930
Message-ID: <FFACCBE3-2D6F-4C90-B3D0-B1A2ACD85BA5@oneshoeco.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tom+pgsql-admin@oneshoeco.com
Subject: Re: PD_ALL_VISIBLE flag set - autovacuum ignoring dead tuples
In-Reply-To: <FFACCBE3-2D6F-4C90-B3D0-B1A2ACD85BA5@oneshoeco.com>
References: <FFACCBE3-2D6F-4C90-B3D0-B1A2ACD85BA5@oneshoeco.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox