citus/src/test/regress/expected/multi_drop_extension.out

55 lines
1.7 KiB
Plaintext

--
-- MULTI_DROP_EXTENSION
--
-- Tests around dropping and recreating the extension
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 550000;
ALTER SEQUENCE pg_catalog.pg_dist_jobid_seq RESTART 550000;
CREATE TABLE testtableddl(somecol int, distributecol text NOT NULL);
SELECT master_create_distributed_table('testtableddl', 'distributecol', 'append');
master_create_distributed_table
---------------------------------
(1 row)
-- this emits a NOTICE message for every table we are dropping with our CASCADE. It would
-- be nice to check that we get those NOTICE messages, but it's nicer to not have to
-- change this test every time the previous tests change the set of tables they leave
-- around.
SET client_min_messages TO 'WARNING';
DROP EXTENSION citus CASCADE;
RESET client_min_messages;
CREATE EXTENSION citus;
-- re-add the nodes to the cluster
SELECT master_add_node('localhost', :worker_1_port);
master_add_node
---------------------------------
(1,1,localhost,57637,default,f)
(1 row)
SELECT master_add_node('localhost', :worker_2_port);
master_add_node
---------------------------------
(2,2,localhost,57638,default,f)
(1 row)
-- verify that a table can be created after the extension has been dropped and recreated
CREATE TABLE testtableddl(somecol int, distributecol text NOT NULL);
SELECT master_create_distributed_table('testtableddl', 'distributecol', 'append');
master_create_distributed_table
---------------------------------
(1 row)
SELECT 1 FROM master_create_empty_shard('testtableddl');
?column?
----------
1
(1 row)
SELECT * FROM testtableddl;
somecol | distributecol
---------+---------------
(0 rows)
DROP TABLE testtableddl;