From 193f4b9b0f5f4e11439cc23d2c78a7cf3d19cd32 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 18 Nov 2026 00:38:27 -0800 Subject: [PATCH] Added work_mem to TAP test [skip ci] --- test/t/003_ivfflat_vector_build_recall.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/t/003_ivfflat_vector_build_recall.pl b/test/t/003_ivfflat_vector_build_recall.pl index cb23ca8c..02a5fd08 100644 --- a/test/t/003_ivfflat_vector_build_recall.pl +++ b/test/t/003_ivfflat_vector_build_recall.pl @@ -14,10 +14,12 @@ sub test_recall my ($probes, $min, $operator) = @_; my $correct = 0; my $total = 0; + my $work_mem = int(rand(4 * 1024)) + 64; my $explain = $node->safe_psql("postgres", qq( SET enable_seqscan = off; SET ivfflat.probes = $probes; + SET work_mem = '${work_mem}kB'; EXPLAIN ANALYZE SELECT i FROM tst ORDER BY v $operator '$queries[0]' LIMIT $limit; )); like($explain, qr/Index Scan using idx on tst/); @@ -27,6 +29,7 @@ sub test_recall my $actual = $node->safe_psql("postgres", qq( SET enable_seqscan = off; SET ivfflat.probes = $probes; + SET work_mem = '${work_mem}kB'; SELECT i FROM tst ORDER BY v $operator '$queries[$i]' LIMIT $limit; )); my @actual_ids = split("\n", $actual);