3 ms·
Postgres doesn't support unsigned ints last I looked, so it's actually a ~2 billion limit. Secondly, it's not XXXk rows currently-you have to consider the comp
by mixmastamyk 2y ago
Postgres doesn't support unsigned ints last I looked, so it's actually a ~2 billion limit.
Secondly, it's not XXXk rows currently-you have to consider the complete lifetime of the table. When rows are deleted/created and how often.
So what you've said is true, but the set of appropriateness for smallint is a much smaller than expected.
- blackenedgem 2y agoYou can start the sequence at -2b, or wrap it around when it gets close to the signed limit. Hopefully you haven't depended on it not wrapping around by that point. For queue tables you can even use `CYCLE` to do that automatically.