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

Add vacuum to fix flaky tests #7452

Merged
merged 4 commits into from
Nov 18, 2024
Merged
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
3 changes: 2 additions & 1 deletion tsl/test/expected/compression.out
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,7 @@ SELECT compress_chunk(i) FROM show_chunks('f_sensor_data') i;
(1 row)

CALL reindex_compressed_hypertable('f_sensor_data');
VACUUM ANALYZE f_sensor_data;
akuzm marked this conversation as resolved.
Show resolved Hide resolved
-- Encourage use of parallel plans
SET parallel_setup_cost = 0;
SET parallel_tuple_cost = 0;
Expand Down Expand Up @@ -1827,7 +1828,7 @@ SELECT * FROM f_sensor_data WHERE sensor_id > 100;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Gather
Output: _hyper_37_73_chunk."time", _hyper_37_73_chunk.sensor_id, _hyper_37_73_chunk.cpu, _hyper_37_73_chunk.temperature
Workers Planned: 2
Workers Planned: 3
-> Custom Scan (DecompressChunk) on _timescaledb_internal._hyper_37_73_chunk
Output: _hyper_37_73_chunk."time", _hyper_37_73_chunk.sensor_id, _hyper_37_73_chunk.cpu, _hyper_37_73_chunk.temperature
-> Parallel Index Scan using compress_hyper_38_74_chunk_sensor_id__ts_meta_min_1__ts_met_idx on _timescaledb_internal.compress_hyper_38_74_chunk
Expand Down
1 change: 1 addition & 0 deletions tsl/test/expected/compression_ddl.out
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,7 @@ SELECT compress_chunk(show_chunks('test_partials'));
_timescaledb_internal._hyper_33_122_chunk
(3 rows)

VACUUM ANALYZE test_partials;
-- fully compressed
EXPLAIN (costs off) SELECT * FROM test_partials ORDER BY time;
QUERY PLAN
Expand Down
2 changes: 2 additions & 0 deletions tsl/test/sql/compression.sql
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ ALTER TABLE f_sensor_data SET (timescaledb.compress, timescaledb.compress_segmen
SELECT compress_chunk(i) FROM show_chunks('f_sensor_data') i;
CALL reindex_compressed_hypertable('f_sensor_data');

VACUUM ANALYZE f_sensor_data;

-- Encourage use of parallel plans
SET parallel_setup_cost = 0;
SET parallel_tuple_cost = 0;
Expand Down
1 change: 1 addition & 0 deletions tsl/test/sql/compression_ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ VALUES -- chunk1
-- enable compression, compress all chunks
ALTER TABLE test_partials SET (timescaledb.compress);
SELECT compress_chunk(show_chunks('test_partials'));
VACUUM ANALYZE test_partials;
-- fully compressed
EXPLAIN (costs off) SELECT * FROM test_partials ORDER BY time;
-- test P, F, F
Expand Down
Loading