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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A way to let Vacuum warn if FSM settings are low.
Дата
Msg-id 23726.1109205065@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A way to let Vacuum warn if FSM settings are low.  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Ответы Re: A way to let Vacuum warn if FSM settings are low.  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-patches
Ron Mayer <rm_pg@cheapcomplexdevices.com> 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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Ron Mayer
Дата:
Сообщение: A way to let Vacuum warn if FSM settings are low.
Следующее
От: "John Hansen"
Дата:
Сообщение: Re: optimize md5_text