Re: Reliable WAL file shipping over unreliable network

From: Dianne Skoll <dfs(at)roaringpenguin(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Reliable WAL file shipping over unreliable network
Date: 2018-02-28 19:53:41
Message-ID: 20180228145341.0fdf5414@hydrogen.roaringpenguin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 28 Feb 2018 13:49:33 -0500
Rui DeSousa <rui(dot)desousa(at)icloud(dot)com> wrote:

> Really? I think you really need to think about it. You are dealing
> with a race condition.

You are not correct.

1) rsync copies the source file to a temporary file on the destination.

2) If and only if step (1) is successful, rsync renames the temporary
file to the final filename.

3) If and only if step (2) is successful, rsync sets the timestamp on
the destination file to match that of the source file, assuming the
--archive or similar command-line option was given.

There is no possible sequence of events that could give you a destination
file with the same size and timestamp as the source file and yet be
incorrect (just so long as the source file has stayed the same.)

Regards,

Dianne.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2018-02-28 20:12:11 Re: Reliable WAL file shipping over unreliable network
Previous Message Nagy László Zsolt 2018-02-28 19:25:45 Re: Reliable WAL file shipping over unreliable network