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.

On the other side of the coin, the test could pass (ie no warning) in
situations where in fact MaxFSMPages is too small, because what we are
comparing it to is the number of pages requested for relations that are
being tracked.  If MaxFSMRelations is too small then we can't really
tell whether MaxFSMPages is adequate.

> +    if (numRels > MaxFSMRelations)
> +        ereport(WARNING,
> +            (errmsg("max_fsm_relations(%d) is smaller than the number of 
> relations (%d)",
> +             MaxFSMRelations, numRels)));

This part is just plain dead code, since it's not possible for numRels
to exceed MaxFSMRelations.

I think it might be useful to warn when numRels == MaxFSMRelations,
since if you don't have even one spare fsmrel slot then you probably
have too few (it's unlikely you got it on the nose).  But I don't know
how to produce a warning about MaxFSMPages that's worth anything.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to