diff --git a/test/t/043_hnsw_iterative_scan.pl b/test/t/043_hnsw_iterative_scan.pl index 3e22a8a..fe0f671 100644 --- a/test/t/043_hnsw_iterative_scan.pl +++ b/test/t/043_hnsw_iterative_scan.pl @@ -28,6 +28,7 @@ my $count = $node->safe_psql("postgres", qq( SET enable_seqscan = off; SET hnsw.iterative_scan = relaxed_order; SET hnsw.max_scan_tuples = 100000; + SET hnsw.scan_mem_multiplier = 2; SELECT COUNT(*) FROM (SELECT v FROM tst WHERE i % 10000 = 0 ORDER BY v <-> (SELECT v FROM tst LIMIT 1) LIMIT 11) t; )); is($count, 10); @@ -44,6 +45,7 @@ foreach ((30000, 50000, 70000)) SET enable_seqscan = off; SET hnsw.iterative_scan = relaxed_order; SET hnsw.max_scan_tuples = $max_tuples; + SET hnsw.scan_mem_multiplier = 2; 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; @@ -59,7 +61,6 @@ my ($ret, $stdout, $stderr) = $node->psql("postgres", qq( SET hnsw.iterative_scan = relaxed_order; SET client_min_messages = debug1; SET work_mem = '1MB'; - SET hnsw.scan_mem_multiplier = 1; SELECT COUNT(*) FROM (SELECT v FROM tst WHERE i % 10000 = 0 ORDER BY v <-> (SELECT v FROM tst LIMIT 1) LIMIT 11) t; )); like($stderr, qr/hnsw index scan reached memory limit after \d+ tuples/);