Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky reorder regression test take 2 #7538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions test/expected/cluster-14.out
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ INSERT INTO cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1),
-- Run cluster
CLUSTER VERBOSE cluster_test USING cluster_test_time_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using index scan on "_hyper_1_1_chunk_cluster_test_time_idx"
INFO: "_hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using index scan on "_hyper_1_2_chunk_cluster_test_time_idx"
INFO: "_hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Create a third chunk
INSERT INTO cluster_test VALUES ('2017-01-22T09:00:01', 19.5, 3);
-- Show clustered indexes
Expand All @@ -41,11 +39,8 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder just our table
CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using index scan on "_hyper_1_3_chunk_cluster_test_time_idx"
INFO: "_hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show clustered indexes, including new chunk
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -61,22 +56,15 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder all tables (although will only be our test table)
CLUSTER VERBOSE;
INFO: clustering "public.cluster_test" using sequential scan and sort
INFO: "cluster_test": found 0 removable, 0 nonremovable row versions in 0 pages
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Change the clustered index
CREATE INDEX ON cluster_test (time, location);
CLUSTER VERBOSE cluster_test using cluster_test_time_location_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show updated clustered indexes
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down Expand Up @@ -105,11 +93,8 @@ ORDER BY 1,2;

CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE cluster_test SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -135,7 +120,6 @@ ORDER BY 1,2;

CLUSTER VERBOSE _timescaledb_internal._hyper_1_1_chunk;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE _timescaledb_internal._hyper_1_1_chunk SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down
16 changes: 0 additions & 16 deletions test/expected/cluster-15.out
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ INSERT INTO cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1),
-- Run cluster
CLUSTER VERBOSE cluster_test USING cluster_test_time_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using index scan on "_hyper_1_1_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using index scan on "_hyper_1_2_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Create a third chunk
INSERT INTO cluster_test VALUES ('2017-01-22T09:00:01', 19.5, 3);
-- Show clustered indexes
Expand All @@ -41,11 +39,8 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder just our table
CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using index scan on "_hyper_1_3_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show clustered indexes, including new chunk
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -61,22 +56,15 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder all tables (although will only be our test table)
CLUSTER VERBOSE;
INFO: clustering "public.cluster_test" using sequential scan and sort
INFO: "public.cluster_test": found 0 removable, 0 nonremovable row versions in 0 pages
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Change the clustered index
CREATE INDEX ON cluster_test (time, location);
CLUSTER VERBOSE cluster_test using cluster_test_time_location_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show updated clustered indexes
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down Expand Up @@ -105,11 +93,8 @@ ORDER BY 1,2;

CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE cluster_test SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -135,7 +120,6 @@ ORDER BY 1,2;

CLUSTER VERBOSE _timescaledb_internal._hyper_1_1_chunk;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE _timescaledb_internal._hyper_1_1_chunk SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down
16 changes: 0 additions & 16 deletions test/expected/cluster-16.out
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ INSERT INTO cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1),
-- Run cluster
CLUSTER VERBOSE cluster_test USING cluster_test_time_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using index scan on "_hyper_1_1_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using index scan on "_hyper_1_2_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Create a third chunk
INSERT INTO cluster_test VALUES ('2017-01-22T09:00:01', 19.5, 3);
-- Show clustered indexes
Expand All @@ -41,11 +39,8 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder just our table
CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using index scan on "_hyper_1_3_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show clustered indexes, including new chunk
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -61,22 +56,15 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder all tables (although will only be our test table)
CLUSTER VERBOSE;
INFO: clustering "public.cluster_test" using sequential scan and sort
INFO: "public.cluster_test": found 0 removable, 0 nonremovable row versions in 0 pages
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Change the clustered index
CREATE INDEX ON cluster_test (time, location);
CLUSTER VERBOSE cluster_test using cluster_test_time_location_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show updated clustered indexes
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down Expand Up @@ -105,11 +93,8 @@ ORDER BY 1,2;

CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE cluster_test SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -135,7 +120,6 @@ ORDER BY 1,2;

CLUSTER VERBOSE _timescaledb_internal._hyper_1_1_chunk;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE _timescaledb_internal._hyper_1_1_chunk SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down
16 changes: 0 additions & 16 deletions test/expected/cluster-17.out
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ INSERT INTO cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1),
-- Run cluster
CLUSTER VERBOSE cluster_test USING cluster_test_time_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using index scan on "_hyper_1_1_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using index scan on "_hyper_1_2_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Create a third chunk
INSERT INTO cluster_test VALUES ('2017-01-22T09:00:01', 19.5, 3);
-- Show clustered indexes
Expand All @@ -41,11 +39,8 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder just our table
CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using index scan on "_hyper_1_3_chunk_cluster_test_time_idx"
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show clustered indexes, including new chunk
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -61,22 +56,15 @@ WHERE indisclustered = true ORDER BY 1;
-- Reorder all tables (although will only be our test table)
CLUSTER VERBOSE;
INFO: clustering "public.cluster_test" using sequential scan and sort
INFO: "public.cluster_test": found 0 removable, 0 nonremovable row versions in 0 pages
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Change the clustered index
CREATE INDEX ON cluster_test (time, location);
CLUSTER VERBOSE cluster_test using cluster_test_time_location_idx;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
-- Show updated clustered indexes
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down Expand Up @@ -105,11 +93,8 @@ ORDER BY 1,2;

CLUSTER VERBOSE cluster_test;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_2_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_2_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
INFO: clustering "_timescaledb_internal._hyper_1_3_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_3_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE cluster_test SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand All @@ -135,7 +120,6 @@ ORDER BY 1,2;

CLUSTER VERBOSE _timescaledb_internal._hyper_1_1_chunk;
INFO: clustering "_timescaledb_internal._hyper_1_1_chunk" using sequential scan and sort
INFO: "_timescaledb_internal._hyper_1_1_chunk": found 0 removable, 1 nonremovable row versions in 1 pages
ALTER TABLE _timescaledb_internal._hyper_1_1_chunk SET WITHOUT CLUSTER;
SELECT indexrelid::regclass, indisclustered
FROM pg_index
Expand Down
3 changes: 2 additions & 1 deletion test/runner_cleanup_output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ sed -e '/<exclude_from_test>/,/<\/exclude_from_test>/d' \
-e 's! Memory: [0-9]\{1,\}kB!!' \
-e 's! Memory Usage: [0-9]\{1,\}kB!!' \
-e 's! Average Peak Memory: [0-9]\{1,\}kB!!' \
-e '/Heap Fetches: [0-9]\{1,\}/d' | \
-e '/Heap Fetches: [0-9]\{1,\}/d' \
-e '/found [0-9]\{1,\} removable, [0-9]\{1,\} nonremovable row versions in [0-9]\{1,\} pages/d' | \
grep -v 'DEBUG: rehashing catalog cache id' | \
grep -v 'DEBUG: compacted fsync request queue from' | \
grep -v 'DEBUG: creating and filling new WAL file' | \
Expand Down
Loading
Loading