Skip to content

Commit 65c4e46

Browse files
author
Konstantin Knizhnik
committed
Do not perform prefetch for temp relations
1 parent 010c0ea commit 65c4e46

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/storage/aio/read_stream.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,14 @@ read_stream_begin_relation(int flags,
392392
Oid tablespace_id;
393393
SMgrRelation smgr;
394394

395+
smgr = RelationGetSmgr(rel);
396+
395397
/*
396398
* NEON: We don't benefit from the OS readahead that callers with
397399
* READ_STREAM_SEQUENTIAL expect, so we disable that flag.
398400
*/
399-
flags &= ~READ_STREAM_SEQUENTIAL;
400-
401-
smgr = RelationGetSmgr(rel);
401+
if (!SmgrIsTemp(smgr))
402+
flags &= ~READ_STREAM_SEQUENTIAL;
402403

403404
/*
404405
* Decide how many I/Os we will allow to run at the same time. That

0 commit comments

Comments
 (0)