On Wed, 2005-02-23 at 19:31 -0500, Tom Lane wrote:
> Ron Mayer <[EMAIL PROTECTED]> writes:
> > + if (needed > MaxFSMPages)
> > + ereport(WARNING,
> > + (errmsg("max_fsm_pages(%d) is smaller than total pages
> > needed(%.0f)",
> > + MaxFSMPages, needed)));
> An unconditional WARNING seems a bit strong to me for a case that is not
> necessarily wrong. Depending on the needs of the installation, this
> might be a perfectly acceptable situation --- for example if you have
> lots of large read-mostly tables.
The patch seems very useful to me. I had been thinking about doing
something like that myself.
VACUUM uses an INFO to provide the "total pages needed", so it should be
a simple matter to change the ereport to an INFO rather than WARNING as
It would be great to have both lines of INFO, so that VACUUM would
produce output like this:
INFO: free space map: 77 relations, 470 pages stored
INFO: max_fsm_pages(1601) is smaller than total pages needed(2832)
DETAIL: Allocated FSM size: 100 relations + 1601 pages = 19 kB shared
...where the second info line was conditional...like this...
+ if (numRels == MaxFSMRelations)
+ (errmsg("max_fsm_relations(%d) may be set too low",
+ if (needed > MaxFSMPages)
+ (errmsg("max_fsm_pages(%d) is smaller than total pages
+ MaxFSMPages, needed)));
(errmsg("free space map: %d relations, %d pages stored;
%.0f total pages needed",
Which goes more towards Tom's gripes.
The manual could have a line added to explain that if max_fsm_relations
is set too low, then max_fsm_pages may also inadvertently be too low,
yet not be obvious that that is the case.
Best Regards, Simon Riggs
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?