Skip to content
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

Add stat_activity_oldest_backend_xmin #38

Merged
merged 1 commit into from
Feb 27, 2020
Merged

Add stat_activity_oldest_backend_xmin #38

merged 1 commit into from
Feb 27, 2020

Conversation

benwh
Copy link
Collaborator

@benwh benwh commented Feb 4, 2020

This is an experiment to see whether this is a useful metric to have: in
theory if we see the value of this gauge remain static for a large
period of time then we know that there is something running that is
preventing the xmin horizon from increasing.

}

// postgres_stat_activity_oldest_backend_xmin
ch <- prometheus.MustNewConstMetric(c.xmin, prometheus.GaugeValue, oldestXmin)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm pretty sure now that this should be a counter, not a gauge (as long as my assertion about the query that retrieves this metric always holding a snapshot is correct)

Thoughts welcome though

@benwh
Copy link
Collaborator Author

benwh commented Feb 14, 2020

@lawrencejones WDYT of this?

Have been running it in staging for the past week, although we don't see any of the flat spots there that I think we might in production.

@benwh benwh requested a review from rnaveiras February 21, 2020 18:42
This is an experiment to see whether this is a useful metric to have: in
theory if we see the value of this gauge remain static for a large
period of time then we know that there is something running that is
preventing the xmin horizon from increasing.
@benwh
Copy link
Collaborator Author

benwh commented Feb 27, 2020

Now rebased.

ping @rnaveiras

Copy link
Owner

@rnaveiras rnaveiras left a comment

Choose a reason for hiding this comment

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

LGTM

@rnaveiras rnaveiras merged commit 8bb549c into master Feb 27, 2020
@rnaveiras rnaveiras deleted the benwh/min-xmin branch February 27, 2020 23:02
@rnaveiras
Copy link
Owner

@benwh Thanks!!

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