Re:Reddit's photo albums broke due to Integer overflow of Si...
by skunkworker on Wednesday December 14, 2022 @01:26AM
(#33980643)
XID wraparound is one of the things that makes me wish Postgres would go 64bit on some of their internal data structures.
Yeah, numbers get you fun stuff like overflows and wrap-arounds, etc. But sorting is faster (sorting "99" before "100" is more complex than 99 before 100) and space requirement is lower (6 bytes can store a unique ID for 281 trillion objects, but 6 characters only permits 1 million if you're storing them as strings).
Or is there some datatype that combines the space- and sort-efficiency of a numeric type, but doesn't bring the baggage of assuming they represent quantities?