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

FEATURE: Export metric for highest sequence usage #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nbianca
Copy link
Member

@nbianca nbianca commented Jun 24, 2024

Plugin already exports postgres_highest_sequence, but the value cannot be reliable used for alerts because it is not linked with the maximum value of the column that uses it.

In other words, a sequence may be used with an integer or a bigint column, which have very different maximum values. The highest last_value reported may be cause of concern for an integer column because it is close to the limit, but not a problem for a bigint column.

Plugin already exports `postgres_highest_sequence`, but the value cannot
be reliable used for alerts because it is not linked with the maximum
value of the column that uses it.

In other words, a sequence may be used with an `integer` or a `bigint`
column, which have very different maximum values. The highest
`last_value` reported may be cause of concern for an `integer` column
because it is close to the limit, but not a problem for a `bigint`
column.
@davidtaylorhq
Copy link
Member

As discussed internally, I don't think we should add this metric. It'll give us a false sense of security. Just because a sequence has been updated to bigint, does not mean it is safe for it to go beyond MAX_INT.

Instead, we should maintain a list of columns which we have verified are safe for larger integers. To ensure those columns remain safe, we should start their sequences at values larger than MAX_INT in tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants