pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bogus tar-file padding logic for standby.signal.
Date: Mon, 27 Apr 2020 18:07:20 +0000
Message-ID: <E1jT8A4-0002DF-Nq@gemulon.postgresql.org> (raw)

Fix bogus tar-file padding logic for standby.signal.

When pg_basebackup -R is used, we inject standby.signal into the
tar file for the main tablespace. The proper thing to do is to pad
each file injected into the tar file out to a 512-byte boundary
by appending nulls, but here the file is of length 0 and we add
511 zero bytes.  Since 0 is already a multiple of 512, we should
not add any zero bytes. Do that instead.

Patch by me, reviewed by Tom Lane.

Discussion: http://postgr.es/m/CA+TgmobWbfReO9-XFk8urR1K4wTNwqoHx_v56t7=T8KaiEoKNw@mail.gmail.com

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1jT8A4-0002DF-Nq@gemulon.postgresql.org>
Permalink:  ../E1jT8A4-0002DF-Nq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jT8A4-0002DF-Nq@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: rhaas@postgresql.org
  Subject: Re: pgsql: Fix bogus tar-file padding logic for standby.signal.
  In-Reply-To: <E1jT8A4-0002DF-Nq@gemulon.postgresql.org>
  References: <E1jT8A4-0002DF-Nq@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