No Gap Ordered Numbering in SQL: A Unique Index to Serialize In Read Committed
If you require a no-gap numbering system, using a sequence is not an option (see reasons here)....
Tags: yugabytedb, distributed, postgres, database