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 ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend