Search Postgresql Archives

Re: [PATCHES] A way to let Vacuum warn if FSM settings are low.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ron Mayer <rm_pg@xxxxxxxxxxxxxxxxxxxxxxx> 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 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux