Re: Question on REINDEX - Mailing list pgsql-performance

From Tom Lane
Subject Re: Question on REINDEX
Date
Msg-id 22304.1113927842@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question on REINDEX  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Question on REINDEX
List pgsql-performance
Josh Berkus <josh@agliodbs.com> writes:
>> select count(1), sum(relpages) from pg_class where relkind in
>> ('r','i','t')

> Well, if you do that for all databases in the cluster, it's the number you
> start with.  However, setting FSM_pages to that would be assuming that you
> excpected 100% of the rows to be replaced by UPDATES or DELETEs before you
> ran VACUUM.   I generally run VACUUM a little sooner than that.

Not at all.  What it says is that you expect 100% of the pages to have
useful amounts of free space, which is a *much* weaker criterion.

I think you can usually get away with setting max_fsm_pages to less than
your actual disk footprint, but I'm not sure how much less.  It'd
probably depend a lot on your usage pattern --- for instance,
insert-only history tables don't need any FSM space.

            regards, tom lane

pgsql-performance by date:

Previous
From: Richard_D_Levine@raytheon.com
Date:
Subject: Re: How to improve db performance with $7K?
Next
From: "Mohan, Ross"
Date:
Subject: Re: How to improve db performance with $7K?