Search Postgresql Archives

Re: Autovacuum Improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux