mirror of https://github.com/citusdata/citus.git
Adds check enabled for some sqls
parent
d3962381e9
commit
426397fa77
|
@ -21,23 +21,6 @@ SELECT pg_reload_conf();
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\c - - - :master_port
|
|
||||||
\c - - - :worker_1_port
|
|
||||||
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
|
||||||
SELECT pg_reload_conf();
|
|
||||||
pg_reload_conf
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
t
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
\c - - - :worker_2_port
|
|
||||||
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
|
||||||
SELECT pg_reload_conf();
|
|
||||||
pg_reload_conf
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
t
|
|
||||||
(1 row)
|
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
SET citus.next_shard_id TO 1220000;
|
SET citus.next_shard_id TO 1220000;
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 1390000;
|
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 1390000;
|
||||||
|
|
|
@ -1,4 +1,27 @@
|
||||||
-- check that the nodes are all in read-only mode and rejecting write queries
|
-- check that the nodes are all in read-only mode and rejecting write queries
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
\c - - - :follower_master_port
|
\c - - - :follower_master_port
|
||||||
CREATE TABLE tab (a int);
|
CREATE TABLE tab (a int);
|
||||||
ERROR: cannot execute CREATE TABLE in a read-only transaction
|
ERROR: cannot execute CREATE TABLE in a read-only transaction
|
||||||
|
|
|
@ -1,4 +1,28 @@
|
||||||
-- File to create functions and helpers needed for subsequent tests
|
-- File to create functions and helpers needed for subsequent tests
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :master_port
|
||||||
-- create a helper function to create objects on each node
|
-- create a helper function to create objects on each node
|
||||||
CREATE OR REPLACE FUNCTION run_command_on_master_and_workers(p_sql text)
|
CREATE OR REPLACE FUNCTION run_command_on_master_and_workers(p_sql text)
|
||||||
RETURNS void LANGUAGE plpgsql AS $$
|
RETURNS void LANGUAGE plpgsql AS $$
|
||||||
|
|
|
@ -1,3 +1,28 @@
|
||||||
|
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
pg_reload_conf
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
t
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
\c - - - :master_port
|
||||||
-- we already have lots of tests targeting
|
-- we already have lots of tests targeting
|
||||||
-- single node citus clusters in sql/single_node.sql
|
-- single node citus clusters in sql/single_node.sql
|
||||||
-- in this file, we are testing enterprise features
|
-- in this file, we are testing enterprise features
|
||||||
|
|
|
@ -9,14 +9,6 @@ SELECT pg_reload_conf();
|
||||||
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
SELECT pg_reload_conf();
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
\c - - - :master_port
|
|
||||||
\c - - - :worker_1_port
|
|
||||||
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
|
||||||
SELECT pg_reload_conf();
|
|
||||||
|
|
||||||
\c - - - :worker_2_port
|
|
||||||
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
|
||||||
SELECT pg_reload_conf();
|
|
||||||
|
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
SET citus.next_shard_id TO 1220000;
|
SET citus.next_shard_id TO 1220000;
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
-- check that the nodes are all in read-only mode and rejecting write queries
|
-- check that the nodes are all in read-only mode and rejecting write queries
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
\c - - - :follower_master_port
|
\c - - - :follower_master_port
|
||||||
CREATE TABLE tab (a int);
|
CREATE TABLE tab (a int);
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
-- File to create functions and helpers needed for subsequent tests
|
-- File to create functions and helpers needed for subsequent tests
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
\c - - - :master_port
|
||||||
-- create a helper function to create objects on each node
|
-- create a helper function to create objects on each node
|
||||||
CREATE OR REPLACE FUNCTION run_command_on_master_and_workers(p_sql text)
|
CREATE OR REPLACE FUNCTION run_command_on_master_and_workers(p_sql text)
|
||||||
RETURNS void LANGUAGE plpgsql AS $$
|
RETURNS void LANGUAGE plpgsql AS $$
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
-- we already have lots of tests targeting
|
-- we already have lots of tests targeting
|
||||||
-- single node citus clusters in sql/single_node.sql
|
-- single node citus clusters in sql/single_node.sql
|
||||||
-- in this file, we are testing enterprise features
|
-- in this file, we are testing enterprise features
|
||||||
|
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
ALTER SYSTEM SET citus.enable_ddl_propagation = 'true';
|
||||||
|
SELECT pg_reload_conf();
|
||||||
|
|
||||||
|
\c - - - :master_port
|
||||||
CREATE SCHEMA single_node_ent;
|
CREATE SCHEMA single_node_ent;
|
||||||
SET search_path TO single_node_ent;
|
SET search_path TO single_node_ent;
|
||||||
SET citus.shard_count TO 4;
|
SET citus.shard_count TO 4;
|
||||||
|
|
Loading…
Reference in New Issue