Skip site navigation (1) Skip section navigation (2)

pgsql: Fix tar files emitted by pg_dump and pg_basebackup to be POSIXc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix tar files emitted by pg_dump and pg_basebackup to be POSIXc
Date: 2012-09-28 19:19:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant.

Both programs got the "magic" string wrong, causing standard-conforming tar
implementations to believe the output was just legacy tar format without
any POSIX extensions.  This doesn't actually matter that much, especially
since pg_dump failed to fill the POSIX fields anyway, but still there is
little point in emitting tar format if we can't be compliant with the
standard.  In addition, pg_dump failed to write the EOF marker correctly
(there should be 2 blocks of zeroes not just one), pg_basebackup put the
numeric group ID in the wrong place, and both programs had a pretty
brain-dead idea of how to compute the checksum.  Fix all that and improve
the comments a bit.

pg_restore is modified to accept either the correct POSIX-compliant "magic"
string or the previous value.  This part of the change will need to be
back-patched to avoid an unnecessary compatibility break when a previous
version tries to read tar-format output from 9.3 pg_dump.

Brian Weaver and Tom Lane



Modified Files
doc/src/sgml/protocol.sgml           |    8 ++-
src/backend/replication/basebackup.c |   63 +++++++++++++++---------
src/bin/pg_dump/pg_backup_tar.c      |   87 ++++++++++++++++++++-------------
src/bin/pg_dump/pg_backup_tar.h      |   21 +++++----
4 files changed, 110 insertions(+), 69 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-09-28 19:36:04
Subject: pgsql: Fix tar files emitted by pg_basebackup to be POSIX conformant.
Previous:From: Peter EisentrautDate: 2012-09-28 00:24:15
Subject: pgsql: Produce textual error messages for LDAP issues instead ofnumeri

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group