Skip to content

Conversation

@MMeent
Copy link
Contributor

@MMeent MMeent commented Nov 22, 2024

Neon doesn't have seqscan detection of its own, so disable read_stream from trying to use that readahead.

Neon PR: neondatabase/neon#9860

Neon doesn't have seqscan detection of its own, so disable read_stream from trying to use that readahead.
@MMeent MMeent merged commit 01fa3c4 into REL_17_STABLE_neon Dec 10, 2024
1 check passed
@MMeent MMeent deleted the fix/pg17-readstream-prefetching branch December 10, 2024 21:42
github-merge-queue bot pushed a commit to neondatabase/neon that referenced this pull request Dec 11, 2024
Neon doesn't have seqscan detection of its own, so stop read_stream from
trying to utilize that readahead, and instead make it issue readahead of
its own.

## Problem

@knizhnik noticed that we didn't issue smgrprefetch[v] calls for
seqscans in PG17 due to the move to the read_stream API, which assumes
that the underlying IO facilities do seqscan detection for readahead.
That is a wrong assumption when Neon is involved, so let's remove the
code that applies that assumption.

## Summary of changes
Remove the cases where seqscans are detected and prefetch is disabled as
a consequence, and instead don't do that detection.

PG PR: neondatabase/postgres#532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants