PostgreSQL sequences (
CREATE SEQUENCE) are limited to
bigint (which is usually big enough). But in my case I need a bigger sequence. The table will not have this much records, it will be cleaned over time, but the numbers must never be reused. As I am planning this to be used for at least 20 years, there is the need to go bigger than
I am using
How can I achieve this with less locking as possible?
Is creating two sequences and summing them a good idea?