pg_basebackup failed to read a file

From: Mike Cardwell <mike(dot)cardwell(at)hardenize(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: pg_basebackup failed to read a file
Date: 2018-08-14 14:18:24
Message-ID: 1534256304.6834.4.camel@hardenize.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I was just setting up streaming replication for the first time. I ran
pg_basebackup on the slave. It copied 1.5TB of data. Then it errored
out with:

```
1498215035/1498215035 kB (100%), 1/1 tablespace
pg_basebackup: could not get write-ahead log end position from server:
ERROR:  could not open file "./postgresql.conf~": Permission denied
pg_basebackup: removing data directory "/var/lib/pgsql/10/data"
bash-4.2$
```

Now, I know what this error means. There was a root owned file at
"/var/lib/pgsql/10/data/postgresql.conf~" which contained an old
version of our postgres config and was not readable by the postgres
user. I'll delete this file and try again. However, in the mean time: I
feel like it would be useful for pg_basebackup to check that it has
read access to all of the existing files in the source directory at the
start, before it begins it's copy. I'd like to submit this as a feature
request, but I'm struggling to find how to do that. So here I am... Can
anyone point me in the right direction?

Regards,

Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-08-14 14:25:08 Re: Copying data from a CSV file into a table dynamically
Previous Message Don Seiler 2018-08-14 14:11:43 Re: Vacuum process waiting on BufferPin