mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 11:03:36 +08:00
Add missing ORDER BY clause to dist_hypertable test
This commit is contained in:
parent
71e8f13871
commit
d800e2f46f
@ -130,7 +130,7 @@ $$);
|
|||||||
CREATE TRIGGER _0_test_trigger_insert
|
CREATE TRIGGER _0_test_trigger_insert
|
||||||
BEFORE INSERT ON disttable
|
BEFORE INSERT ON disttable
|
||||||
FOR EACH ROW EXECUTE FUNCTION test_trigger();
|
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
|
hypertable_id | node_hypertable_id | node_name | block_chunks
|
||||||
---------------+--------------------+----------------------+--------------
|
---------------+--------------------+----------------------+--------------
|
||||||
1 | 1 | db_dist_hypertable_1 | f
|
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
|
2 | 2 | db_dist_hypertable_3 | f
|
||||||
(6 rows)
|
(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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+-----------
|
----------+---------------+-----------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
@ -304,7 +304,7 @@ FROM show_chunks('disttable');
|
|||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
-- Show that there are assigned node_chunk_id:s in chunk data node mappings
|
-- 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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
1 | 1 | db_dist_hypertable_1
|
1 | 1 | db_dist_hypertable_1
|
||||||
@ -1031,7 +1031,7 @@ FROM test.show_subtables('disttable') st;
|
|||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
-- Check that the chunks are assigned data nodes
|
-- 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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
1 | 1 | db_dist_hypertable_1
|
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),
|
INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1),
|
||||||
('2017-01-02 07:01', 2, 3.5);
|
('2017-01-02 07:01', 2, 3.5);
|
||||||
WARNING: insufficient number of data nodes
|
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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
10 | 4 | db_dist_hypertable_3
|
|
||||||
10 | 4 | db_dist_hypertable_1
|
10 | 4 | db_dist_hypertable_1
|
||||||
10 | 4 | db_dist_hypertable_2
|
10 | 4 | db_dist_hypertable_2
|
||||||
|
10 | 4 | db_dist_hypertable_3
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
|
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
|
||||||
@ -1629,12 +1629,12 @@ FROM show_chunks('underreplicated');
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Show chunk data node mappings
|
-- 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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
10 | 4 | db_dist_hypertable_3
|
|
||||||
10 | 4 | db_dist_hypertable_1
|
10 | 4 | db_dist_hypertable_1
|
||||||
10 | 4 | db_dist_hypertable_2
|
10 | 4 | db_dist_hypertable_2
|
||||||
|
10 | 4 | db_dist_hypertable_3
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
-- Show that chunks are created on remote data nodes and that all
|
-- Show that chunks are created on remote data nodes and that all
|
||||||
|
@ -130,7 +130,7 @@ $$);
|
|||||||
CREATE TRIGGER _0_test_trigger_insert
|
CREATE TRIGGER _0_test_trigger_insert
|
||||||
BEFORE INSERT ON disttable
|
BEFORE INSERT ON disttable
|
||||||
FOR EACH ROW EXECUTE FUNCTION test_trigger();
|
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
|
hypertable_id | node_hypertable_id | node_name | block_chunks
|
||||||
---------------+--------------------+----------------------+--------------
|
---------------+--------------------+----------------------+--------------
|
||||||
1 | 1 | db_dist_hypertable_1 | f
|
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
|
2 | 2 | db_dist_hypertable_3 | f
|
||||||
(6 rows)
|
(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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+-----------
|
----------+---------------+-----------
|
||||||
(0 rows)
|
(0 rows)
|
||||||
@ -304,7 +304,7 @@ FROM show_chunks('disttable');
|
|||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
-- Show that there are assigned node_chunk_id:s in chunk data node mappings
|
-- 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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
1 | 1 | db_dist_hypertable_1
|
1 | 1 | db_dist_hypertable_1
|
||||||
@ -1030,7 +1030,7 @@ FROM test.show_subtables('disttable') st;
|
|||||||
(0 rows)
|
(0 rows)
|
||||||
|
|
||||||
-- Check that the chunks are assigned data nodes
|
-- 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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
1 | 1 | db_dist_hypertable_1
|
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),
|
INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1),
|
||||||
('2017-01-02 07:01', 2, 3.5);
|
('2017-01-02 07:01', 2, 3.5);
|
||||||
WARNING: insufficient number of data nodes
|
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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
10 | 4 | db_dist_hypertable_3
|
|
||||||
10 | 4 | db_dist_hypertable_1
|
10 | 4 | db_dist_hypertable_1
|
||||||
10 | 4 | db_dist_hypertable_2
|
10 | 4 | db_dist_hypertable_2
|
||||||
|
10 | 4 | db_dist_hypertable_3
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
|
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
|
||||||
@ -1628,12 +1628,12 @@ FROM show_chunks('underreplicated');
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Show chunk data node mappings
|
-- 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
|
chunk_id | node_chunk_id | node_name
|
||||||
----------+---------------+----------------------
|
----------+---------------+----------------------
|
||||||
10 | 4 | db_dist_hypertable_3
|
|
||||||
10 | 4 | db_dist_hypertable_1
|
10 | 4 | db_dist_hypertable_1
|
||||||
10 | 4 | db_dist_hypertable_2
|
10 | 4 | db_dist_hypertable_2
|
||||||
|
10 | 4 | db_dist_hypertable_3
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
-- Show that chunks are created on remote data nodes and that all
|
-- Show that chunks are created on remote data nodes and that all
|
||||||
|
@ -124,8 +124,8 @@ CREATE TRIGGER _0_test_trigger_insert
|
|||||||
BEFORE INSERT ON disttable
|
BEFORE INSERT ON disttable
|
||||||
FOR EACH ROW EXECUTE FUNCTION test_trigger();
|
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;
|
||||||
SELECT * FROM _timescaledb_catalog.chunk_data_node;
|
SELECT * FROM _timescaledb_catalog.chunk_data_node ORDER BY 1,2,3;
|
||||||
|
|
||||||
-- The constraints, indexes, and triggers on the hypertable
|
-- The constraints, indexes, and triggers on the hypertable
|
||||||
SELECT * FROM test.show_constraints('disttable');
|
SELECT * FROM test.show_constraints('disttable');
|
||||||
@ -213,7 +213,7 @@ SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
|
|||||||
FROM show_chunks('disttable');
|
FROM show_chunks('disttable');
|
||||||
|
|
||||||
-- Show that there are assigned node_chunk_id:s in chunk data node mappings
|
-- 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
|
-- Show that chunks are created on data nodes and that each data node
|
||||||
-- has their own unique slice in the space (device) dimension.
|
-- 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;
|
FROM test.show_subtables('disttable') st;
|
||||||
|
|
||||||
-- Check that the chunks are assigned data nodes
|
-- 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
|
-- Adding a new trigger should not recurse to foreign chunks
|
||||||
CREATE TRIGGER _1_test_trigger_insert
|
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),
|
INSERT INTO underreplicated VALUES ('2017-01-01 06:01', 1, 1.1),
|
||||||
('2017-01-02 07:01', 2, 3.5);
|
('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)).*
|
SELECT (_timescaledb_internal.show_chunk(show_chunks)).*
|
||||||
FROM show_chunks('underreplicated');
|
FROM show_chunks('underreplicated');
|
||||||
|
|
||||||
-- Show chunk data node mappings
|
-- 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
|
-- Show that chunks are created on remote data nodes and that all
|
||||||
-- data nodes/chunks have the same data due to replication
|
-- data nodes/chunks have the same data due to replication
|
||||||
|
Loading…
x
Reference in New Issue
Block a user