citus

Can I change the distribution method on an existing Citus table?

浪尽此生 提交于 2019-12-22 05:54:13
问题 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 and maxvalue columns of the pg_dist_shard table for all shards being changed Update the shard storage type column of

Postgresql sharding with citus extension not working

可紊 提交于 2019-12-12 05:53:11
问题 I am using Postgresql with citus extension for sharding and unable to shard tables like below. Below table has a primary key and 2 unique keys. I am trying to shard against column with primary key i.e pid . Note : I am not allowed to change the table structure. These tables are created by tool. CREATE TABLE person ( pid bigint NOT NULL, name character varying(100), address_pid bigint NOT NULL, address_type character varying(100), CONSTRAINT id_pkey PRIMARY KEY (pid), CONSTRAINT addr_id UNIQUE

Can I change the distribution method on an existing Citus table?

允我心安 提交于 2019-12-05 10:26:40
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 and maxvalue columns of the pg_dist_shard table for all shards being changed Update the shard storage type column of the pg_dist_partition table from r to h COMMIT; That is a good question. Currently, Citus does not