Skip to content

Conversation

@Sticksman
Copy link
Contributor

Split from #819

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 think we should refactor these separate collectors into a single pg_stat_activity collector to reduce the number of queries to this table.


oldestBlockedQuery = `
SELECT
coalesce(extract('epoch' from max(clock_timestamp() - state_change)), 0) age_seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to others, we should extract the raw timestamp for this metric.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know if that makes sense since we're trying to measure the max duration that a query's been blocked here

Copy link
Contributor

Choose a reason for hiding this comment

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

This can still be done with time() - metric.

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