diff --git a/test/t/003_ivfflat_vector_build_recall.pl b/test/t/003_ivfflat_vector_build_recall.pl index 02a5fd08..633712c1 100644 --- a/test/t/003_ivfflat_vector_build_recall.pl +++ b/test/t/003_ivfflat_vector_build_recall.pl @@ -14,7 +14,7 @@ sub test_recall my ($probes, $min, $operator) = @_; my $correct = 0; my $total = 0; - my $work_mem = int(rand(4 * 1024)) + 64; + my $work_mem = int(rand(512)) + 64; my $explain = $node->safe_psql("postgres", qq( SET enable_seqscan = off; diff --git a/test/t/041_ivfflat_iterative_scan.pl b/test/t/041_ivfflat_iterative_scan.pl index 7c3dd91e..63cd8214 100644 --- a/test/t/041_ivfflat_iterative_scan.pl +++ b/test/t/041_ivfflat_iterative_scan.pl @@ -36,11 +36,14 @@ foreach ((30, 50, 70)) for my $i (1 .. 20) { + my $work_mem = int(rand(512)) + 64; + $count = $node->safe_psql("postgres", qq( SET enable_seqscan = off; SET ivfflat.probes = 10; SET ivfflat.iterative_scan = relaxed_order; SET ivfflat.max_probes = $max_probes; + SET work_mem = '${work_mem}kB'; SELECT COUNT(*) FROM (SELECT v FROM tst WHERE i % 10000 = 0 ORDER BY v <-> (SELECT v FROM tst WHERE i = $i) LIMIT 11) t; )); $sum += $count; diff --git a/test/t/042_ivfflat_iterative_scan_recall.pl b/test/t/042_ivfflat_iterative_scan_recall.pl index c697f943..8ccc3fc4 100644 --- a/test/t/042_ivfflat_iterative_scan_recall.pl +++ b/test/t/042_ivfflat_iterative_scan_recall.pl @@ -15,11 +15,13 @@ sub test_recall my ($c, $probes, $min, $operator) = @_; my $correct = 0; my $total = 0; + my $work_mem = int(rand(512)) + 64; my $explain = $node->safe_psql("postgres", qq( SET enable_seqscan = off; SET ivfflat.probes = $probes; SET ivfflat.iterative_scan = relaxed_order; + SET work_mem = '${work_mem}kB'; EXPLAIN ANALYZE SELECT i FROM tst WHERE i % $c = 0 ORDER BY v $operator '$queries[0]' LIMIT $limit; )); like($explain, qr/Index Scan using idx on tst/); @@ -30,6 +32,7 @@ sub test_recall SET enable_seqscan = off; SET ivfflat.probes = $probes; SET ivfflat.iterative_scan = relaxed_order; + SET work_mem = '${work_mem}kB'; SELECT i FROM tst WHERE i % $c = 0 ORDER BY v $operator '$queries[$i]' LIMIT $limit; )); my @actual_ids = split("\n", $actual);