Skip to content

Add autovacuum_scores metric#1403

Open
nadashaban11 wants to merge 1 commit into
cybertec-postgresql:masterfrom
nadashaban11:pg-stat-autovacuum-scores
Open

Add autovacuum_scores metric#1403
nadashaban11 wants to merge 1 commit into
cybertec-postgresql:masterfrom
nadashaban11:pg-stat-autovacuum-scores

Conversation

@nadashaban11

Copy link
Copy Markdown
Contributor

Description

Added metric for pg_stat_autovacuum_scores to report per-table autovacuum details based on the new pg_stat_autovacuum_scores view produced by postgresql 19

Fixes #1398

  • SQL query to fetch the scores retrieved from pg_stat_autovacuum_scores` view
  • Converted boolean fields (do_vacuum, do_analyze, for_wraparound) to integers 1/0 to match other metrics
  • Applied tag naming (tag_schema, tag_table_name, tag_table_full_name).
  • Registered the new metric in the presets (exhaustive, full, standard, debug).
    I honestly do not sure about proper presets to add to, but I suggested the above based on the provided description on each preset.

AI & Automation Policy

  • I am the human author and take full personal responsibility for every change in this PR.
  • No AI or automated generative tool was used in any part of this PR OR I have disclosed all tool(s) below.

AI/automation tools used (leave blank if none):

Checklist

  • Code compiles and existing tests pass locally.
  • New or updated tests are included where applicable.
  • Documentation is updated where applicable.

@pashagolub pashagolub added the metrics Metrics related issues label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metrics Metrics related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add metric for pg_stat_autovacuum_scores to report per-table autovacuum details

2 participants