During a migration from MySQL into a Citus cluster, I used the range distribution method. The migration is complete, but now I'd like to change the distribution method to hash.
Is there a way to change the distribution method from range to hash for an existing table with data already in it?
I came up with the following procedure, but am not sure it's valid:
- Update the
minvalueandmaxvaluecolumns of thepg_dist_shardtable for all shards being changed - Update the shard storage type column of the
pg_dist_partitiontable fromrtoh COMMIT;