Fix unstable aggregate regression test
authorDavid Rowley <drowley@postgresql.org>
Wed, 27 Mar 2024 11:13:48 +0000 (00:13 +1300)
committerDavid Rowley <drowley@postgresql.org>
Wed, 27 Mar 2024 11:13:48 +0000 (00:13 +1300)
Buildfarm member avocet has shown a plan change by switching the
finalize aggregate stage to use a GroupAggregate rather than a
HashAggregate.  This is consistent with autovacuum having triggered on
the table, per analysis by Alexander Lakhin.

Fix this by disabling autovacuum on the table.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/d4493a28-589a-5328-fed5-250f2d7d3e2a@gmail.com
Backpatch-through: 16, where this test was added.

src/test/regress/expected/aggregates.out
src/test/regress/sql/aggregates.sql

index d54a255e58206d13ea40eb05377e40e8595c6208..50695d83a2b146f3b3f514649ee5ba5c87b257cd 100644 (file)
@@ -1930,7 +1930,7 @@ select string_agg(v, decode('ee', 'hex')) from bytea_test_table;
 
 drop table bytea_test_table;
 -- Test parallel string_agg and array_agg
-create table pagg_test (x int, y int);
+create table pagg_test (x int, y int) with (autovacuum_enabled = off);
 insert into pagg_test
 select (case x % 4 when 1 then null else x end), x % 10
 from generate_series(1,5000) x;
index 441e01d150c06c9084324c82152d3efa7e88327d..2905848eadc02c6265efb81a80f5206f3dcb2387 100644 (file)
@@ -749,7 +749,7 @@ select string_agg(v, decode('ee', 'hex')) from bytea_test_table;
 drop table bytea_test_table;
 
 -- Test parallel string_agg and array_agg
-create table pagg_test (x int, y int);
+create table pagg_test (x int, y int) with (autovacuum_enabled = off);
 insert into pagg_test
 select (case x % 4 when 1 then null else x end), x % 10
 from generate_series(1,5000) x;