Re: Re: pg_basebackup: could not get transaction log end position from server: FATAL: could not open file "./pg_hba.conf~": Permission denied - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Re: pg_basebackup: could not get transaction log end position from server: FATAL: could not open file "./pg_hba.conf~": Permission denied
Date
Msg-id 5376696E.2040306@vmware.com
Whole thread Raw
In response to Re: pg_basebackup: could not get transaction log end position from server: FATAL: could not open file "./pg_hba.conf~": Permission denied  (David G Johnston <david.g.johnston@gmail.com>)
List pgsql-hackers
On 05/16/2014 08:11 PM, David G Johnston wrote:
> Can we simply backup the non-data parts of $PGDATA first then move onto the
> data-parts?  For the files that we'd be dealing with it would be
> sufficiently quick to just try and fail, immediately, then check for all
> possible preconditions first.  The main issue seems to be the case where the
> 2TB of data get backed-up and then a small 1k file blows away all that work.
> Lets do those 1k files first.

You'll still need to distinguish "data" and "non-data" parts somehow. 
One idea would be to backup any files in the top directory first, before 
recursing into the subdirectories. That would've caught the OP's case, 
and probably many other typical cases where you drop something 
unexpected into $PGDATA. You could still have something funny nested 
deep in the data directory, but that's much less common.

- Heikki



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: btree_gist macaddr valgrind woes
Next
From: Andres Freund
Date:
Subject: Re: btree_gist macaddr valgrind woes