Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq6Ll-0007Hd-BR for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 00:41:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fq6Lj-0007a5-GP for pgsql-general@arkaria.postgresql.org; Thu, 16 Aug 2018 00:41:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq6Lj-0007Zy-8R for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 00:41:15 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fq6Lg-0000Iz-FN for pgsql-general@lists.postgresql.org; Thu, 16 Aug 2018 00:41:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 28D5021C24; Wed, 15 Aug 2018 20:41:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 15 Aug 2018 20:41:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=jthjhW1DkN/fY578ODoSn3i8oaXUTcQWOuyaBt+lLX8=; b=Cqky64zR dDL2tBZXns9nyrTnTnsR+tNsPhfqqJwTC79XMbGR+1YTb7JB6tyN6d4+EhRZ0Gyj 2s3xMqWP+ocQ3uMJVwi0us9SWLiquYJKSAQR3fJvbPM3aJT+zoY49s09ufBAC52h QPxn9qYvH6tuj5cFhx8Ux2H3lesh2mKOEwE6W98twZrSUm8h8ZN/Rb/avjBTH1Vs aUXOSRuCSsyOBqNhcG5RZrogj58hN08rrRzH4mng+UPQpniJPtSKkljsakwAd7JY h8x5cvFwGNV+BESMHaIo5RiT57IpGe+cwYhZqICfp5VqGhfZArpZUvbi+g+GNLD1 vJFuZ6DUPoFaqQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=jthjhW1DkN/fY578ODoSn3i8oaXUT cQWOuyaBt+lLX8=; b=V/+Ur6SMs307MmANwU6bQ1zGyYTvupcP9p+f3Rp0v7STu FRibwKcJnaofCrc+HJujXG00uN/7eY4CPpMLSMDP9cuvijofSdqkZP6PxgNDaQHt Mw2ua0HhrDNwrPvyWmOxmA3Bh/A3rDMY8rEHaaXo0QNS4MyEPjnX9+HczNqjxEls NhDEXr2P0n7yJPn+Atmd8Sy/UIbIW7qU2XU9i5RQZdWQHi5OMT1QM7GnDvn3CPJ9 fZ4iJfzSWpVB8l5zs+byutx54LJDW9c+uYL3jSKtPV6KwVuruUlD7hahGihkUsJV akWbPxklVanw17V3570AxaYzjS/rZx7c9EIqSVGnw== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (mp76f1f99d.ap.nuro.jp [118.241.249.157]) by mail.messagingengine.com (Postfix) with ESMTPA id C17FDE405D; Wed, 15 Aug 2018 20:41:08 -0400 (EDT) Date: Thu, 16 Aug 2018 02:41:05 +0200 From: Michael Paquier To: Tom Lane Cc: Mike Cardwell , pgsql-general@lists.postgresql.org Subject: Re: pg_basebackup failed to read a file Message-ID: <20180816004105.GF3681@paquier.xyz> References: <1534256304.6834.4.camel@hardenize.com> <1887.1534263299@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="K/NRh952CO+2tg14" Content-Disposition: inline In-Reply-To: <1887.1534263299@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --K/NRh952CO+2tg14 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --K/NRh952CO+2tg14 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlt0yCEACgkQnvQgOdby QH2zFA/9GJDGK7ezWPlTGAVPbzOk3o9C6IDajcQiC5sX3JywtA3x+GLLAo/08t8t goG4iI3VbxZyMmWIqUTBKCZmJapdwLjCUQ3iV1XFI7RcskLb4g56aizOTrBNOmuc pCS9afElAIdGLsifdJWB4yws28/eEpvQH9yTN+7TO1kSi88nwfHMnC/tmQ9h+O3Q d1uQ9oCgOLjX+oVxhdvzxmNK5JRhwVNwA78PrAx8v5WsUEtU4XdNu2sLmA6uc6OM bslMx+CVBAWmFfB5FdcKqTrisoZArqMt+IDmMURMioVijy9dED/z5nhfUHIoq6UB uFudRi0T7lxxHuWmmG2pUhhTuhkf6L3IYn/sVZ0AV1djYjscWgZq+AW8Ld4FEZuW BZMcjVzZAvcxK7kf+JsgXRfdh0BSkqpWehN9n0gvXdfpuMDsWQn2wauWDtYd+pRV WKixs6ekB6/0N5kqvJHcg7r2/NzvYsvRLPh7+vB0bLe8Hat/XuB5u2A9jQ0AKhK1 b6YPZawF2T3QKLXVWpZ63mSFWEW706nj2ffiNPimhgWbPR+pJsY+F0UoZMJaG2mm P6QyhAH1C924S4Moa9p8OD7Gqsw1KMupuYolggWXXMfDJF8bdp5O9PL735g14rFK ZVNTm4DAORoyIMW1TFybTDdR/6NsQD7fMGPJYvZOwSYDrusylbk= =mQJn -----END PGP SIGNATURE----- --K/NRh952CO+2tg14--