Re: Add pg_stat_autovacuum_priority
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-03-30T15:32:41Z
Lists: pgsql-hackers
> > 0002 introduces the view with documentation and testing in > > vacuum.c (xid age and mxid age scores are not tested as > > they require xid_wraparound to consume enough XIDs to > > trigger a score, which will cost too much time for a > > regression test). > > After this patch, there are three copies of the combined call to > pgstat_fetch_stat_tabentry_ext() and relation_needs_vacanalyze(). Can > we avoid that, ideally reducing to only one such? Or, at least, it > looks like recheck_relation_needs_vacanalyze() may no longer need to > exist at all. recheck_relation_needs_vacanalyze() can be removed and replace with compute_autovac_score(). I was trying to minimize refactoring, but this seems worthwhile to do. -- Sami
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix double-free in pg_stat_autovacuum_scores.
- 71ff232a5bc4 19 (unreleased) landed
-
Add LOG_NEVER error level code.
- 60165db6e1f2 19 (unreleased) landed
-
Add pg_stat_autovacuum_scores system view.
- 87f61f0c8280 19 (unreleased) landed
-
Remove recheck_relation_needs_vacanalyze().
- 775fe51daaef 19 (unreleased) landed
-
Add elevel parameter to relation_needs_vacanalyze().
- 01876ace1369 19 (unreleased) landed
-
Teach relation_needs_vacanalyze() to always compute scores.
- 53b8ca6881a1 19 (unreleased) landed
-
Refactor relation_needs_vacanalyze().
- 8261ee24fe33 19 (unreleased) landed
-
Add rudimentary table prioritization to autovacuum.
- d7965d65fc5b 19 (unreleased) cited
-
Fix per-relation memory leakage in autovacuum.
- 02502c1bca54 18.0 cited
-
Fix recently-understood problems with handling of XID freezing, particularly
- 48188e1621bb 8.2.0 cited