Re: pg_basebackup fails with long tablespace paths

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Oskari Saarenmaa <os(at)ohmu(dot)fi>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: pg_basebackup fails with long tablespace paths
Date: 2014-12-24 13:10:46
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 12/22/14 5:40 PM, Oskari Saarenmaa wrote:
> I think we should just use the UStar tar format
> ( and
> allow long file names; all actively used tar implementations should be
> able to handle them. I'll try to write a patch for that soonish.

UStar doesn't handle long link targets, only long file names (and then
only up to 255 characters, which doesn't seem satisfactory).

AFAICT, to allow long link targets, the available solutions are either
pax extended headers or GNU-specific long-link extra headers.

When I create a symlink with a long target and call tar on it, GNU tar
by default creates the GNU long-link header and BSD tar by default
creates a pax header. But they are both able to extract either one.

As a demo for how this might look, attached is a wildly incomplete patch
to produce GNU long-link headers.

Attachment Content-Type Size
tar-gnu-longlink.patch application/x-patch 4.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2014-12-24 13:12:16 Re: pg_basebackup fails with long tablespace paths
Previous Message Michael Paquier 2014-12-24 12:42:28 Moving RestoreBlockImage from xlogreader.c to xlogutils.c