pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mike Cardwell <mike.cardwell@hardenize.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_basebackup failed to read a file
Date: Thu, 16 Aug 2018 02:41:05 +0200
Message-ID: <20180816004105.GF3681@paquier.xyz> (raw)
In-Reply-To: <1887.1534263299@sss.pgh.pa.us>
References: <1534256304.6834.4.camel@hardenize.com>
	<1887.1534263299@sss.pgh.pa.us>

On Tue, Aug 14, 2018 at 12:14:59PM -0400, Tom Lane wrote:
> 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.

Yeah, I would think that with many small relations it is going to have a
measurable performance impact if we scan the whole data directory a
second time.

> More generally, this seems closely related to bug #14999 [1]
> which concerned pg_rewind's behavior in the face of unexpected file
> permissions within the data directory.  We ended up not doing anything
> about that except documenting it, which I wasn't very satisfied with,
> but the costs of doing better seemed to exceed the benefits.

Please feel free to read the end of the thread about details on the
matter.  There are many things you could do, all have drawbacks.

> It'd be nice to have a more coherent theory about what needs to be copied
> or not, and not fail on files that could simply be ignored.  Up to now
> we've resisted having any centrally defined knowledge of what can be
> inside a PG data directory, but maybe that bullet needs to be bitten.

Yeah, I have not really come up with a nice idea yet, especially when
things sometimes move with custom files that some users have been
deploying, so I am not completely sure that we'd need to do something
anyway, nor that it is worth the trouble.  One saner strategy may be to
split your custom file into a directory out of the main data folder...
--
Michael

Attachments:

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

view thread (7+ messages)

Message-ID: <20180816004105.GF3681@paquier.xyz>
Permalink:  ../20180816004105.GF3681@paquier.xyz/
Also on:    postgresql.org/message-id/20180816004105.GF3681@paquier.xyz

 · 

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: michael@paquier.xyz, tgl@sss.pgh.pa.us, mike.cardwell@hardenize.com
  Subject: Re: pg_basebackup failed to read a file
  In-Reply-To: <20180816004105.GF3681@paquier.xyz>
  References: <1534256304.6834.4.camel@hardenize.com> <1887.1534263299@sss.pgh.pa.us> <20180816004105.GF3681@paquier.xyz>

* 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