Re: Using RSYNC for replication? - Mailing list pgsql-general

From Vivek Khera
Subject Re: Using RSYNC for replication?
Date
Msg-id x7znplf9vk.fsf@onceler.kciLink.com
Whole thread Raw
In response to Re: Using RSYNC for replication?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:

TL> A final note is that I doubt this would be very efficient: wouldn't
TL> rsync have to ship entire table files (and entire WAL log files) for
TL> even the most piddling change?

No, rsync is smart that way.  It checksums hunks of the files, and
sends only the parts that change.  I did a test and the first rsync
took me 4 hours.  The second one the next day took about 1.5 hours.

I was moving the data to another box, and the time to
dump/restore/analyze the tables was enormous.  Using rsync made it
faster.  First I did the rsync live (4 hours), then shut down the
source postmaster, did the rsync again (only 1 hour) and brought up
the new server.  Downtime was 1 hour rather than 8.

However for backup purposes, it makes no sense.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/

pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: Using RSYNC for replication?
Next
From: "Ayhan"
Date:
Subject: How "experimental" is PgSPI?