Re: automatic REINDEX-ing - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: automatic REINDEX-ing
Date
Msg-id 20080813205347.GB4672@alvh.no-ip.org
Whole thread Raw
In response to Re: automatic REINDEX-ing  (Tino Wildenhain <tino@wildenhain.de>)
List pgsql-general
Tino Wildenhain escribió:

> Which makes me think if the solution would be to just run CLUSTER under
> the hood when VACUUM FULL is requested. Would that introduce any
> other problems?

The difference is that CLUSTER requires double the disk space in table +
indexes.  VACUUM FULL has no such requirement.

A possibly approach would be to do an ANALYZE (to have fresh stats about
dead tuple density), and do a CLUSTER if the density is too high.

There has been talk about rewriting VACUUM FULL anyway; it's complex
code and it introduces extra complications in other parts of code that
would be otherwise unneeded, e.g. HOT.  I have no idea what a rewritten
VACUUM FULL would look like, though.

Another thing we should do in this area is rewrite CLUSTER to use a
seqscan + sort instead of indexscan when the heap/index order
correlation is low.

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

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: PostgreSQL and SVN - help me...
Next
From: David Siebert
Date:
Subject: Re: 8.3.1 Vs 8.3.3