Re: Autovacuum keeps vacuuming a table disabled in pg_autovacuum

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Autovacuum keeps vacuuming a table disabled in pg_autovacuum
Date: 2007-06-01 15:00:12
Message-ID: 20070601150012.GE4503@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik Jones wrote:
> On Jun 1, 2007, at 9:19 AM, Csaba Nagy wrote:
>
> >On Fri, 2007-06-01 at 15:58, Alvaro Herrera wrote:
> >>Try reindexing the table; that should make the problem go away.
> >>Also,
> >>update to the latest of the 8.1 branch ASAP.
> >
> >Reindexing won't work, it would mean hours of downtime. I plan to move
> >the DB to 8.2 via slony in ~2-3 weeks, that should take care of the
> >bloating too.

I meant that reindex would probably fix the "unable to find parent"
problem. I am not sure if the index is permanently corrupt, and so you
need a reindex anyway, or rather it's just that VACUUM is unable to work
with it and you just need to update past 8.1.6 in order for vacuum to be
able to work.

peeks the logs ... Ah, found it:

2006-11-01 16:50 tgl

* src/backend/access/nbtree/: README (1.8.6.1), nbtinsert.c
(1.127.2.2), nbtpage.c (1.88.2.2):

Fix "failed to re-find parent key" btree VACUUM failure by tweaking
_bt_pagedel to recover from the failure: just search the whole parent level
if searching to the right fails. This does nothing for the underlying problem
that index keys became out-of-order in the grandparent level. However, we
believe that there is no other consequence worse than slightly inefficient
searching, so this narrow patch seems like the safest solution for the back
branches.

You don't need to reindex, just update.

> How would reindexing a table imply hours of downtime?

Because reindexing takes an exclusive lock on the table.

> >Regarding upgrade, I have to use the CVS version because I have some
> >local patches to apply. Now what is more recommended, use the latest
> >version on the REL8_1_STABLE branch or stick with REL8_1_9 ? I checked
> >and there are quite a few changed files after REL8_1_9.

HEAD from the branch is certainly better as it contains some extra
fixes (particularly one for a bug introduced in 8.1.9 which may bite you
if you just pick that one ... see about bug #3116)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message gonzales 2007-06-01 15:00:29 Re: Slightly OT.
Previous Message Joshua D. Drake 2007-06-01 14:52:43 Re: Slightly OT.