ITAGAKI Takahiro wrote:
> Tom Lane <[EMAIL PROTECTED]> wrote:
> > >> Also, I added an experimental feature for btree indexes. It checks
> > >> fragmentation factor of indexes.
> > The really serious problem with reporting this info via NOTICE is that
> > there's no way for a program to get its hands on the info.  The output
> > tuple format needs to be extended instead.
> Ok, I added 'fragmented_percent' field to the output tuple. This
> information will help us to decide when to do REINDEX.
> However, it is only avaliable for btree index presently. Other indexes
> should have equivalent information, but I don't know how to determine it.

BTW while you're handling this, why not change the function to use OUT
parameters instead of having to CREATE TYPE to handle the return type?
I think it is easier to handle ...

One question I had was: in the percentage of fragmentation, is higher
better or lower better?  (I'm guessing lower is better, but this should
be mentioned in the docs)

> BTW, should we change VACUUM VERBOSE in the same way? If we do so,
> autovacuum can handle the reports of VACUUM VERBOSE and plan when to
> do VACUUM FULL, REINDEX and/or CLUSTER using the information.
> Is this worth doing?

You mean having VACUUM VERBOSE return a result set?

Alvaro Herrera                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to