diff --git a/README.md b/README.md index 5268be6..45e091f 100644 --- a/README.md +++ b/README.md @@ -497,14 +497,18 @@ Specify the max number of additional tuples visited SET hnsw.ef_stream = 10000; ``` -The scan will also end if reaches `work_mem`, at which point a notice is shown +The scan will also end if reaches `work_mem`. You can see when this happens by enabling debug messages. + +```sql +SET client_min_messages = debug1; +``` ```text -NOTICE: hnsw index scan exceeded work_mem after 50000 tuples +DEBUG: hnsw index scan exceeded work_mem after 10000 tuples HINT: Increase work_mem to scan more tuples. ``` -Adjust this with: +If the server has enough memory, you can adjust this with: ```sql SET work_mem = '8MB'; diff --git a/test/t/041_hnsw_streaming.pl b/test/t/041_hnsw_streaming.pl index f2d9b3b..fa6bde4 100644 --- a/test/t/041_hnsw_streaming.pl +++ b/test/t/041_hnsw_streaming.pl @@ -58,6 +58,7 @@ foreach ((30000, 50000, 70000)) my ($ret, $stdout, $stderr) = $node->psql("postgres", qq( SET enable_seqscan = off; SET hnsw.streaming = on; + SET client_min_messages = debug1; SET work_mem = '2MB'; SELECT COUNT(*) FROM (SELECT v FROM tst WHERE i % 10000 = 0 ORDER BY v <-> (SELECT v FROM tst LIMIT 1) LIMIT 11) t; ));