Skip to content

[Sharding] Global, monotonic, int32 sequence #1480

Description

@levkk

We currently have two ways to generate unique integer IDs:

  1. timestamp-based: https://docs.pgdog.dev/features/sharding/unique-ids/
  2. sequence-based (shard-local): https://docs.pgdog.dev/features/sharding/sequences/

We need a 3rd way, which creates global, monotonic, int32 numbers. This will be used with omnisharded tables and on deployments that can't migrate to bigint.

No suggested implementation. There are a few options, all suboptimal: either have a single point of failure or are slow because of required consensus.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions