Fix psql-dependent xact-drop-shards test

pull/1439/head
Jason Petersen 2017-05-31 16:40:09 -06:00
parent 81895b1692
commit b031ac4bef
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
2 changed files with 137 additions and 100 deletions

View File

@ -46,34 +46,24 @@ ORDER BY
(8 rows) (8 rows)
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_shards; \dt transactional_drop_shards
Table "public.transactional_drop_shards" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+---------------------------+-------+----------
column1 | integer | public | transactional_drop_shards | table | postgres
(1 row)
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
Table "public.transactional_drop_shards_1410000" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+-----------------------------------+-------+----------
column1 | integer | public | transactional_drop_shards_1410000 | table | postgres
public | transactional_drop_shards_1410001 | table | postgres
Table "public.transactional_drop_shards_1410001" public | transactional_drop_shards_1410002 | table | postgres
Column | Type | Modifiers public | transactional_drop_shards_1410003 | table | postgres
---------+---------+----------- (4 rows)
column1 | integer |
Table "public.transactional_drop_shards_1410002"
Column | Type | Modifiers
---------+---------+-----------
column1 | integer |
Table "public.transactional_drop_shards_1410003"
Column | Type | Modifiers
---------+---------+-----------
column1 | integer |
\c - - - :master_port \c - - - :master_port
-- test DROP TABLE(ergo master_drop_all_shards) in transaction, then COMMIT -- test DROP TABLE(ergo master_drop_all_shards) in transaction, then COMMIT
@ -99,10 +89,20 @@ ORDER BY
(0 rows) (0 rows)
-- verify table is dropped -- verify table is dropped
\d transactional_drop_shards; \dt transactional_drop_shards
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)
-- verify shards are dropped -- verify shards are dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)
\c - - - :master_port \c - - - :master_port
-- test master_delete_protocol in transaction, then ROLLBACK -- test master_delete_protocol in transaction, then ROLLBACK
CREATE TABLE transactional_drop_shards(column1 int); CREATE TABLE transactional_drop_shards(column1 int);
@ -149,11 +149,12 @@ ORDER BY
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
Table "public.transactional_drop_shards_1410004" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+-----------------------------------+-------+----------
column1 | integer | public | transactional_drop_shards_1410004 | table | postgres
(1 row)
\c - - - :master_port \c - - - :master_port
-- test master_delete_protocol in transaction, then COMMIT -- test master_delete_protocol in transaction, then COMMIT
@ -185,7 +186,12 @@ ORDER BY
-- verify shards are dropped -- verify shards are dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)
\c - - - :master_port \c - - - :master_port
-- test DROP table in a transaction after insertion -- test DROP table in a transaction after insertion
SELECT master_create_empty_shard('transactional_drop_shards'); SELECT master_create_empty_shard('transactional_drop_shards');
@ -223,19 +229,21 @@ ORDER BY
(2 rows) (2 rows)
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_shards; \dt transactional_drop_shards
Table "public.transactional_drop_shards" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+---------------------------+-------+----------
column1 | integer | public | transactional_drop_shards | table | postgres
(1 row)
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
Table "public.transactional_drop_shards_1410005" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+-----------------------------------+-------+----------
column1 | integer | public | transactional_drop_shards_1410005 | table | postgres
(1 row)
\c - - - :master_port \c - - - :master_port
-- test master_apply_delete_command in a transaction after insertion -- test master_apply_delete_command in a transaction after insertion
@ -267,11 +275,12 @@ ORDER BY
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
Table "public.transactional_drop_shards_1410005" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+-----------------------------------+-------+----------
column1 | integer | public | transactional_drop_shards_1410005 | table | postgres
(1 row)
-- test DROP table with failing worker -- test DROP table with failing worker
CREATE FUNCTION fail_drop_table() RETURNS event_trigger AS $fdt$ CREATE FUNCTION fail_drop_table() RETURNS event_trigger AS $fdt$
@ -307,19 +316,21 @@ ORDER BY
(2 rows) (2 rows)
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_shards; \dt transactional_drop_shards
Table "public.transactional_drop_shards" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+---------------------------+-------+----------
column1 | integer | public | transactional_drop_shards | table | postgres
(1 row)
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
Table "public.transactional_drop_shards_1410005" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+-----------------------------------+-------+----------
column1 | integer | public | transactional_drop_shards_1410005 | table | postgres
(1 row)
\c - - - :master_port \c - - - :master_port
-- test DROP reference table with failing worker -- test DROP reference table with failing worker
@ -356,19 +367,21 @@ ORDER BY
(2 rows) (2 rows)
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_reference; \dt transactional_drop_reference
Table "public.transactional_drop_reference" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+------------------------------+-------+----------
column1 | integer | public | transactional_drop_reference | table | postgres
(1 row)
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_reference*; \dt transactional_drop_reference*
Table "public.transactional_drop_reference_1410006" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+--------------------------------------+-------+----------
column1 | integer | public | transactional_drop_reference_1410006 | table | postgres
(1 row)
\c - - - :master_port \c - - - :master_port
-- test master_apply_delete_command table with failing worker -- test master_apply_delete_command table with failing worker
@ -399,11 +412,12 @@ ORDER BY
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
Table "public.transactional_drop_shards_1410005" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------- --------+-----------------------------------+-------+----------
column1 | integer | public | transactional_drop_shards_1410005 | table | postgres
(1 row)
DROP EVENT TRIGGER fail_drop_table; DROP EVENT TRIGGER fail_drop_table;
\c - - - :master_port \c - - - :master_port
@ -463,16 +477,29 @@ ORDER BY
(16 rows) (16 rows)
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_serial; \dt transactional_drop_serial
Table "public.transactional_drop_serial" List of relations
Column | Type | Modifiers Schema | Name | Type | Owner
---------+---------+----------------------------------------------------------------------------- --------+---------------------------+-------+----------
column1 | integer | public | transactional_drop_serial | table | postgres
column2 | integer | not null default nextval('transactional_drop_serial_column2_seq'::regclass) (1 row)
-- verify shards and sequence are not dropped -- verify shards and sequence are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_serial_1410006; \dt transactional_drop_serial_*
List of relations
Schema | Name | Type | Owner
--------+-----------------------------------+-------+----------
public | transactional_drop_serial_1410007 | table | postgres
public | transactional_drop_serial_1410008 | table | postgres
public | transactional_drop_serial_1410009 | table | postgres
public | transactional_drop_serial_1410010 | table | postgres
public | transactional_drop_serial_1410011 | table | postgres
public | transactional_drop_serial_1410012 | table | postgres
public | transactional_drop_serial_1410013 | table | postgres
public | transactional_drop_serial_1410014 | table | postgres
(8 rows)
\ds transactional_drop_serial_column2_seq \ds transactional_drop_serial_column2_seq
List of relations List of relations
Schema | Name | Type | Owner Schema | Name | Type | Owner
@ -504,10 +531,20 @@ ORDER BY
(0 rows) (0 rows)
-- verify table is dropped -- verify table is dropped
\d transactional_drop_serial; \dt transactional_drop_serial
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)
-- verify shards and sequence are dropped -- verify shards and sequence are dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_serial_1410006; \dt transactional_drop_serial_*
List of relations
Schema | Name | Type | Owner
--------+------+------+-------
(0 rows)
\ds transactional_drop_serial_column2_seq \ds transactional_drop_serial_column2_seq
List of relations List of relations
Schema | Name | Type | Owner Schema | Name | Type | Owner

View File

@ -28,11 +28,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_shards; \dt transactional_drop_shards
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
\c - - - :master_port \c - - - :master_port
@ -53,11 +53,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is dropped -- verify table is dropped
\d transactional_drop_shards; \dt transactional_drop_shards
-- verify shards are dropped -- verify shards are dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
\c - - - :master_port \c - - - :master_port
@ -83,7 +83,7 @@ ORDER BY
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
\c - - - :master_port \c - - - :master_port
@ -105,7 +105,7 @@ ORDER BY
-- verify shards are dropped -- verify shards are dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
\c - - - :master_port \c - - - :master_port
@ -129,11 +129,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_shards; \dt transactional_drop_shards
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
\c - - - :master_port \c - - - :master_port
@ -156,7 +156,7 @@ ORDER BY
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
-- test DROP table with failing worker -- test DROP table with failing worker
@ -186,11 +186,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_shards; \dt transactional_drop_shards
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
\c - - - :master_port \c - - - :master_port
@ -214,11 +214,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_reference; \dt transactional_drop_reference
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_reference*; \dt transactional_drop_reference*
\c - - - :master_port \c - - - :master_port
@ -240,7 +240,7 @@ ORDER BY
-- verify shards are not dropped -- verify shards are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_shards_*; \dt transactional_drop_shards_*
DROP EVENT TRIGGER fail_drop_table; DROP EVENT TRIGGER fail_drop_table;
\c - - - :master_port \c - - - :master_port
@ -267,11 +267,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is not dropped -- verify table is not dropped
\d transactional_drop_serial; \dt transactional_drop_serial
-- verify shards and sequence are not dropped -- verify shards and sequence are not dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_serial_1410006; \dt transactional_drop_serial_*
\ds transactional_drop_serial_column2_seq \ds transactional_drop_serial_column2_seq
\c - - - :master_port \c - - - :master_port
@ -293,11 +293,11 @@ ORDER BY
shardid, nodename, nodeport; shardid, nodename, nodeport;
-- verify table is dropped -- verify table is dropped
\d transactional_drop_serial; \dt transactional_drop_serial
-- verify shards and sequence are dropped -- verify shards and sequence are dropped
\c - - - :worker_1_port \c - - - :worker_1_port
\d transactional_drop_serial_1410006; \dt transactional_drop_serial_*
\ds transactional_drop_serial_column2_seq \ds transactional_drop_serial_column2_seq
\c - - - :master_port \c - - - :master_port