pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Error when creating names too long for tar format
3+ messages / 2 participants
[nested] [flat]

* pgsql: Error when creating names too long for tar format
@ 2015-02-24 18:42  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Peter Eisentraut @ 2015-02-24 18:42 UTC (permalink / raw)
  To: pgsql-committers

Error when creating names too long for tar format

The tar format (at least the version we are using), does not support
file names or symlink targets longer than 99 bytes.  Until now, the tar
creation code would silently truncate any names that are too long.  (Its
original application was pg_dump, where this never happens.)  This
creates problems when running base backups over the replication
protocol.

The most important problem is when a tablespace path is longer than 99
bytes, which will result in a truncated tablespace path being backed up.
Less importantly, the basebackup protocol also promises to back up any
other files it happens to find in the data directory, which would also
lead to file name truncation if someone put a file with a long name in
there.

Now both of these cases result in an error during the backup.

Add tests that fail when a too-long file name or symlink is attempted to
be backed up.

Reviewed-by: Robert Hass <robertmhaas@gmail.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/23a78352c0a0dc21d6120bd868f0b2d07395b537

Modified Files
--------------
src/backend/replication/basebackup.c         |   21 ++++++++++++++++++++-
src/bin/pg_basebackup/t/010_pg_basebackup.pl |   15 ++++++++++++++-
src/include/pgtar.h                          |   10 +++++++++-
src/port/tar.c                               |   10 +++++++++-
4 files changed, 52 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* Re: pgsql: Error when creating names too long for tar format
@ 2015-02-24 20:51  Robert Haas <robertmhaas@gmail.com>
  parent: Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Robert Haas @ 2015-02-24 20:51 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers

On Tue, Feb 24, 2015 at 1:42 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> Reviewed-by: Robert Hass <robertmhaas@gmail.com>

Typo.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



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

* Re: pgsql: Error when creating names too long for tar format
@ 2015-02-24 21:01  Peter Eisentraut <peter_e@gmx.net>
  parent: Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2015-02-24 21:01 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-committers

On 2/24/15 3:51 PM, Robert Haas wrote:
> On Tue, Feb 24, 2015 at 1:42 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>> Reviewed-by: Robert Hass <robertmhaas@gmail.com>
> 
> Typo.

Sorry


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



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


end of thread, other threads:[~2015-02-24 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-02-24 18:42 pgsql: Error when creating names too long for tar format Peter Eisentraut <peter_e@gmx.net>
2015-02-24 20:51 ` Robert Haas <robertmhaas@gmail.com>
2015-02-24 21:01   ` Peter Eisentraut <peter_e@gmx.net>

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