pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rui DeSousa <rui.desousa@icloud.com>
To: 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 14:12:39 -0500
Message-ID: <FB6AA142-81F4-4238-8456-E965555CDA44@icloud.com> (raw)
In-Reply-To: <20180228135220.1cd46347@hydrogen.roaringpenguin.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>
	<20180228135220.1cd46347@hydrogen.roaringpenguin.com>

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@roaringpenguin.com> wrote:
> 
> On Wed, 28 Feb 2018 13:49:33 -0500
> Rui DeSousa <rui.desousa@icloud.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.
> 





view thread (59+ messages)  latest in thread

Message-ID: <FB6AA142-81F4-4238-8456-E965555CDA44@icloud.com>
Permalink:  ../FB6AA142-81F4-4238-8456-E965555CDA44@icloud.com/
Also on:    postgresql.org/message-id/FB6AA142-81F4-4238-8456-E965555CDA44@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, dfs@roaringpenguin.com
  Subject: Re: Reliable WAL file shipping over unreliable network
  In-Reply-To: <FB6AA142-81F4-4238-8456-E965555CDA44@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> <20180228135220.1cd46347@hydrogen.roaringpenguin.com> <FB6AA142-81F4-4238-8456-E965555CDA44@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