Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> writes:
> Hmm, are there any guidelines for choosing these values?
> We have a database with a table into which we insert about 4,000,000
> rows each day, and delete another 4,000,000 rows. The total row count
> is around 40 million, I guess, and the rows are about 150 bytes long.
If you are replacing 10% of the rows in the table every day, then it's
a pretty good bet that every single page of the table contains free
space. Accordingly, you'd better set max_fsm_pages large enough to
have a FSM slot for every page of the table. (1 page = 8Kb normally)
You could possibly get away with a smaller FSM if you do (non-FULL)
vacuums more often than once a day. Some people find they can run
background vacuums without hurting performance too much, some don't
--- I suspect it depends on how much spare disk bandwidth you have.
regards, tom lane