pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use pg_pwrite_zeros() in walmethods.c
Date: Tue, 08 Nov 2022 03:40:05 +0000
Message-ID: <E1osFT2-000746-Ut@gemulon.postgresql.org> (raw)

Use pg_pwrite_zeros() in walmethods.c

This change impacts pg_receivewal and pg_basebackup, for the pre-padding
with zeros of all the new non-compressed WAL segments, so as the code is
more robust on partial writes.  This makes the code consistent with the
backend (XLogFileInitInternal) when wal_init_zeros is enabled for the
WAL segment initialization.

Author: Bharath Rupireddy
Reviewed-by: Nathan Bossart, Andres Freund, Thomas Munro, Michael
Paquier
Discussion: https://postgr.es/m/CALj2ACUq7nAb7=bJNbK3yYmp-SZhJcXFR_pLk8un6XgDzDF3OA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/28cc2976a9cf0ed661dbc55f49f669192cce1c89

Modified Files
--------------
src/bin/pg_basebackup/walmethods.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)



Message-ID: <E1osFT2-000746-Ut@gemulon.postgresql.org>
Permalink:  ../E1osFT2-000746-Ut@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1osFT2-000746-Ut@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 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: michael@paquier.xyz
  Subject: Re: pgsql: Use pg_pwrite_zeros() in walmethods.c
  In-Reply-To: <E1osFT2-000746-Ut@gemulon.postgresql.org>
  References: <E1osFT2-000746-Ut@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