From 0a9f0581210042e052f801816566f7c720ef0fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADzio=20de=20Royes=20Mello?= Date: Mon, 2 Dec 2024 18:47:04 -0300 Subject: [PATCH] Fix flaky reorder regression test Execute manual `VACUUM` on the hypertable before reordering a chunk to avoid flaky test output. --- tsl/test/expected/reorder.out | 3 ++- tsl/test/sql/reorder.sql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tsl/test/expected/reorder.out b/tsl/test/expected/reorder.out index 9933a3f61e0..6b7257125ad 100644 --- a/tsl/test/expected/reorder.out +++ b/tsl/test/expected/reorder.out @@ -1273,9 +1273,10 @@ CREATE INDEX ct2_time_idx ON ct2(time DESC); CLUSTER ct2 USING ct2_time_idx; -- deleted chunks are removed correctly DELETE FROM ct2 where time < 2 OR val < 2; +VACUUM ct2; SELECT reorder_chunk('_timescaledb_internal._hyper_2_3_chunk', verbose => TRUE); INFO: reordering "_timescaledb_internal._hyper_2_3_chunk" using sequential scan and sort -INFO: "_hyper_2_3_chunk": found 2 removable, 3 nonremovable row versions in 1 pages +INFO: "_hyper_2_3_chunk": found 0 removable, 3 nonremovable row versions in 1 pages reorder_chunk --------------- diff --git a/tsl/test/sql/reorder.sql b/tsl/test/sql/reorder.sql index 768c2b5b0f7..dda69fafc2d 100644 --- a/tsl/test/sql/reorder.sql +++ b/tsl/test/sql/reorder.sql @@ -200,6 +200,7 @@ CLUSTER ct2 USING ct2_time_idx; -- deleted chunks are removed correctly DELETE FROM ct2 where time < 2 OR val < 2; +VACUUM ct2; SELECT reorder_chunk('_timescaledb_internal._hyper_2_3_chunk', verbose => TRUE); SELECT ctid, time, val FROM _timescaledb_internal._hyper_2_3_chunk ORDER BY time;