Re: fix pg_autovacuum

From: Ben Grimm <bengrimm(at)gmail(dot)com>
To: Ben Grimm <bengrimm(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: fix pg_autovacuum
Date: 2005-09-07 04:32:11
Message-ID: f48de3840509062132d18e2ba@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/6/05, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On Tue, Sep 06, 2005 at 06:34:44AM -0500, Ben Grimm wrote:
> > Hi Alvaro,
> >
> > Is there any chance of backporting the integrated version to 8.0? We
> have
> > about 50,000 tables and the autovacuum daemon churns at 100% cpu for
> long
> > stretches... any improvement over that would be welcome.
>
> Nope, about zero. Your best bet seems to be to help on the beta testing
> so 8.1 comes out quickly.

That's alright -- I'll definitely be testing 8.1 when time permits, but
since we only just now upgraded to 8.0... I doubt that any further upgrades
will be in my near future.

But I was thinking about it this morning I ended up writing a replacement in
perl. It follows essentially the same rules that pg_autovacuum does, but
only one db at a time (since that meets my needs) and requires a table to
snapshot stats for the incremental comparisons, and I used a view just to
make the logic a bit simpler. It's been running for 12 hours and my database
is just as vacuumed/analyzed as it ever was, and essentially zero load - so
no complaints here. It's attached if you're interested -- I'm guessing that
it works much the same way as what you've done for 8.1.

-- Ben

Attachment Content-Type Size
autovacuum application/octet-stream 7.6 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2005-09-07 04:43:46 Re: Shared disk storage
Previous Message Tom Lane 2005-09-07 04:19:19 Re: Shared disk storage