Hi ChangAo, Daniel, Enrique,

On Mon, Jul 13, 2026 at 9:50 AM Daniel Gustafsson wrote:
> Thanks for this work, I have it on my radar to review and commit for v20,
> but will wait for the work of cleaning up and fixing the online checksums
> code which is currrently ongoing for the beta period.

I read v2 against the current online-checksum code and the earlier design
thread.  I did not find a correctness problem in the conversion.
In particular, the fixed numblocks boundary is preserved, and ending the
stream on abort releases the buffers read ahead by the stream.

The main benefit of moving this path to ReadStream is that it can use the
future direct I/O and asynchronous I/O infrastructure without double
buffering.  Enrique's results also show an immediate reduction in system
calls and execution time.  It would also be interesting, though not a
prerequisite for moving the patch forward, to measure foreground throughput
and latency while checksum enable runs with a nonzero cost_delay and a fairly
low cost_limit.  Limiting its effect on a running workload is the reason
those parameters exist.

The other useful opposite case would be a database with many empty tables
and indexes.  v2 creates a stream for every existing fork,
while the current loop has almost no work for an empty fork.  Perhaps a
numblocks == 0 fast path is worthwhile regardless, but a short measurement
would tell us whether this matters.

Thank you!


Best regards, Andrey Borodin.



Reply via email to