SET citus.next_shard_id TO 1490000; SELECT citus.mitmproxy('conn.allow()'); mitmproxy --------------------------------------------------------------------- (1 row) SET citus.shard_replication_factor TO 2; SET citus.shard_count TO 4; CREATE TABLE partitioned_table ( dist_key bigint, partition_id integer ) PARTITION BY LIST (partition_id ); SELECT create_distributed_table('partitioned_table', 'dist_key'); create_distributed_table --------------------------------------------------------------------- (1 row) CREATE TABLE partitioned_table_0 PARTITION OF partitioned_table (dist_key, partition_id) FOR VALUES IN ( 0 ); INSERT INTO partitioned_table VALUES (0, 0); SELECT citus.mitmproxy('conn.onQuery(query="^INSERT").kill()'); mitmproxy --------------------------------------------------------------------- (1 row) INSERT INTO partitioned_table VALUES (0, 0); ERROR: connection to the remote node localhost:xxxxx failed with the following error: connection not open -- use both placements SET citus.task_assignment_policy TO "round-robin"; -- the results should be the same SELECT count(*) FROM partitioned_table_0; count --------------------------------------------------------------------- 1 (1 row) SELECT count(*) FROM partitioned_table_0; count --------------------------------------------------------------------- 1 (1 row) SELECT count(*) FROM partitioned_table; count --------------------------------------------------------------------- 1 (1 row) SELECT count(*) FROM partitioned_table; count --------------------------------------------------------------------- 1 (1 row) -- ==== Clean up, we're done here ==== SELECT citus.mitmproxy('conn.allow()'); mitmproxy --------------------------------------------------------------------- (1 row) DROP TABLE partitioned_table;