Skip to content

Question: uuid support for sharding key #381

Open
@quixoten

Description

@quixoten

I'm currently in the process of evaluating pgcat for use at my company. We have a requirement to use a random generated value for our id columns. The current plan for this is to use the native uuid type in postgres. Ideally we'd be able to generate these ids on the client, and use them as the sharding key passed to pgcat. PARTITION BY HASH (uuid) appears to work on the postgres end of things. Just need to figure out the pgcat side of things. I'm guessing that at a minimum the key type would need to change from i64 to i128 everywhere, and then additional parsing in the SET SHARDING KEY TO path to recognize uuids. Both of these might have performance implications.

Any chance you could give me an estimate of how complicated this would be to add to pgcat? My initial assessment is that I could likely implement this myself even though I don't have a lot of rust experience. Does this sound right to you? Is this a change you'd like to see in pgcat?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions