Re: Add -c to rsync commands on SR tutorial wiki page

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add -c to rsync commands on SR tutorial wiki page
Date: 2016-08-18 18:27:56
Message-ID: 167e38f0-60c7-376f-3ce0-a7e330d6f9b5@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/17/16 9:46 PM, Stephen Frost wrote:
> * Jim Nasby (Jim(dot)Nasby(at)BlueTreble(dot)com) wrote:
>> > https://wiki.postgresql.org/wiki/Binary_Replication_Tutorial does
>> > not specify -c for any of the rsync commands. That's maybe safe for
>> > WAL, but I don't think it's safe for any of the other uses, right?
>> > I'd like someone to confirm before I just change the page... my
>> > intention is to just stick -c in all the commands.
> -c is only relevant when you are doing an incremental copy, but on a
> quick look, all those rsync commands appear to be doing full copies?
>
> You would want -c if you were taking a backup and then doing an update
> of it using rsync. or something along those lines, as you can't really
> trust rsync's time/size based comparison as it only has a 1 second level
> granularity.

I don't think it's any great leap for someone to think they can use
those commands incrementally. It's certainly one of the first things you
think of when using rsync. AFAIK there's no downside at all to using -c
when it is a brand new copy, so I'm thinking we should just put it in
there, especially considering what the potential downside is.

--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-08-18 18:30:57 Re: synchronous_commit = remote_flush
Previous Message Tom Lane 2016-08-18 18:06:39 Re: Making pg_hba.conf case-insensitive