pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: bufmgr: Return whether WaitReadBuffers() needed to wait
Date: Wed, 01 Apr 2026 13:27:15 +0000
Message-ID: <E1w7vbG-002SpJ-1e@gemulon.postgresql.org> (raw)

bufmgr: Return whether WaitReadBuffers() needed to wait

Thanks to the previous commit, pgaio_wref_check_done() will now detect whether
IO has completed even if userspace has not yet consumed the kernel completion.
This knowledge can be useful for callers of WaitReadBuffers() to know whether
it needed to wait or not, e.g. for adjusting read-ahead aggressiveness or for
instrumentation.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/f3xxfrkafjxpyqxywcxricxgyizjirfceychyxsgn7bwjp5eda@kwbduhy7tfmu
Discussion: https://postgr.es/m/CAH2-Wz%3DkMg3PNay96cHMT0LFwtxP-cQSRZTZzh1Cixxf8G%3Dzrw%40mail.gmail.com
Discussion: https://postgr.es/m/a177a6dd-240b-455a-8f25-aca0b1c08c6e@vondra.me

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/513374a47a71d64ff5c4790b7f962d3a80e8cc7c

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 17 ++++++++++++++++-
src/include/storage/bufmgr.h        |  2 +-
2 files changed, 17 insertions(+), 2 deletions(-)



Message-ID: <E1w7vbG-002SpJ-1e@gemulon.postgresql.org>
Permalink:  ../E1w7vbG-002SpJ-1e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w7vbG-002SpJ-1e@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: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: bufmgr: Return whether WaitReadBuffers() needed to wait
  In-Reply-To: <E1w7vbG-002SpJ-1e@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