Re: Reliable WAL file shipping over unreliable network

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 19:12:39
Message-ID: FB6AA142-81F4-4238-8456-E965555CDA44@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

You are dealing with a race condition. Postgres will continually attempt to archive the same file over and over until rsync foolishly returns success.

You are making the assumption that rsync removed the file? What if it can’t? If you’re dealing with a logged filesystem and it can’t log the metafile changes what happens then? What happened when rsync core dumps?

Why would you not use “-c”? I have seen this fail without the “-c” option…

> On Feb 28, 2018, at 1:52 PM, Dianne Skoll <dfs(at)roaringpenguin(dot)com> wrote:
>
> 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.
>
> Not at all, assuming rsync is being called by PostgreSQL's archive_command.
>
>> You are dealing with a race condition involving filesystem metadata.
>
> Nope. Not true. What are the things that are racing?
>
> If you rsync data to make a base backup, then yes, use -c... but not because
> of any race condition. Instead, it's because of the coarse filesystem
> timestamp granularity.
>
> Regards,
>
> Dianne.
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dianne Skoll 2018-02-28 19:16:43 Re: Reliable WAL file shipping over unreliable network
Previous Message Nagy László Zsolt 2018-02-28 19:11:33 Re: Reliable WAL file shipping over unreliable network