mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-19 22:20:37 +00:00
The neon.flush_output_after was not effective, at least not in a sequential scan, because neon_read_at_lsn() flushed the prefetch queue on every call anyway. Change neon_read_at_lsn() so that it only flushes the queue if the GetPage request that it needs to wait for hasn't alrady been flushed. To make that possible, move the tracking of unflushed requests into a new ring_flush variable, alongside the other ring buffer indexes. While we're at it, mark neon.flush_output_after as PGC_USERSET, so that it can be changed per-session with "SET neon.flush_output_after = ...". Makes it easier to test different values.