From: | Rui DeSousa <rui(dot)desousa(at)icloud(dot)com> |
---|---|
To: | Dianne Skoll <dfs(at)roaringpenguin(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Reliable WAL file shipping over unreliable network |
Date: | 2018-02-28 18:49:33 |
Message-ID: | 33220469-5BB2-4A40-8F56-8F4F392C95B3@icloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Really? I think you really need to think about it. You are dealing with a race condition.
While your though process might seem to work and it will appear to work; however in the end it will fail — like I said; I’ve seen it fail first hand.
You are dealing with a race condition involving filesystem metadata. If you choose to not use “-c” option then; all I can tell you is that you have been warned.
> On Feb 28, 2018, at 1:26 PM, Dianne Skoll <dfs(at)roaringpenguin(dot)com> wrote:
>
> On Wed, 28 Feb 2018 13:15:48 -0500
> Rui DeSousa <rui(dot)desousa(at)icloud(dot)com> wrote:
>
>> Sure it does… what happens if the archive server gets full? There is
>> a situation that can fool rsync into thinking it was successfully
>> transferred as rsync only relies on filesystem metadata to verify the
>> file is different.
>
> That's incorrect. The original transfer will fail and rsync will remove
> the temporary file. It doesn't rename the file to the final destination
> until and unless the transfer is successful.
>
> "-c" is only used for files that might change multiple times per second;
> since most file systems have only 1-second granualarity in file timestamps,
> you can't rely on a file being identical if the size and timestamps are the
> same.
>
>> The “-c” option will validate the file using a checksum and not just
>> rely on just filesystem metadata.
>
> That's incorrect. "-c" applies only when rsync looks at existing files
> to see if they differ. It does not affect what happens when rsync actually
> copies the file data over; that's always verified with a checksum.
>
> Regards,
>
> Dianne.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dianne Skoll | 2018-02-28 18:52:20 | Re: Reliable WAL file shipping over unreliable network |
Previous Message | Keith | 2018-02-28 18:41:29 | Re: Separate log for a specfic database |