I am working with Citus-Postgress to setup a cluster of coordinator and worker nodes and distribute table data across these nodes. By default, Citus uses its own logic to automatically distribute shards across the worker node.
However, I would like to manually specify the worker node to place the shard with a specific value. For instance, I have a table "user" that has columns like first_name, last_name, etc along with a column "region". The "region" column can have 4 values (int or string) for each region like ca, us, au, eu. I have 4 worker nodes for each region and I would like to place the user record in the correct worker node based on "region" column.
Is there any way you can define your own distribution logic in citus and route these shards accordingly. I would avoid putting this logic in application layer.