Re: Finalizing read stream users' flag choices

Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>

From: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Melanie Plageman <melanieplageman@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-12T14:55:39Z
Lists: pgsql-hackers
Hi,

Could you please help to clarify the READ_STREAM_SEQUENTIAL usage
policy. There are several places that use the callback
'block_range_read_stream_cb'. So it means all of them have the same
sequential access pattern. But only one of them (amcheck
verify_heapam) uses READ_STREAM_SEQUENTIAL. Why is it? Is it correct
to say that 'block_range_read_stream_cb' produces a simple enough
pattern so we don't need READ_STREAM_SEQUENTIAL with it? OTOH we know
in advance that we want to read data strictly sequentially, so why not
let OS detect the pattern, if it does a better job as the comment
around READ_STREAM_SEQUENTIAL says. So amcheck usage looks valid too..


Best regards,
Arseniy Mukhin