Postgres UUIDv7 and per-back end monotonicity

An exciting change is coming to Postgres with the addition of UUIDv7, promising improved performance and deterministic order thanks to a new timestamp-based approach for generating UUIDs. The innovative use of 12 bits of increased clock precision within the UUID ensures monotonicity within each Postgres backend, making testing more efficient and reliable. While not guaranteed across backends, well-written test suites can still benefit. The clever repurposing of the random component to enhance timestamp precision adds a unique touch to this update. The only downside is the delay in official implementation until Postgres 18 in late 2025, but the wait is anticipated to be worth it.

https://brandur.org/fragments/uuid-v7-monotonicity

To top