The Integer at the End of the Universe: Integer Overflow in Postgres | Crunchy Data Blog
Integer overflow can happen if you have a sequencing data type exceeding integer limits. Jesse has a query to help you spot it and recommendations for a short term and long term fix.
Crunchy Data