Add missing ORDER BY clause to dist_hypertable test

This commit is contained in:
Sven Klemm 2021-06-18 17:17:09 +02:00 committed by Sven Klemm
parent 71e8f13871
commit d800e2f46f
3 changed files with 22 additions and 22 deletions

View File

@ -130,7 +130,7 @@ $$);
CREATE TRIGGER _0_test_trigger_insert
BEFORE INSERT ON disttable
FOR EACH ROW EXECUTE FUNCTION test_trigger();
SELECT * FROM _timescaledb_catalog.hypertable_data_node;
SELECT * FROM _timescaledb_catalog.hypertable_data_node ORDER BY 1,2,3;
hypertable_id | node_hypertable_id | node_name | block_chunks
---------------+--------------------+----------------------+--------------
1 | 1 | db_dist_hypertable_1 | f
@ -141,7 +141,7 @@ SELECT * FROM _timescaledb_catalog.hypertable_data_node;
2 | 2 | db_dist_hypertable_3 | f
(6 rows)
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+-----------
(0 rows)
@ -304,7 +304,7 @@ FROM show_chunks('disttable');
(6 rows)
-- Show that there are assigned node_chunk_id:s in chunk data node mappings
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
1 | 1 | db_dist_hypertable_1
@ -1031,7 +1031,7 @@ FROM test.show_subtables('disttable') st;
(0 rows)
-- Check that the chunks are assigned data nodes
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
1 | 1 | db_dist_hypertable_1
@ -1613,12 +1613,12 @@ ORDER BY hypertable_schema, hypertable_name;
INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1),
('2017-01-02 07:01', 2, 3.5);
WARNING: insufficient number of data nodes
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
10 | 4 | db_dist_hypertable_3
10 | 4 | db_dist_hypertable_1
10 | 4 | db_dist_hypertable_2
10 | 4 | db_dist_hypertable_3
(3 rows)
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
@ -1629,12 +1629,12 @@ FROM show_chunks('underreplicated');
(1 row)
-- Show chunk data node mappings
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
10 | 4 | db_dist_hypertable_3
10 | 4 | db_dist_hypertable_1
10 | 4 | db_dist_hypertable_2
10 | 4 | db_dist_hypertable_3
(3 rows)
-- Show that chunks are created on remote data nodes and that all

View File

@ -130,7 +130,7 @@ $$);
CREATE TRIGGER _0_test_trigger_insert
BEFORE INSERT ON disttable
FOR EACH ROW EXECUTE FUNCTION test_trigger();
SELECT * FROM _timescaledb_catalog.hypertable_data_node;
SELECT * FROM _timescaledb_catalog.hypertable_data_node ORDER BY 1,2,3;
hypertable_id | node_hypertable_id | node_name | block_chunks
---------------+--------------------+----------------------+--------------
1 | 1 | db_dist_hypertable_1 | f
@ -141,7 +141,7 @@ SELECT * FROM _timescaledb_catalog.hypertable_data_node;
2 | 2 | db_dist_hypertable_3 | f
(6 rows)
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+-----------
(0 rows)
@ -304,7 +304,7 @@ FROM show_chunks('disttable');
(6 rows)
-- Show that there are assigned node_chunk_id:s in chunk data node mappings
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
1 | 1 | db_dist_hypertable_1
@ -1030,7 +1030,7 @@ FROM test.show_subtables('disttable') st;
(0 rows)
-- Check that the chunks are assigned data nodes
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
1 | 1 | db_dist_hypertable_1
@ -1612,12 +1612,12 @@ ORDER BY hypertable_schema, hypertable_name;
INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1),
('2017-01-02 07:01', 2, 3.5);
WARNING: insufficient number of data nodes
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
10 | 4 | db_dist_hypertable_3
10 | 4 | db_dist_hypertable_1
10 | 4 | db_dist_hypertable_2
10 | 4 | db_dist_hypertable_3
(3 rows)
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
@ -1628,12 +1628,12 @@ FROM show_chunks('underreplicated');
(1 row)
-- Show chunk data node mappings
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
chunk_id | node_chunk_id | node_name
----------+---------------+----------------------
10 | 4 | db_dist_hypertable_3
10 | 4 | db_dist_hypertable_1
10 | 4 | db_dist_hypertable_2
10 | 4 | db_dist_hypertable_3
(3 rows)
-- Show that chunks are created on remote data nodes and that all

View File

@ -124,8 +124,8 @@ CREATE TRIGGER _0_test_trigger_insert
BEFORE INSERT ON disttable
FOR EACH ROW EXECUTE FUNCTION test_trigger();
SELECT * FROM _timescaledb_catalog.hypertable_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.hypertable_data_node ORDER BY 1,2,3;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
-- The constraints, indexes, and triggers on the hypertable
SELECT * FROM test.show_constraints('disttable');
@ -213,7 +213,7 @@ SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
FROM show_chunks('disttable');
-- Show that there are assigned node_chunk_id:s in chunk data node mappings
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
-- Show that chunks are created on data nodes and that each data node
-- has their own unique slice in the space (device) dimension.
@ -334,7 +334,7 @@ SELECT st."Child" as chunk_relid, test.show_triggers((st)."Child")
FROM test.show_subtables('disttable') st;
-- Check that the chunks are assigned data nodes
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
-- Adding a new trigger should not recurse to foreign chunks
CREATE TRIGGER _1_test_trigger_insert
@ -494,12 +494,12 @@ ORDER BY hypertable_schema, hypertable_name;
INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1),
('2017-01-02 07:01', 2, 3.5);
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
FROM show_chunks('underreplicated');
-- Show chunk data node mappings
SELECT * FROM _timescaledb_catalog.chunk_data_node;
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
-- Show that chunks are created on remote data nodes and that all
-- data nodes/chunks have the same data due to replication