agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert PROC_HDR->startupBufferPinWaitBuf to an atomic variable.
Date: Tue, 22 Sep 2026 18:22:28 +0000
Message-ID: <E1x958O-00000000o1A-2dJj@gemulon.postgresql.org> (raw)

Convert PROC_HDR->startupBufferPinWaitBuf to an atomic variable.

Currently, this variable is a Buffer that is accessed via a
volatile pointer.  By converting it to an atomic variable, we can
remove the volatile qualifiers.  No barriers are needed because the
value is published before the backends that read it are signaled.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Tested-by: solai v <solai.cdac@gmail.com>
Discussion: https://postgr.es/m/alAJeRRzehDjLaF1%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cb4a03db9ed7606da1c36e4214a6c5fd6437a26c

Modified Files
--------------
src/backend/storage/lmgr/proc.c | 12 +++---------
src/include/storage/proc.h      |  2 +-
2 files changed, 4 insertions(+), 10 deletions(-)



view thread (2+ messages)

Message-ID: <E1x958O-00000000o1A-2dJj@gemulon.postgresql.org>
Permalink:  ../E1x958O-00000000o1A-2dJj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x958O-00000000o1A-2dJj@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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Convert PROC_HDR->startupBufferPinWaitBuf to an atomic variable.
  In-Reply-To: <E1x958O-00000000o1A-2dJj@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox