Re: pg_basebackup option for handling symlinks - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_basebackup option for handling symlinks
Date
Msg-id 1326739955.29466.5.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: pg_basebackup option for handling symlinks  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pg_basebackup option for handling symlinks  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On sön, 2012-01-08 at 22:22 +0100, Magnus Hagander wrote:
> On Sun, Jan 8, 2012 at 21:53, Peter Eisentraut <peter_e@gmx.net> wrote:
> > I've recently had a possible need for telling pg_basebackup how to
> > handle symlinks in the remote data directory, instead of ignoring them,
> > which is what currently happens.  Possible options were recreating the
> > symlink locally (pointing to a file on the local system) or copying the
> > file the symlink points to.  This is mainly useful in scenarios where
> > configuration files are symlinked from the data directory.  Has anyone
> > else had the need for this?  Is it worth pursuing?
> 
> Yes.
> 
> I came up to the same issue though - in one case it would've been best
> to copy the link, in the other case it would've been best to copy the
> contents of the file :S Couldn't decide which was most important...
> Maybe a switch would be needed?

Yes.  Do we need to preserve the third behavior of ignoring symlinks?

tar has an -h option that causes symlinks to be followed.  The default
there is to archive the symlink itself.



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pgstat documentation tables
Next
From: Peter Eisentraut
Date:
Subject: Re: Should I implement DROP INDEX CONCURRENTLY?