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
minvalue
andmaxvalue
columns of thepg_dist_shard
table for all shards being changed - Update the shard storage type column of the
pg_dist_partition
table fromr
toh
COMMIT;