pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott ribe <scott_ribe@elevated-dev.com>
To: Nagy László Zsolt <gandalf@shopzeus.com>
Cc: Rui DeSousa <rui.desousa@icloud.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Reliable WAL file shipping over unreliable network
Date: Wed, 28 Feb 2018 12:11:15 -0700
Message-ID: <EDF56C6B-4827-43D7-BF54-A26702FB69BC@elevated-dev.com> (raw)
In-Reply-To: <f1629420-0d42-0ef9-fbca-a9cfca5e7a01@shopzeus.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>
	<954e01b6-b240-eb9a-5feb-8efd202fef5a@shopzeus.com>
	<9BE48599-5417-42BF-A7D3-554590878841@elevated-dev.com>
	<45F65094-CF9C-4BC4-AF56-2FE299F79EFF@icloud.com>
	<f1629420-0d42-0ef9-fbca-a9cfca5e7a01@shopzeus.com>

On Feb 28, 2018, at 12:03 PM, Nagy László Zsolt <gandalf@shopzeus.com> wrote:
> 
> There is a --temp-dir option that suggests that data is written to temporary files first. But that is only a suggestion. I don't see anything explicit about writting data to temporary files and renaming them once they are complete.

Seems hard to me to make it more clear:

 -T, --temp-dir=DIR
              This  option  instructs  rsync to use DIR as a scratch directory
              when creating temporary copies of the files transferred  on  the
              receiving  side.   The default behavior is to create each tempo-
              rary file in the same directory as  the  associated  destination
              file.

And:

--delay-updates
              This option puts the temporary file from each updated file  into
              a holding directory until the end of the transfer, at which time
              all the files are renamed into place in rapid succession.   This
              attempts to make the updating of the files a little more atomic.
              By default the files are placed into a directory named  ".~tmp~"
              in  each  file's  destination directory, but if you've specified
              the --partial-dir option, that directory will be  used  instead.
              See  the  comments in the --partial-dir section for a discussion
              of how this ".~tmp~" dir will be excluded from the transfer, and
              what  you  can do if you wnat rsync to cleanup old ".~tmp~" dirs
              that might  be  lying  around.   Conflicts  with  --inplace  and
              --append.

--
Scott Ribe
https://www.linkedin.com/in/scottribe/
(303) 722-0567





view thread (59+ messages)  latest in thread

Message-ID: <EDF56C6B-4827-43D7-BF54-A26702FB69BC@elevated-dev.com>
Permalink:  ../EDF56C6B-4827-43D7-BF54-A26702FB69BC@elevated-dev.com/
Also on:    postgresql.org/message-id/EDF56C6B-4827-43D7-BF54-A26702FB69BC@elevated-dev.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott_ribe@elevated-dev.com, gandalf@shopzeus.com, rui.desousa@icloud.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Reliable WAL file shipping over unreliable network
  In-Reply-To: <EDF56C6B-4827-43D7-BF54-A26702FB69BC@elevated-dev.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