From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: refactor: Move BackendWritebackContext initialization
Date: Fri, 09 Oct 2026 22:21:04 +0000
Message-ID: <E1xFIxc-000000010DQ-3uUQ@gemulon.postgresql.org> (raw)
refactor: Move BackendWritebackContext initialization
BackendWritebackContext is a purely per-process thing, so it feels
wrong to initialize it in the shmem init/attach functions. Move the
initialization to InitBufferManagerAccess() instead.
Backpatch to version 19, where the new shared memory callbacks system
was introduced. While this isn't new with that, it made the ShmemInit
functions more closely related to shared memory initialization than
before.
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/fb1bd612-4a58-4235-976f-2b2ef036bfff@iki.fi
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/15a947f30726cadff695b7601329d90b6703e268
Modified Files
--------------
src/backend/storage/buffer/buf_init.c | 15 ---------------
src/backend/storage/buffer/bufmgr.c | 6 ++++++
src/include/storage/buf_internals.h | 1 -
3 files changed, 6 insertions(+), 16 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: refactor: Move BackendWritebackContext initialization
In-Reply-To: <E1xFIxc-000000010DQ-3uUQ@gemulon.postgresql.org>
References: <E1xFIxc-000000010DQ-3uUQ@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