Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erE0X-0000Kl-QR for pgsql-admin@arkaria.postgresql.org; Thu, 01 Mar 2018 02:31:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erE0W-0002nv-Q7 for pgsql-admin@arkaria.postgresql.org; Thu, 01 Mar 2018 02:31:44 +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 1erDwr-0005pq-OQ for pgsql-admin@lists.postgresql.org; Thu, 01 Mar 2018 02:27:57 +0000 Received: from mr28p48im-tydg10101201.me.com ([17.110.88.44]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1erDwi-00017T-Bk for pgsql-admin@lists.postgresql.org; Thu, 01 Mar 2018 02:27:56 +0000 Received: from process-dkim-sign-daemon.mr28p48im-tydg10101201.me.com by mr28p48im-tydg10101201.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P4W00B003WUDQ00@mr28p48im-tydg10101201.me.com> for pgsql-admin@lists.postgresql.org; Thu, 01 Mar 2018 02:27:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1519871247; bh=SGd3y0O39Ea0rCnnHCfth+OmmYsspTB3SmOWHNtZNXM=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=JSdbNQDU1+S85QPG1dOXzxETFCDu1MegwVhlKtqLg5iuNNR2tfegkN2eoTQdhhUwF lBRf4XZ+iHlhzw0ChmKurpV92w0wPMP1zdcLa1pNA9DZq/y2sbNAwX3Oc+O1H4JMh/ zZyw5Z79T45wTbhC7YJtMOyqTNsv7hXRjDk3L+HRZaoqcRAmdp7uZIJnPn39pzCFht MEfrDmsvPRHgn4OdsKaYHHCW3a9/XCnASsChp6Nr5WhjmcfnHlDEoSgx0W/HgrIZVd kfOIUhGUM+Sl9/WGkC4qChGdV83OQWmr/dihc4k6gNjQM2wHLc/IstMeUqP5W7rIES FJkcdMSBhLeEg== Received: from icloud.com ([127.0.0.1]) by mr28p48im-tydg10101201.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P4W00M5U45PR860@mr28p48im-tydg10101201.me.com>; Thu, 01 Mar 2018 02:27:27 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-01_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1803010031 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Reliable WAL file shipping over unreliable network From: Rui DeSousa In-reply-to: <5a49c387-e4f4-f70c-537c-9c338c80b687@catalyst.net.nz> Date: Wed, 28 Feb 2018 21:27:24 -0500 Cc: Dianne Skoll , pgsql-admin@lists.postgresql.org Content-transfer-encoding: quoted-printable Message-id: <9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com> References: <400AC9CD-1E43-422C-A689-70BDBAFF231E@elevated-dev.com> <37C5A42B-4CDD-4F01-8F1E-1B185C1819B9@icloud.com> <20180228132620.2c882f84@hydrogen.roaringpenguin.com> <33220469-5BB2-4A40-8F56-8F4F392C95B3@icloud.com> <21AF0CB4-0873-4960-BA14-E72FA08B352E@icloud.com> <5a49c387-e4f4-f70c-537c-9c338c80b687@catalyst.net.nz> To: Mark Kirkwood X-Mailer: Apple Mail (2.3445.5.20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk STS is initialized as 3; and is only set to zero if rsync returns zero. > On Feb 28, 2018, at 8:59 PM, Mark Kirkwood = wrote: >=20 > Hi >=20 > On 01/03/18 14:10, Rui DeSousa wrote: >> I=E2=80=99ve tested this and it seems that there is a still a bug in = rsync (rsync version 3.1.2 protocol version 31). I used a 1GB archive = filesytem to allow for an out of space test case. Not sure of the = actual cause as it seems to work a few times; however, it then fails = leaving a truncated file and returning a success code. >>=20 >>=20 >> Archive Script critical code: >>=20 >> OUTPUT=3D$(rsync -ac $XLOGFILE $ARCH_SERVER:$ARCH_DIR/$WALFILE) >> if [ $? =3D=3D 0 ]; then >> STS=3D0 >> echo "Success: $WALFILE" >> /tmp/waltest.log >> else >> echo "Failed: $WALFILE" >> /tmp/waltest.log >> fi >>=20 >> exit $STS >>=20 >>=20 >>=20 >=20 > Looking at the above snippet, $STS is not properly initialized in the = failure section of the code...so you might be getting false 0 returns = when rsync is actually setting some other value. >=20 > regards >=20 > Mark