Get the latest tech news

Postgres UUIDv7 and per-back end monotonicity


How Postgres’ v7 UUIDs are made monotonic, and why that’s a great feature.

A nice surprise is that the random portion of the UUIDs will be monotonic within each Postgres backend: It’s possible they’re generated in-order by virtue of being across different milliseconds or by getting lucky, but probability is against you, and the likelihood is that some will be out of order. A millisecond is a short amount of time for a human, but quite long for a computer, and many UUIDs could easily be generated with the space of a single ms.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of end

end

Photo of Postgres

Postgres

Photo of monotonicity

monotonicity

Related news:

News photo

Reads Causing Writes in Postgres

News photo

Database Release and End-to-End Testing: ClickHouse Database Cloning

News photo

Curl removes experimental HTTP back end in Rust