News for hackers. Stuff that matters.
Re:Postgres sequences can skip 32 unexpectedly by garblegarble on Friday July 16, 2021 @02:46PM (#27859736)
>We have an event in our ORM to automatically generate the next sequence value as part of the transaction so if the transaction is rolled back, the next sequence value is as well.

I assume that means you also have to only allow one TX to be in-flight at a time adding a new record whose ID is generated from a given sequence?

Re:Postgres sequences can skip 32 unexpectedly by CodeWriter23 on Friday July 16, 2021 @04:05PM (#27860629)
Or bounce an exception for insert duplicate on a unique index.