From: | Andy Fan <zhihuifan1213(at)163(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: cost delay brainstorming |
Date: | 2024-06-26 05:39:06 |
Message-ID: | 87frt01cw5.fsf@163.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andy Fan <zhihuifan1213(at)163(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-06-26 05:39:57 | Re: Fix possible overflow of pg_stat DSA's refcnt |
Previous Message | David G. Johnston | 2024-06-26 05:35:29 | Re: Should we document how column DEFAULT expressions work? |