pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix bogus tar-file padding logic for standby.signal.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix bogus tar-file padding logic for standby.signal.
@ 2020-04-27 18:07 Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2020-04-27 18:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0278d3f79a30cd9ccd6646b8447b25c60ae7d01d

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix bogus tar-file padding logic for standby.signal.
@ 2020-04-27 18:07 Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2020-04-27 18:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-04-27 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 18:07 pgsql: Fix bogus tar-file padding logic for standby.signal. Robert Haas <rhaas@postgresql.org>
2020-04-27 18:07 pgsql: Fix bogus tar-file padding logic for standby.signal. Robert Haas <rhaas@postgresql.org>

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