https://github.com/VADOSWARE/pg_idkit extension is useful for generating unique fast lexicographically sortable primary keys.
Supports 9 different ID generators