Re: Reliable WAL file shipping over unreliable network - Mailing list pgsql-admin

From Mark Kirkwood
Subject Re: Reliable WAL file shipping over unreliable network
Date
Msg-id 5a49c387-e4f4-f70c-537c-9c338c80b687@catalyst.net.nz
Whole thread Raw
In response to Re: Reliable WAL file shipping over unreliable network  (Rui DeSousa <rui.desousa@icloud.com>)
Responses Re: Reliable WAL file shipping over unreliable network  (Rui DeSousa <rui.desousa@icloud.com>)
List pgsql-admin
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
useda 1GB archive filesytem to allow for an out of space test case.  Not sure of the actual cause as it seems to work a
fewtimes; 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


pgsql-admin by date:

Previous
From: Dianne Skoll
Date:
Subject: Re: Reliable WAL file shipping over unreliable network
Next
From: Rui DeSousa
Date:
Subject: Re: Reliable WAL file shipping over unreliable network