News for hackers. Stuff that matters.
Re:Features I'd Like in PostgreSQL by esailija on Sunday January 29, 2023 @03:31AM (#34566082)
You lose security/privacy benefits. People in this thread pretend that there is one id type that is obviously better.

- UUID (all types) scale, sequential ids don't scale

- UUID (fully random) is completely secure and private. You cannot infer anything from it. As soon as you add anything to it ( like timestamp or counter), outsiders can infer things like how fast you are generating new objects

- UUID (fully random) cannot be abused by developers, which might skip creating timestamp columns and read it from the id instead

- UUIDs are slower, but as you see y's not for no benefits

Re:Features I'd Like in PostgreSQL by ttfkam on Sunday January 29, 2023 @10:38AM (#34569033)
Not that much slower than bigint as long as you replace the top one or two bytes in the UUID with a rotating per-minute counter.

You keep 106 bits of entropy (from v4's 122 bits) while largely eliminating page faults. Walkability is eliminated while not leaking too much temporal info.

https://www.2ndquadrant.com/en/blog/sequential-uuid-generato...

Re:Features I'd Like in PostgreSQL by srcreigh on Sunday January 29, 2023 @01:37PM (#34571164)