Skip to content

Handle pg_runtime_variable return values #6

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

Conversation

marcusmartins
Copy link
Contributor

When querying postgres pg_runtime_variable, postgres might return -1
for max_standby_archive_delay and max_standby_streaming_delay

When querying postgres `pg_runtime_variable`, postgres might return -1
for `max_standby_archive_delay` and `max_standby_streaming_delay`
@wrouesnel
Copy link
Contributor

Should this perhaps be a math.Inf(1) for these values since they both technically imply infinite wait times, and Prometheus supports that representation?

@wrouesnel
Copy link
Contributor

So I let this languish far too long, but the answer is kind of obvious based on my prior experience - math.Inf(1) in Prometheus tends to break graphs and in this particular case the lead up to a -1 is not steadily increasing wait times AFAIK. Merging.

@wrouesnel wrouesnel merged commit 9cdd620 into prometheus-community:master Jul 30, 2016
gsstark pushed a commit to gsstark/postgres_exporter that referenced this pull request Oct 1, 2020
Add: flag to print version of the application
Sticksman pushed a commit to Sticksman/postgres_exporter that referenced this pull request Apr 24, 2025
* Monitor pga-r2-misc

* Monitor pga-r2-comment
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.

2 participants