Re: cost delay brainstorming

Поиск
Список
Период
Сортировка
От Andy Fan
Тема Re: cost delay brainstorming
Дата
Msg-id 87frt01cw5.fsf@163.com
обсуждение исходный текст
Ответ на Re: cost delay brainstorming  (Andy Fan <zhihuifan1213@163.com>)
Список pgsql-hackers
Andy Fan <zhihuifan1213@163.com> writes:

>
>> - Longrunning transaction prevents increasing relfrozenxid, we run autovacuum
>>   over and over on the same relation, using up the whole cost budget. This is
>>   particularly bad because often we'll not autovacuum anything else, building
>>   up a larger and larger backlog of actual work.
>
> Could we maintain a pg_class.last_autovacuum_min_xid during vacuum? So
> if we compare the OldestXminXid with pg_class.last_autovacuum_min_xid
> before doing the real work.

Maintaining the oldestXminXid on this relation might be expensive. 

>>
>> - Tables, where on-access pruning works very well, end up being vacuumed far
>>   too frequently, because our autovacuum scheduling doesn't know about tuples
>>   having been cleaned up by on-access pruning.
>
> Good to know this case. if we update the pg_stats_xx metrics when on-access
> pruning, would it is helpful on this?

I got the answer myself, it doesn't work because on-access pruing
working on per-index level and one relation may has many indexes. and
pg_stats_xx works at relation level.  So the above proposal doesn't
work. 

-- 
Best Regards
Andy Fan




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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Should we document how column DEFAULT expressions work?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Fix possible overflow of pg_stat DSA's refcnt