-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds pg_stat_progress_vacuum collector #1141
Adds pg_stat_progress_vacuum collector #1141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor nits, and one feature suggestion.
Otherwise, looking good.
This needs a DCO sign-off. You can use |
b47ef94
to
780dc68
Compare
README.md
Outdated
@@ -144,6 +144,9 @@ This will build the docker image as `prometheuscommunity/postgres_exporter:${bra | |||
* `[no-]collector.stat_database` | |||
Enable the `stat_database` collector (default: enabled). | |||
|
|||
* `[no-]collector.stat_progress_vacuum` | |||
Enable the `stat_progress_vacuum` collector (default: disabled). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about making this one enabled by default. Are vacuum stats useful enough for most users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think enabling this by default is acceptable here. I'll make it so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done.
Co-authored-by: Ben Kochie <superq@gmail.com> Signed-off-by: Ian Bibby <ian.bibby@reddit.com>
9b9866b
to
a50603f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request adds a new collector that exposes metrics from
pg_stat_progress_vacuum
, enabling visibility into in-progress VACUUM operations. The collected metrics include:This collector queries the underlying function
pg_stat_get_progress_info('VACUUM'::text)
directly rather than using thepg_stat_progress_vacuum
view.Testing
Example output:
Compatibility
Postgres 17 support
PostgreSQL 17 introduces breaking changes (pgpedia):
This collector is not currently compatible with Postgres 17, but this is a known limitation. A future update can address this by adjusting param mappings based on the server version.