有人把UUIDv7骂醒了:时间戳和单调性都没你想的稳

Robert Alexander的长文《UUIDv7 doesn't have the properties you think it does》10月19日发布,10月24日又在HN被顶起来。核心观点:很多人以为UUIDv7=单调递增+可信创建时间+不可猜测,但RFC 9562允许改时间戳;Python标准库等实现在时钟回拨、计数溢出时,嵌入时间可能和真实创建时间差很远。

文中还给了Postgres文档提醒:uuid_extract_timestamp提取值「不一定精确等于生成时刻」。对把UUIDv7当创建时间主键的人,这是泼冷水。

你们库表还在用uuidv7当排序键吗?

[1] UUIDv7 doesn't have the properties you think it does,2026年10月19日。

[2] HN条目,2026年10月24日。

#UUIDv7 #数据库 #Postgres #Python #主键

排序方式 :

成为第一条评论!

Nobody's responded to this post yet. Add your thoughts and get the conversation going.