Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6xao-00039U-AO for pgsql-docs@arkaria.postgresql.org; Wed, 16 Nov 2016 10:37:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c6xan-0004F8-NY for pgsql-docs@arkaria.postgresql.org; Wed, 16 Nov 2016 10:37:25 +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.84_2) (envelope-from ) id 1c6xan-0004Eq-39 for pgsql-docs@postgresql.org; Wed, 16 Nov 2016 10:37:25 +0000 Received: from edmmai02.een.elster.de ([217.237.175.35]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84_2) (envelope-from ) id 1c6xag-0005zB-RJ for pgsql-docs@postgresql.org; Wed, 16 Nov 2016 10:37:24 +0000 X-IronPort-AV: E=Sophos;i="5.31,647,1473112800"; d="asc'?scan'208";a="4057712" Received: from webmail.een.elster.de (HELO edmzarafa01.een.elster.de) ([10.1.20.13]) by edmmai02.een.elster.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2016 11:37:17 +0100 Received: from [10.200.128.41] (enmfwa02ext.een.elster.de [192.168.90.2]) by edmzarafa01.een.elster.de (Postfix) with ESMTPSA id BFE442D60357; Wed, 16 Nov 2016 11:37:17 +0100 (CET) From: "Gunnar \"Nick\" Bluth" Subject: Missing important information in backup.sgml Reply-To: Gunnar Nick Bluth To: pgsql-docs@postgresql.org Cc: Gunnar Nick Bluth Message-ID: Date: Wed, 16 Nov 2016 11:37:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lVbPsS3Skqawmsu80v0IeRS8A1g0hd8hd" X-Pg-Spam-Score: -7.1 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lVbPsS3Skqawmsu80v0IeRS8A1g0hd8hd Content-Type: multipart/mixed; boundary="------------CEA3065E240E9A1CD863BEAC" This is a multi-part message in MIME format. --------------CEA3065E240E9A1CD863BEAC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I ran into this issue (see patch) a few times over the past years, and tend to forget it again (sigh!). Today I had to clean up a few hundred GB of unarchived WALs, so I decided to write a patch for the documentation this time. diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 6eaed1e..460a4f2 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -636,7 +636,13 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 PostgreSQL will assume that the file has been successfully archived, and will remove or recycle it. However, a nonzero status tells PostgreSQL that the file was not archiv= ed; - it will try again periodically until it succeeds. + it will try again periodically until it succeeds. Note that an exit + status of 128 or higher will cause the archiver to exit and not + try to archive the affected WAL segment anymore. E.g., rsync + tends to return an exit status of 255 when it is unable to resolve a= + hostname, which - when returned unfiltered - will result in permanen= t + failure to archive the segment, even if the resolving problem is onl= y + temporarily. Best regards, --=20 Gunnar "Nick" Bluth DBA ELSTER Tel: +49 911/991-4665 Mobil: +49 172/8853339 --------------CEA3065E240E9A1CD863BEAC Content-Type: text/x-patch; name="archiving-doc-exit-status-v1.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="archiving-doc-exit-status-v1.patch" diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 6eaed1e..460a4f2 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -636,7 +636,13 @@ test ! -f /mnt/server/archivedir/00000001000000A9000= 00065 && cp pg_wal/0 PostgreSQL will assume that the file has been successfully archived, and will remove or recycle it. However, a no= nzero status tells PostgreSQL that the file was not archiv= ed; - it will try again periodically until it succeeds. + it will try again periodically until it succeeds. Note that an exit + status of 128 or higher will cause the archiver to exit and not + try to archive the affected WAL segment anymore. E.g., = rsync + tends to return an exit status of 255 when it is unable to resolve a= =20 + hostname, which - when returned unfiltered - will result in permanen= t + failure to archive the segment, even if the resolving problem is onl= y + temporarily. =20 --------------CEA3065E240E9A1CD863BEAC-- --lVbPsS3Skqawmsu80v0IeRS8A1g0hd8hd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYLDbYAAoJEDh0MJ2tR5CnKbEQAJU6uEhytk0XCHvDeRs70l0Y hckI2lJnhi0dHxAbbGlM2ehm/ktgfEQXwVDW54womfob9nocemPVH8sWrnBjxZXf Q+0aoUWPZoF23mnVJPKCHWAj1ZwBb27/IazRKoSg//K7dnxNfIA1K8xEigC0pxFv yd9ffFx4WdFshbsIF5Dy69/riwU1LQg6NJTmYkTs1Z8b0XiQOmeJSCxGp5tKNZnW cNMftb9l/wJ6j4DTfIXF+5auHYma4ROySKMb+DrO/mYv+7m+NLj+OlRLsqKd9hoW g/BDCyvZsFYIpxbkDnmoRmziB1KvMrsZXvsR8ho0FU27zF5bKl39ZZrumAwsHvOS Uu1RWujS71tpcktLLOywx+iccnT+8vEQ+AdbzxFXP7cFUIHIH67r3ogouRKxj2nv 4UZB3J8aBJHDnHWvFReDsUAXgSozbbi5KuczeqWssnQ6RZ7gLPYNz2CcWnB3KtKr ysJa3+QVXKhkHN6Mhc2pkxi5ooeg430XzvBgoO18mg009uz1ZnM/P3GVa8htxVJa 3Mf/4TDt69DI6cBMfZxHs+p5HmP5Qp/vwFDPG81toNyjbNsFBd2HQkQEHZuc1gfj JoRxwJmXorXbQJEjOa1+KAd6pDB+Kc8H1xSEPVPs8PDsMdZ/1EEeXR07kC153cHc KWNpJOV/cvL1ABfNlbBe =W8dN -----END PGP SIGNATURE----- --lVbPsS3Skqawmsu80v0IeRS8A1g0hd8hd--