pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add read_stream_{pause,resume}()
Date: Tue, 03 Mar 2026 21:04:39 +0000
Message-ID: <E1vxWv1-002F5e-1B@gemulon.postgresql.org> (raw)

Add read_stream_{pause,resume}()

Read stream users can now pause lookahead when no blocks are currently
available. After resuming, subsequent read_stream_next_buffer() calls
continue lookahead with the previous lookahead distance.

This is especially useful for read stream users with self-referential
access patterns (where consuming already-read buffers can produce
additional block numbers).

Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKGJLT2JvWLEiBXMbkSSc5so_Y7%3DN%2BS2ce7npjLw8QL3d5w%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/38229cb905165fe676ab8728cb9dd0833a5534ed

Modified Files
--------------
src/backend/storage/aio/read_stream.c | 27 +++++++++++++++++++++++++++
src/include/storage/read_stream.h     |  2 ++
2 files changed, 29 insertions(+)



Message-ID: <E1vxWv1-002F5e-1B@gemulon.postgresql.org>
Permalink:  ../E1vxWv1-002F5e-1B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vxWv1-002F5e-1B@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add read_stream_{pause,resume}()
  In-Reply-To: <E1vxWv1-002F5e-1B@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox