Re: Autovacuum Improvements - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Autovacuum Improvements
Date
Msg-id 20061220034311.GA3036@alvh.no-ip.org
Whole thread Raw
In response to Re: Autovacuum Improvements  (Glen Parker <glenebob@nwlink.com>)
List pgsql-general
Glen Parker wrote:
> Alvaro Herrera wrote:
> >Glen Parker wrote:
> >
> >>I'd also like to use some of this information to issue reindex and
> >>cluster commands only when they're needed.  In fact, on days when I
> >>cluster, there's no need whatsoever to also vacuum those tables.  This
> >>is something that autovacuum won't do at all.
> >
> >Well, I'd rather fix CLUSTER so that it reports that there are currently
> >no dead tuples in the table.  This should be an easy patch that, hey,
> >maybe you could contribute ;-)
>
> I knew that would come up eventually :D.  Believe me, I'd love to dig
> in, but I haven't had a postgres dev tree on my system in years and I
> don't have any time for it right now.  (But there's always time to
> banter in the mailing list, right? :-) )

Heh :-)

> Actually what I meant was that autovacuum will always just vacuum.  In
> some cases I'd rather it cluster instead.  But on that note, it would
> also be madly useful to give CLUSTER the ability to ANALYZE as well.

Well, the problem is that CLUSTER takes an exclusive lock.  That's a
no-no for an automatic job I think.

On doing an ANALYZE in conjunction with the CLUSTER, that's would be
certainly interesting, but it'd require that we refactor ANALYZE so as
to be able to "reuse" another scan.  It would be nice to do it anyway
and allow it to reuse VACUUM's scan as well, so that it doesn't have to
do a separate one.  (And it would also be nicer because it'd would be
able to determine n_distinct more accurately, which is something people
often wish for.)

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

pgsql-general by date:

Previous
From: Glen Parker
Date:
Subject: Re: Autovacuum Improvements
Next
From: "Matt Burry"
Date:
Subject: Re: postgres kerberos how to