Laurenz Albe performs a migration:
In a previous article, I recommended using
bigintfor sequence-generated primary keys (but I make an exception for lookup tables!). If you didn’t heed that warning, you might experience integer overflow. That causes downtime and pain. So I thought it would be a good idea to show you how to monitor for the problem and how to keep the worst from happening.
Read on for the downtime-rich solution (thanks to table blocking), as well as a solution that requires less downtime.