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 1fpe2T-0006hc-12 for pgsql-general@arkaria.postgresql.org; Tue, 14 Aug 2018 18:27:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpe2R-0004F3-F2 for pgsql-general@arkaria.postgresql.org; Tue, 14 Aug 2018 18:27:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpe2R-0004En-2q for pgsql-general@lists.postgresql.org; Tue, 14 Aug 2018 18:27:27 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpe2O-0000Cs-8L for pgsql-general@lists.postgresql.org; Tue, 14 Aug 2018 18:27:25 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 9B91E5F79C; Tue, 14 Aug 2018 14:27:23 -0400 (EDT) Date: Tue, 14 Aug 2018 14:27:23 -0400 From: Stephen Frost To: Ron Cc: pgsql-general@lists.postgresql.org Subject: Re: pg_basebackup failed to read a file Message-ID: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JqdxN8yMrvvaufxH" Content-Disposition: inline In-Reply-To: <465f0460-608b-39a6-aa15-204c82de6335@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --JqdxN8yMrvvaufxH Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Ron (ronljohnsonjr@gmail.com) wrote: > On 08/14/2018 11:14 AM, Tom Lane wrote: > >Mike Cardwell writes: > >>pg_basebackup: could not get write-ahead log end position from server: > >>ERROR:=A0=A0could 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. >=20 > 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 --JqdxN8yMrvvaufxH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbcx8KAAoJEO1sijiDR2RVJMYP/0Fkexv9itxEqfibLgS0VypX DVUHw9exP08b01Se3zOzdmP467TpWOPGgdhzAYonAYbA7cGoLswt18GrbvBOLtQs GSNpmn29dQLfMyCPyXKG44M9nY24UnX72S4392utna8GxIHS33Nm9EbmF/EnGGYa 12osrN6qgtDoa0WMqhIbVUahQxqNSx/65Dyr5NS4/qqodLRNJIX7g4YdRKqx1rbt ZF/W/kRv3i5hrKd3gBM0Z2Ne5zM/QowWdJB3INf7jZ07xRqgU3Kv/NvqTY8fHCkO L5SF8ds72I8VLML20BvHeqCOnlyKN1l8WotCS6r6KVcKufiRjO0/FXwb9cNBapkb tJiwDXXMpGheaGBimFdBWJTyahlu3fG4FbWSu++WWpab179BhnKfojGGFW2iYbs7 WFMk5MgFaDWVJ1uxXBdwHU94M4tTcH2a6zX2lzrvopWSjO13/hj6F444kYvZV53T cuGRJSjOnRIifJPvrVKyl8grs4qM/vUiMiNh/bhOhyChVbLL+Jm2E+2zdGF9hWLJ eSSkXI+4e6kGfIvIhR2p8eTcQ977E+k99nX+fn4I4Mn8gAM461yXZVPPwt3FqrcG lZGb796qwsYdAPPk0xBnWRc64qiYDlUrUB7dmdIy6flRO1p4FQ0JRl4aLRbQay+9 gqOaawwfwndEq2TnB+U6 =Fwxq -----END PGP SIGNATURE----- --JqdxN8yMrvvaufxH--