Before reading this post, I recommend you to read A Better ID Generator For PostgreSQL written by Rob Conery. To recap briefly, their post had discussed: The problem you will face in the rapid grow of your systems if you used GUID as the primary key. How Twitter generating auto-incrementing keys with Snowflake. Create a functional Snowflake equivalent for PostgresSQL. And the third point above will be the focus of discussion in this post.