You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add pgwatch sequence_overflow metric for L003 report
Add sequence_overflow metric to pgwatch configuration that monitors
sequence-generated columns (serial/identity) for potential integer
overflow risk.
The metric:
- Queries pg_depend, pg_class, pg_attribute, pg_sequence to find
all sequence-column relationships
- Calculates percentage used for both sequence and column data types
- Excludes system schemas (pg_catalog, information_schema, pg_toast)
- Sorts by highest risk (greatest percentage used)
- Limits to 1000 results per database
SQL query based on approach from Laurenz Albe at CYBERTEC:
https://www.cybertec-postgresql.com/en/integer-overflow-in-sequence-generated-primary-keys/
Collection interval: 7200s (2 hours) in 'full' preset
Slack thread: https://postgres-ai.slack.com/archives/CCKQPEM09/p1768427779650849
0 commit comments