Skip to content

Add a collector for pg_buffercache_summary. #1165

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

Merged
merged 7 commits into from
Jun 19, 2025

Conversation

sfc-gh-pnuttall
Copy link
Contributor

@sfc-gh-pnuttall sfc-gh-pnuttall commented Jun 3, 2025

  • Add a collector for pg_buffercache_summary()
  • Requires PostgreSQL >= 16.

We use this code in production in a internal fork. We would like to
push it upstream. Default it to off, because it requires an extension to
be loaded.

Signed-off-by: Peter Nuttall <[email protected]>
Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: Peter Nuttall <[email protected]>
sfc-gh-pnuttall and others added 2 commits June 18, 2025 18:14
Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: Peter Nuttall <[email protected]>
Signed-off-by: Peter Nuttall <[email protected]>
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the helper as-is.

I have a couple ideas on adding a type handling wrapper around prometheus.NewDesc() that would help with the boilerplate null value checks.

@SuperQ SuperQ changed the title Add a collector for pg_buffercache. Add a collector for pg_buffercache_summary. Jun 19, 2025
@SuperQ SuperQ merged commit d8ba628 into prometheus-community:master Jun 19, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants