Skip to content

Commit

Permalink
Fix flaky append regression test take 2
Browse files Browse the repository at this point in the history
In timescale#7512 we added manual `VACUUM` in all involved relations to avoid
flaky output tests.

But looks like it is not working very well specially on Windows builds,
so now we're replacing the output `Heap Fetches: [0-9]` for `Heap
Fetches: 0` to make have a more predictable output test.
  • Loading branch information
fabriziomello committed Dec 5, 2024
1 parent 396caf6 commit 0cf4e41
Show file tree
Hide file tree
Showing 24 changed files with 2,679 additions and 2,639 deletions.
4 changes: 2 additions & 2 deletions test/expected/null_exclusion-14.out
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ where ts >= (select max(ts) from metrics);
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 0
Expand All @@ -56,7 +56,7 @@ where ts >= (select max(ts) from metrics)
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 0
Expand Down
4 changes: 2 additions & 2 deletions test/expected/null_exclusion-15.out
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ where ts >= (select max(ts) from metrics);
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 0
Expand All @@ -56,7 +56,7 @@ where ts >= (select max(ts) from metrics)
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 0
Expand Down
4 changes: 2 additions & 2 deletions test/expected/null_exclusion-16.out
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ where ts >= (select max(ts) from metrics);
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 0
Expand All @@ -56,7 +56,7 @@ where ts >= (select max(ts) from metrics)
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Index Cond: (ts IS NOT NULL)
Heap Fetches: 0
Expand Down
4 changes: 2 additions & 2 deletions test/expected/null_exclusion-17.out
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ where ts >= (select max(ts) from metrics);
-> Custom Scan (ChunkAppend) on metrics metrics_1 (actual rows=1 loops=1)
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Heap Fetches: 0
-> Seq Scan on _hyper_1_1_chunk (never executed)
Expand All @@ -53,7 +53,7 @@ where ts >= (select max(ts) from metrics)
-> Custom Scan (ChunkAppend) on metrics metrics_1 (actual rows=1 loops=1)
Order: metrics_1.ts DESC
-> Index Only Scan using _hyper_1_2_chunk_metrics_ts_idx on _hyper_1_2_chunk _hyper_1_2_chunk_1 (actual rows=1 loops=1)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_1_1_chunk_metrics_ts_idx on _hyper_1_1_chunk _hyper_1_1_chunk_1 (never executed)
Heap Fetches: 0
-> Seq Scan on _hyper_1_1_chunk (never executed)
Expand Down
42 changes: 21 additions & 21 deletions test/expected/plan_ordered_append-14.out
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ ORDER BY 1,2 LIMIT 1;
-> Custom Scan (ChunkAppend) on dimension_only (actual rows=1 loops=1)
Order: dimension_only."time" DESC
-> Index Only Scan using _hyper_3_11_chunk_dimension_only_time_idx on _hyper_3_11_chunk (actual rows=1 loops=1)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_3_10_chunk_dimension_only_time_idx on _hyper_3_10_chunk (never executed)
Heap Fetches: 0
-> Index Only Scan using _hyper_3_9_chunk_dimension_only_time_idx on _hyper_3_9_chunk (never executed)
Expand Down Expand Up @@ -563,39 +563,39 @@ ORDER BY time DESC;
-> Merge Append (actual rows=49928 loops=1)
Sort Key: _hyper_7_52_chunk."time" DESC
-> Index Only Scan using _hyper_7_52_chunk_space3_time_idx on _hyper_7_52_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_50_chunk_space3_time_idx on _hyper_7_50_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_48_chunk_space3_time_idx on _hyper_7_48_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_46_chunk_space3_time_idx on _hyper_7_46_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_44_chunk_space3_time_idx on _hyper_7_44_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_42_chunk_space3_time_idx on _hyper_7_42_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_40_chunk_space3_time_idx on _hyper_7_40_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_38_chunk_space3_time_idx on _hyper_7_38_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Merge Append (actual rows=53760 loops=1)
Sort Key: _hyper_7_53_chunk."time" DESC
-> Index Only Scan using _hyper_7_53_chunk_space3_time_idx on _hyper_7_53_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_51_chunk_space3_time_idx on _hyper_7_51_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_49_chunk_space3_time_idx on _hyper_7_49_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_47_chunk_space3_time_idx on _hyper_7_47_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_45_chunk_space3_time_idx on _hyper_7_45_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_43_chunk_space3_time_idx on _hyper_7_43_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_41_chunk_space3_time_idx on _hyper_7_41_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_39_chunk_space3_time_idx on _hyper_7_39_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
(38 rows)

-- test COLLATION
Expand All @@ -608,9 +608,9 @@ ORDER BY time DESC;
Custom Scan (ChunkAppend) on sortopt_test (actual rows=12961 loops=1)
Order: sortopt_test."time", sortopt_test.device NULLS FIRST
-> Index Only Scan using _hyper_8_55_chunk_time_device_nullsfirst on _hyper_8_55_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_8_54_chunk_time_device_nullsfirst on _hyper_8_54_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
(6 rows)

-- test NULLS LAST
Expand All @@ -620,9 +620,9 @@ ORDER BY time DESC;
Custom Scan (ChunkAppend) on sortopt_test (actual rows=12961 loops=1)
Order: sortopt_test."time", sortopt_test.device DESC NULLS LAST
-> Index Only Scan using _hyper_8_55_chunk_time_device_nullslast on _hyper_8_55_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_8_54_chunk_time_device_nullslast on _hyper_8_54_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
(6 rows)

--generate the results into two different files
Expand Down
42 changes: 21 additions & 21 deletions test/expected/plan_ordered_append-15.out
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ ORDER BY 1,2 LIMIT 1;
-> Custom Scan (ChunkAppend) on dimension_only (actual rows=1 loops=1)
Order: dimension_only."time" DESC
-> Index Only Scan using _hyper_3_11_chunk_dimension_only_time_idx on _hyper_3_11_chunk (actual rows=1 loops=1)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_3_10_chunk_dimension_only_time_idx on _hyper_3_10_chunk (never executed)
Heap Fetches: 0
-> Index Only Scan using _hyper_3_9_chunk_dimension_only_time_idx on _hyper_3_9_chunk (never executed)
Expand Down Expand Up @@ -563,39 +563,39 @@ ORDER BY time DESC;
-> Merge Append (actual rows=49928 loops=1)
Sort Key: _hyper_7_52_chunk."time" DESC
-> Index Only Scan using _hyper_7_52_chunk_space3_time_idx on _hyper_7_52_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_50_chunk_space3_time_idx on _hyper_7_50_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_48_chunk_space3_time_idx on _hyper_7_48_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_46_chunk_space3_time_idx on _hyper_7_46_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_44_chunk_space3_time_idx on _hyper_7_44_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_42_chunk_space3_time_idx on _hyper_7_42_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_40_chunk_space3_time_idx on _hyper_7_40_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_38_chunk_space3_time_idx on _hyper_7_38_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Merge Append (actual rows=53760 loops=1)
Sort Key: _hyper_7_53_chunk."time" DESC
-> Index Only Scan using _hyper_7_53_chunk_space3_time_idx on _hyper_7_53_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_51_chunk_space3_time_idx on _hyper_7_51_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_49_chunk_space3_time_idx on _hyper_7_49_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_47_chunk_space3_time_idx on _hyper_7_47_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_45_chunk_space3_time_idx on _hyper_7_45_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_43_chunk_space3_time_idx on _hyper_7_43_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_41_chunk_space3_time_idx on _hyper_7_41_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_39_chunk_space3_time_idx on _hyper_7_39_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
(38 rows)

-- test COLLATION
Expand All @@ -608,9 +608,9 @@ ORDER BY time DESC;
Custom Scan (ChunkAppend) on sortopt_test (actual rows=12961 loops=1)
Order: sortopt_test."time", sortopt_test.device NULLS FIRST
-> Index Only Scan using _hyper_8_55_chunk_time_device_nullsfirst on _hyper_8_55_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_8_54_chunk_time_device_nullsfirst on _hyper_8_54_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
(6 rows)

-- test NULLS LAST
Expand All @@ -620,9 +620,9 @@ ORDER BY time DESC;
Custom Scan (ChunkAppend) on sortopt_test (actual rows=12961 loops=1)
Order: sortopt_test."time", sortopt_test.device DESC NULLS LAST
-> Index Only Scan using _hyper_8_55_chunk_time_device_nullslast on _hyper_8_55_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_8_54_chunk_time_device_nullslast on _hyper_8_54_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
(6 rows)

--generate the results into two different files
Expand Down
42 changes: 21 additions & 21 deletions test/expected/plan_ordered_append-16.out
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ ORDER BY 1,2 LIMIT 1;
-> Custom Scan (ChunkAppend) on dimension_only (actual rows=1 loops=1)
Order: dimension_only."time" DESC
-> Index Only Scan using _hyper_3_11_chunk_dimension_only_time_idx on _hyper_3_11_chunk (actual rows=1 loops=1)
Heap Fetches: 1
Heap Fetches: 0
-> Index Only Scan using _hyper_3_10_chunk_dimension_only_time_idx on _hyper_3_10_chunk (never executed)
Heap Fetches: 0
-> Index Only Scan using _hyper_3_9_chunk_dimension_only_time_idx on _hyper_3_9_chunk (never executed)
Expand Down Expand Up @@ -563,39 +563,39 @@ ORDER BY time DESC;
-> Merge Append (actual rows=49928 loops=1)
Sort Key: _hyper_7_52_chunk."time" DESC
-> Index Only Scan using _hyper_7_52_chunk_space3_time_idx on _hyper_7_52_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_50_chunk_space3_time_idx on _hyper_7_50_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_48_chunk_space3_time_idx on _hyper_7_48_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_46_chunk_space3_time_idx on _hyper_7_46_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_44_chunk_space3_time_idx on _hyper_7_44_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_42_chunk_space3_time_idx on _hyper_7_42_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_40_chunk_space3_time_idx on _hyper_7_40_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Index Only Scan using _hyper_7_38_chunk_space3_time_idx on _hyper_7_38_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
-> Merge Append (actual rows=53760 loops=1)
Sort Key: _hyper_7_53_chunk."time" DESC
-> Index Only Scan using _hyper_7_53_chunk_space3_time_idx on _hyper_7_53_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_51_chunk_space3_time_idx on _hyper_7_51_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_49_chunk_space3_time_idx on _hyper_7_49_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_47_chunk_space3_time_idx on _hyper_7_47_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_45_chunk_space3_time_idx on _hyper_7_45_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_43_chunk_space3_time_idx on _hyper_7_43_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_41_chunk_space3_time_idx on _hyper_7_41_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_7_39_chunk_space3_time_idx on _hyper_7_39_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
(38 rows)

-- test COLLATION
Expand All @@ -608,9 +608,9 @@ ORDER BY time DESC;
Custom Scan (ChunkAppend) on sortopt_test (actual rows=12961 loops=1)
Order: sortopt_test."time", sortopt_test.device NULLS FIRST
-> Index Only Scan using _hyper_8_55_chunk_time_device_nullsfirst on _hyper_8_55_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_8_54_chunk_time_device_nullsfirst on _hyper_8_54_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
(6 rows)

-- test NULLS LAST
Expand All @@ -620,9 +620,9 @@ ORDER BY time DESC;
Custom Scan (ChunkAppend) on sortopt_test (actual rows=12961 loops=1)
Order: sortopt_test."time", sortopt_test.device DESC NULLS LAST
-> Index Only Scan using _hyper_8_55_chunk_time_device_nullslast on _hyper_8_55_chunk (actual rows=6720 loops=1)
Heap Fetches: 6720
Heap Fetches: 0
-> Index Only Scan using _hyper_8_54_chunk_time_device_nullslast on _hyper_8_54_chunk (actual rows=6241 loops=1)
Heap Fetches: 6241
Heap Fetches: 0
(6 rows)

--generate the results into two different files
Expand Down
Loading

0 comments on commit 0cf4e41

Please sign in to comment.