model-writtenrun 1070 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro opened the thread with a pgvector HNSW streaming experiment that gathered known neighbor blocks before visiting them, exposing the need to preserve lookahead distance across temporary interruptions #1.
- Heikki Linnakangas and Jonathan S. Katz argued that faster searches on indexes exceeding memory were useful; Heikki described a similar neighbor-gathering prototype, while Jonathan suggested IVFFlat as another promising streaming target #2 #3.
- Thomas revised the experiment to reuse a stream between neighbor batches and described an accompanying PostgreSQL reset-policy change to preserve concurrency, reporting cold-cache gains later corrected to roughly fourfold on Linux and two-and-a-half-fold on macOS with suitable concurrency settings #4 #6.
- After more than a year, actual pgvector integration exposed performance regressions from repeatedly resetting lookahead distance, prompting Thomas to reopen the issue as a possible backpatchable bug #7.
- Melanie Plageman proposed a separate function to avoid changing existing reset behavior, and Thomas adopted that design as read_stream_resume(), posting a minimal implementation and smoke test #8 #9 #10.
- Nazir Bilal Yavuz approved the implementation and questioned the repeated end-of-stream checks, which Thomas explained demonstrated that exhaustion persisted until an explicit resume; Melanie also reported successful pgvector testing #11 #12 #13.
- Melanie supplied a revision requiring the stream to be drained before resuming and preserving distance during reset; Nazir suggested an assertion instead of an error, while Melanie explained her concern about production queries encountering unexpected buffered blocks #14 #15 #16.
- Thomas shifted the focus to PostgreSQL 19 and deferred backpatching, replacing the draining restriction with explicit pause/resume operations and adding yield support so callbacks could return control without excessive lookahead work; Melanie welcomed the revised interface #17 #18.
- Peter Geoghegan emphasized limiting accumulated tuples and TIDs, and Tomas Vondra described correlated-index and index-only-scan cases where lookahead could consume many leaf pages, leaving broader flow-control and prefetch-distance policy questions open #19 #20.
- Melanie committed the pause/resume subset of #17 as 38229cb905, omitting yield support and tests while adding initialization of saved distance during stream creation and reset.
- In the final message, Melanie explained that tests had been deferred while other read-stream tests were imminent, then reposted Thomas's resume test in the new test infrastructure with an incremental SQL-output-based alternative; pause/resume had landed, but these tests still needed work and no additional user of resume had been added for the release #21.