From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: bufmgr: Restructure AsyncReadBuffers()
Date: Thu, 26 Mar 2026 16:32:18 +0000
Message-ID: <E1w5nd3-001ZE2-2g@gemulon.postgresql.org> (raw)
bufmgr: Restructure AsyncReadBuffers()
Restructure AsyncReadBuffers() to use early return when the head buffer is
already valid, instead of using a did_start_io flag and if/else branches. Also
move around a bit of the code to be located closer to where it is used. This
is a refactor only.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/zljergweqti7x67lg5ije2rzjusie37nslsnkjkkby4laqqbfw@3p3zu522yykv
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8a1a1d6ab86217020a612ee2e03eae4fe00ae781
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 157 +++++++++++++++++++-----------------
1 file changed, 81 insertions(+), 76 deletions(-)
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: Restructure AsyncReadBuffers()
In-Reply-To: <E1w5nd3-001ZE2-2g@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