| From: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Track skipped tables during autovacuum and autoanalyze |
| Date: | 2026-03-24 06:11:33 |
| Message-ID: | 20260324151133.7940a5c1f2ebd594d54da481@sraoss.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
I would like to propose adding new fields to pg_stat_all_tables to track
tables skipped during autovacuum and autoanalyze.
Currently, when autovacuum or autoanalyze is skipped because a lock cannot
be acquired, this information is only emitted in log messages. However, it
would be more useful if users could access this information via a system view,
alongside related fields such as last_autovacuum, on a per-table basis.
The attached patch add the following fields to pg_stat_all_tables:
- last_skipped_autovacuum
- last_skipped_autoanalyze
- skipped_autovacuum_count
- skipped_autoanalyze_count
Are there any concerns about exposing this in pg_stat_all_tables, or suggestions
for a better approach?
Regards,
Yugo Nagata
--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Track-skipped-tables-during-autovacuum-and-autoanaly.patch | text/x-diff | 11.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-03-24 06:12:01 | Re: [Patch] New pg_stat_tablespace view |
| Previous Message | Lukas Fittl | 2026-03-24 06:09:57 | Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc? |