Re: Finalizing read stream users' flag choices - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Finalizing read stream users' flag choices
Date
Msg-id go7c2sudqg4pp7dsabsak4ajugti4f3tyqoweja5ihcjiw65dc@yh6wi4zqys23
Whole thread Raw
In response to Finalizing read stream users' flag choices  (Melanie Plageman <melanieplageman@gmail.com>)
List pgsql-hackers
hi,

On 2025-04-08 12:06:47 -0400, Melanie Plageman wrote:
> And a somewhat related point, with buffered IO, READ_STREAM_SEQUENTIAL
> disables prefetching to encourage OS readahead. I don't know if any
> other users than sequential scan should do this.

Worth adding that prefetches are only issued when io_method==sync and thus
READ_STREAM_SEQUENTIAL only has an effect if io_method==sync.

I suspect we should retire READ_STREAM_SEQUENTIAL in 19 or so:

a) The sequential-ness detection has gotten smarter / more granular, reducing
   the need for forcing read_stream's hand.
b) There are plenty cases where READ_STREAM_SEQUENTIAL *hurts* with seqscans
   and io_method==sync, e.g. if there are plenty pre-existing buffers in s_b.
c) It doesn't have an effect with io_method != sync

But it'll depend a bit on our experiences.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Feature freeze
Next
From: Tom Lane
Date:
Subject: Re: Move tests of contrib/spi/ out of the core regression tests