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 1fpa9c-0003Kq-D1 for pgsql-general@arkaria.postgresql.org; Tue, 14 Aug 2018 14:18:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpa9a-0002Ml-BG for pgsql-general@arkaria.postgresql.org; Tue, 14 Aug 2018 14:18:34 +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 1fpa9a-0002Md-0h for pgsql-general@lists.postgresql.org; Tue, 14 Aug 2018 14:18:34 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fpa9X-0006VF-3I for pgsql-general@lists.postgresql.org; Tue, 14 Aug 2018 14:18:33 +0000 Received: by mail-wm0-x241.google.com with SMTP id n11-v6so12370790wmc.2 for ; Tue, 14 Aug 2018 07:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenize-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:mime-version; bh=jyD5LBJJshJD+Cag9pAQ+gcWiDqOcEMPMFmUYUg79LI=; b=MO9awdchkW96YhOiayT27YdF06bUJ8O+8MYwalnidl7obyPVheaUUqS5zRHl/tFyTN mLLnyT1njkToBtJgUXK/Hg3hdWM+QUxcM9iIGgioVxw11BpdoaQsbs8j+JQp5DdesdPB F1VcJzjN5G88Jm2uask45JXc5FOyiAIoPYVfBvQ64fbmfgu5Oaf3ib8Sx4kXoCxSTy5w yHqQ+cwRRrAwX3QiN1TdQmNQKVDz+m7VElIX96lVcen2eT+EFv09/sabGbULNz8RDrF2 onMq4xBtiWe2V/ZP/er26ASpJmAedEs01YcCiM2691jMb8cUoD8NplBsTJ2mr9CfKdet 99YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:mime-version; bh=jyD5LBJJshJD+Cag9pAQ+gcWiDqOcEMPMFmUYUg79LI=; b=QlHsKqi/RJ03r/Pp0WggeOSxSnuTVRHJNksP3pqZowi/H9g7c1YCTBlzABRDmYGaNN PTiOtOH7VdSUl+AxFCKCgBpf4iILVLhN9nI8RMC65zTbnFbKgcleAWbgKJ0ohUFPhepF 8T0aKPfLhVghMMH0kIyqx5NwOENu9atZ4ivPZZhjewda5dLq9ITXunOAqw0LzgsgvVZi 4/p1m9chFiIRAlgmPow8MQeAGAZqw7OnRS1Ope4hEMmrP40LrSSywOyleUIpIs4IAAwZ FCGLqvJDK+sNh0DfAyJGOuH4btHlWgiaREzG1K+i3mC2y0xZ/SSfu1DidopFXgEFkrrb 2RWw== X-Gm-Message-State: AOUpUlErSjk2PQWekLxKDvORFXjyXX0wi6zB8mpk/BLFFfKpg5ebs0sO WTANp9yRZHsXRNd+i8+Uq/7zWc4BWgHvtg== X-Google-Smtp-Source: AA+uWPxLl58lwsXDKgJPlibPPFVGd5iwK7PFMSkohTS9wV2NdJumJbU6zVsCVollhhQE+Ekq/wYxww== X-Received: by 2002:a1c:c14:: with SMTP id 20-v6mr11688989wmm.117.1534256310025; Tue, 14 Aug 2018 07:18:30 -0700 (PDT) Received: from blob (ip139.ip-178-32-165.eu. [178.32.165.139]) by smtp.gmail.com with ESMTPSA id j8-v6sm13511044wrn.50.2018.08.14.07.18.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Aug 2018 07:18:28 -0700 (PDT) Message-ID: <1534256304.6834.4.camel@hardenize.com> Subject: pg_basebackup failed to read a file From: Mike Cardwell To: pgsql-general@lists.postgresql.org Date: Tue, 14 Aug 2018 15:18:24 +0100 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-lxQslVQELKbA4x9EgyxG" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-lxQslVQELKbA4x9EgyxG Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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:=C2=A0=C2=A0could not open file "./postgresql.conf~": Permission deni= ed 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 --=-lxQslVQELKbA4x9EgyxG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQGdBAABCgCHFiEEWazVMy7edA17fJTj0V47FkDmu60FAlty5LAwFIAAAAAAIAAH cHJlZmVycmVkLWVtYWlsLWVuY29kaW5nQHBncC5jb21wZ3BtaW1lOBSAAAAAABUA GnBrYS1hZGRyZXNzQGdudXBnLm9yZ21pa2UuY2FyZHdlbGxAZ3JlcHVsYXIuY29t AAoJENFeOxZA5rutnZoH/0xPA435amENTW1Ee+eLSDHZJBkwe5/8K4dFra4Y9p/6 RbTuddpQX8Dzh51NT+nO9kJBLYXVIyTfHOq0p8/u+zOf/lX+snwv1BPnSQx0jc8l sJsXIBQq5jvCWCX8RkOFb1ySTKfUg8qK1ujdYOkSO3kzHkJD/YLaMyoWToZbUl9B spkSthATUL2sO7l8DTbNX5t5ZWSramPPSb9J2dIauk4JmeMC19AolvqBw0xUJ/4n 6Jew71R5owJ7OU9F3bWXGA6gJOaiFfp5Ep+GW6IhuIT8bSG24u3sq1tZZiyZvIpc y7g8i7QsFmWaCqlRs9ANFL4JP/ODpFQ1KJcFMDwrXUk= =cVCb -----END PGP SIGNATURE----- --=-lxQslVQELKbA4x9EgyxG--