Re: pgstattuple extension for indexes - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: pgstattuple extension for indexes
Date
Msg-id 20060724142628.GE5223@surnet.cl
Whole thread Raw
In response to Re: pgstattuple extension for indexes  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: pgstattuple extension for indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
ITAGAKI Takahiro wrote:
> Tom Lane <tgl@sss.pgh.pa.us> 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                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allow commenting of variables in postgresql.conf to - try 4
Next
From: Tom Lane
Date:
Subject: Re: patch implementing the multi-argument aggregates (SOC project)