Re: pg_basebackup fails with long tablespace paths

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup fails with long tablespace paths
Date: 2014-10-21 03:47:44
Message-ID: CAA4eK1+s_yKpzJkW1sHA9RXdSbZGHGssGXNP_F2t9z_DhgNZ6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 21, 2014 at 12:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> My Salesforce colleague Thomas Fanghaenel observed that the TAP tests
> for pg_basebackup fail when run in a sufficiently deeply-nested directory
> tree. The cause appears to be that we rely on standard "tar" format
> to represent the symlink for a tablespace, and POSIX tar format has a
> hard-wired restriction of 99 bytes in a symlink's expansion.
>
> What do we want to do about this? I think a minimum expectation would be
> for pg_basebackup to notice and complain when it's trying to create an
> unworkably long symlink entry, but it would be far better if we found a
> way to cope instead.

One way to cope with such a situation could be that during backup we create
a backup symlink file which contains listing of symlinks and then archive
recovery recreates it. Basically this is the solution (patch), I have
proposed
for Windows [1].

[1] - https://commitfest.postgresql.org/action/patch_view?id=1512

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Brightwell, Adam 2014-10-21 05:35:53 Re: [TODO] Track number of files ready to be archived in pg_stat_archiver
Previous Message Noah Misch 2014-10-21 03:46:28 Re: narwhal and PGDLLIMPORT