pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Additional write barrier in AdvanceXLInsertBuffer().
Date: Wed, 20 Dec 2023 01:44:29 +0000
Message-ID: <E1rFldM-00B0Kl-K5@gemulon.postgresql.org> (raw)

Additional write barrier in AdvanceXLInsertBuffer().

First, mark the xlblocks member with InvalidXLogRecPtr, then issue a
write barrier, then initialize it. That ensures that the xlblocks
member doesn't appear valid while the contents are being initialized.

In preparation for reading WAL buffer contents without a lock.

Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACVfFMfqD5oLzZSQQZWfXiJqd-NdX0_317veP6FuB31QWA@mail.gmail.com
Reviewed-by: Andres Freund

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/766571be16598b401b5527208847145edc6be1f4

Modified Files
--------------
src/backend/access/transam/xlog.c | 8 ++++++++
1 file changed, 8 insertions(+)



Message-ID: <E1rFldM-00B0Kl-K5@gemulon.postgresql.org>
Permalink:  ../E1rFldM-00B0Kl-K5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rFldM-00B0Kl-K5@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: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Additional write barrier in AdvanceXLInsertBuffer().
  In-Reply-To: <E1rFldM-00B0Kl-K5@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