by chaz6 · 1mo ago · 0 comments
Are there any extensions for PostgreSQL that do this?
It looks like Citus (one such extension that runs shards on separate workers) does something a little like what you described. Each node gets an ID, which becomes the high bits of the sequences it generates. So serial IDs are monotonic within a shard, but not across shards.
Aurora PostgreSQL Limitless uses different abstractions, but also ends up reserving different chunks of IDs for different routers to use.
https://dev.to/aws-heroes/scalable-sequence-for-postgresql-3...
Would interact with sharding?
It's one query, so shouldn't require a plugin I hope.