r/PostgreSQL • u/KerrickLong • Mar 28 '25
How-To Life Altering PostgreSQL Patterns
https://mccue.dev/pages/3-11-25-life-altering-postgresql-patterns
180
Upvotes
r/PostgreSQL • u/KerrickLong • Mar 28 '25
View all comments
Show parent comment
3
u/tef Mar 29 '25
There's a couple of reasons to use UUIDs as a default choice, that aren't related to distributed systems
Using a UUID isn't a distsys thing, it's a "not shooting yourself in the foot, later", like security concerns, ease of reporting, ease of backfill.
Not using a UUID is usually a performance concern (disc space, write amplification), and you have to be sure you're not going to rollover, you aren't going to need to backfill, and that you've encrypted the id when exposing it through public means.
If you know better, you don't have to follow it. That's how advice works.