pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rui DeSousa <rui.desousa@icloud.com>
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Cc: Dianne Skoll <dfs@roaringpenguin.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Reliable WAL file shipping over unreliable network
Date: Wed, 28 Feb 2018 21:27:24 -0500
Message-ID: <9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com> (raw)
In-Reply-To: <5a49c387-e4f4-f70c-537c-9c338c80b687@catalyst.net.nz>
References: <dd116172-3ddf-ee56-57f3-6e18d49abf8e@shopzeus.com>
	<400AC9CD-1E43-422C-A689-70BDBAFF231E@elevated-dev.com>
	<ee3ae4be-ab24-8443-82c1-95bcd4f86a63@shopzeus.com>
	<debd4205-e27a-cd9d-9169-6748e65083a2@shopzeus.com>
	<BA4A1866-95B0-49C6-8CD1-3D1B60A7837E@elevated-dev.com>
	<CF30D15A-BD42-42A7-9AD3-BB69AF9E8047@icloud.com>
	<D5B11CF5-E816-435B-BFB8-1226E23C046A@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>

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 <mark.kirkwood@catalyst.net.nz> wrote:
> 
> Hi
> 
> On 01/03/18 14:10, Rui DeSousa wrote:
>> I’ve 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.
>> 
>> 
>> Archive Script critical code:
>> 
>> OUTPUT=$(rsync -ac $XLOGFILE $ARCH_SERVER:$ARCH_DIR/$WALFILE)
>> if [ $? == 0 ]; then
>>    STS=0
>>    echo "Success: $WALFILE" >> /tmp/waltest.log
>> else
>>    echo "Failed: $WALFILE" >> /tmp/waltest.log
>> fi
>> 
>> exit $STS
>> 
>> 
>> 
> 
> 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.
> 
> regards
> 
> Mark





view thread (59+ messages)  latest in thread

Message-ID: <9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com>
Permalink:  ../9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com/
Also on:    postgresql.org/message-id/9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rui.desousa@icloud.com, mark.kirkwood@catalyst.net.nz, dfs@roaringpenguin.com
  Subject: Re: Reliable WAL file shipping over unreliable network
  In-Reply-To: <9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com>
  References: <dd116172-3ddf-ee56-57f3-6e18d49abf8e@shopzeus.com> <400AC9CD-1E43-422C-A689-70BDBAFF231E@elevated-dev.com> <ee3ae4be-ab24-8443-82c1-95bcd4f86a63@shopzeus.com> <debd4205-e27a-cd9d-9169-6748e65083a2@shopzeus.com> <BA4A1866-95B0-49C6-8CD1-3D1B60A7837E@elevated-dev.com> <CF30D15A-BD42-42A7-9AD3-BB69AF9E8047@icloud.com> <D5B11CF5-E816-435B-BFB8-1226E23C046A@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> <9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox