mirror of https://github.com/citusdata/citus.git
Add new config
parent
0295fe2f5b
commit
b3889bc431
|
@ -294,7 +294,6 @@ class CitusUnusualQuerySettingsConfig(CitusMXBaseClusterConfig):
|
|||
self.new_settings = {
|
||||
"citus.task_assignment_policy": "first-replica",
|
||||
"citus.enable_fast_path_router_planner": False,
|
||||
"citus.enable_local_execution": False,
|
||||
"citus.enable_single_hash_repartition_joins": True,
|
||||
"citus.recover_2pc_interval": "1s",
|
||||
"citus.remote_task_check_interval": "1ms",
|
||||
|
@ -302,6 +301,15 @@ class CitusUnusualQuerySettingsConfig(CitusMXBaseClusterConfig):
|
|||
}
|
||||
|
||||
|
||||
class CitusUnusualQuerySettingsNoLocalExecConfig(CitusUnusualQuerySettingsConfig):
|
||||
def __init__(self, arguments):
|
||||
super().__init__(arguments)
|
||||
self.new_settings = {
|
||||
"citus.use_citus_managed_tables": False,
|
||||
"citus.enable_local_execution": False,
|
||||
}
|
||||
|
||||
|
||||
class CitusSingleNodeSingleShardClusterConfig(CitusDefaultClusterConfig):
|
||||
def __init__(self, arguments):
|
||||
super().__init__(arguments)
|
||||
|
|
|
@ -25,7 +25,6 @@ PRIMARY KEY (measureid, eventdatetime, measure_data))
|
|||
PARTITION BY RANGE(eventdatetime);
|
||||
-- drop column even before attaching any partitions
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_1;
|
||||
SET citus.enable_local_execution TO ON;
|
||||
-- now attach the first partition and create the distributed table
|
||||
CREATE TABLE sensors_2000 PARTITION OF sensors FOR VALUES FROM ('2000-01-01') TO ('2001-01-01');
|
||||
SELECT create_distributed_table('sensors', 'measureid');
|
||||
|
@ -38,7 +37,6 @@ SELECT create_distributed_table('sensors', 'measureid');
|
|||
-- with .. PARTITION OF .. syntax
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_0;
|
||||
CREATE TABLE sensors_2001 PARTITION OF sensors FOR VALUES FROM ('2001-01-01') TO ('2002-01-01');
|
||||
SET citus.enable_local_execution TO OFF;
|
||||
-- drop another column before attaching another partition
|
||||
-- with ALTER TABLE .. ATTACH PARTITION
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_2;
|
||||
|
@ -63,11 +61,9 @@ CREATE TABLE sensors_2004(
|
|||
col_to_drop_4 date, measureid integer NOT NULL, eventdatetime date NOT NULL, measure_data jsonb NOT NULL);
|
||||
ALTER TABLE sensors ATTACH PARTITION sensors_2004 FOR VALUES FROM ('2004-01-01') TO ('2005-01-01');
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_4;
|
||||
SET citus.enable_local_execution TO ON;
|
||||
SELECT alter_table_set_access_method('sensors_2004', 'columnar');
|
||||
alter_table_set_access_method
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SET citus.enable_local_execution TO OFF;
|
||||
|
|
|
@ -25,7 +25,6 @@ PARTITION BY RANGE(eventdatetime);
|
|||
-- drop column even before attaching any partitions
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_1;
|
||||
|
||||
SET citus.enable_local_execution TO ON;
|
||||
-- now attach the first partition and create the distributed table
|
||||
CREATE TABLE sensors_2000 PARTITION OF sensors FOR VALUES FROM ('2000-01-01') TO ('2001-01-01');
|
||||
SELECT create_distributed_table('sensors', 'measureid');
|
||||
|
@ -34,7 +33,6 @@ SELECT create_distributed_table('sensors', 'measureid');
|
|||
-- with .. PARTITION OF .. syntax
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_0;
|
||||
CREATE TABLE sensors_2001 PARTITION OF sensors FOR VALUES FROM ('2001-01-01') TO ('2002-01-01');
|
||||
SET citus.enable_local_execution TO OFF;
|
||||
|
||||
-- drop another column before attaching another partition
|
||||
-- with ALTER TABLE .. ATTACH PARTITION
|
||||
|
@ -61,6 +59,4 @@ col_to_drop_4 date, measureid integer NOT NULL, eventdatetime date NOT NULL, mea
|
|||
|
||||
ALTER TABLE sensors ATTACH PARTITION sensors_2004 FOR VALUES FROM ('2004-01-01') TO ('2005-01-01');
|
||||
ALTER TABLE sensors DROP COLUMN col_to_drop_4;
|
||||
SET citus.enable_local_execution TO ON;
|
||||
SELECT alter_table_set_access_method('sensors_2004', 'columnar');
|
||||
SET citus.enable_local_execution TO OFF;
|
||||
|
|
Loading…
Reference in New Issue