pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_basebackup failed to read a file
Date: Tue, 14 Aug 2018 14:27:23 -0400
Message-ID: <20180814182722.GX3326@tamriel.snowman.net> (raw)
In-Reply-To: <465f0460-608b-39a6-aa15-204c82de6335@gmail.com>
References: <1534256304.6834.4.camel@hardenize.com>
	<1887.1534263299@sss.pgh.pa.us>
	<465f0460-608b-39a6-aa15-204c82de6335@gmail.com>

Greetings,

* Ron (ronljohnsonjr@gmail.com) wrote:
> On 08/14/2018 11:14 AM, Tom Lane wrote:
> >Mike Cardwell <mike.cardwell@hardenize.com> writes:
> >>pg_basebackup: could not get write-ahead log end position from server:
> >>ERROR:  could not open file "./postgresql.conf~": Permission denied
> >>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.
> >That seems like a pretty expensive thing to do, if there are lots of
> >files ... and you'd still end up failing, so it's not moving the ball
> >very far.
> 
> Why is checking a bunch of file permissions anywhere close to being as
> expensive as transferring 1.5TB over a WAN link?

One could argue that the cost would be bourn by everyone who is using
pg_basebackup and not just those users who are transferring 1.5TB over a
WAN link.

That said, pgbackrest always builds a full manifest by scanning all of
the directories, tablespaces, files, etc, and I can't recall anyone ever
complaining about it.  Certainly, failing fast would be better than
failing after a lot of time has been spent.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (7+ messages)  latest in thread

Message-ID: <20180814182722.GX3326@tamriel.snowman.net>
Permalink:  ../20180814182722.GX3326@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20180814182722.GX3326@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, ronljohnsonjr@gmail.com
  Subject: Re: pg_basebackup failed to read a file
  In-Reply-To: <20180814182722.GX3326@tamriel.snowman.net>
  References: <1534256304.6834.4.camel@hardenize.com> <1887.1534263299@sss.pgh.pa.us> <465f0460-608b-39a6-aa15-204c82de6335@gmail.com> <20180814182722.GX3326@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox