New GUC autovacuum_max_threshold ?

Поиск
Список
Период
Сортировка
От Frédéric Yhuel
Тема New GUC autovacuum_max_threshold ?
Дата
Msg-id 956435f8-3b2f-47a6-8756-8c54ded61802@dalibo.com
обсуждение исходный текст
Ответы Re: New GUC autovacuum_max_threshold ?  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
Hello,

I would like to suggest a new parameter, autovacuum_max_threshold, which 
would set an upper limit on the number of tuples to delete/update/insert 
prior to vacuum/analyze.

A good default might be 500000.

The idea would be to replace the following calculation :

vacthresh = (float4) vac_base_thresh + vac_scale_factor * reltuples;

with this one :

vacthresh = (float4) vac_base_thresh + vac_scale_factor * reltuples / (1 
+ vac_scale_factor * reltuples / autovacuum_max_threshold)

(and the same for the others, vacinsthresh and anlthresh).

The attached graph plots vacthresh against pgclass.reltuples, with 
default settings :

autovacuum_vacuum_threshold = 50
autovacuum_vacuum_scale_factor = 0.2

and

autovacuum_max_threshold = 500000 (the suggested default)

Thus, for small tables, vacthresh is only slightly smaller than 0.2 * 
pgclass.reltuples, but it grows towards 500000 when reltuples → ∞

The idea is to reduce the need for autovacuum tuning.

The attached (draft) patch further illustrates the idea.

My guess is that a similar proposal has already been submitted... and 
rejected 🙂 If so, I'm very sorry for the useless noise.

Best regards,
Frédéric
Вложения

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

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: Avoid orphaned objects dependencies, take 3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Why does pgindent's README say to download typedefs.list from the buildfarm?