News for hackers. Stuff that matters.
Re:PostgreSQL and UUID as Primary Key by azinman2 on Friday July 05, 2024 @11:54PM (#40888057)
But if you’re distributed or offline incrementing by an arbitrary amount can still create collisions unless you’re willing to increment by very very large amounts at random, in which case you’ve effectively reinvented uuid
Re:PostgreSQL and UUID as Primary Key by arp242 on Saturday July 06, 2024 @12:23AM (#40888151)
No, every server will have its own series:

  Server 1: [1 4 7]
  Server 2: [2 5 8]
  Server 3: [3 6 9]
Or whatever is appropriate. You can even add/change this later on.

Again, I'm not saying it's necessarily the best solution, I'm just saying it's possible. I'm not really interested in a long discussion about uuid vs. serial because it's been done to death a million times. Previous poster said it's impossible and that's just flat-out wrong.