Re: Using RSYNC for replication?

From: Michael Carmack <karmak(at)karmak(dot)org>
To: Jason Hihn <jhihn1(at)umbc(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using RSYNC for replication?
Date: 2003-01-28 06:02:31
Message-ID: 20030128060231.GG4808@ariel.karmak.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 27, 2003 at 11:56:09PM -0500, Jason Hihn wrote:
> A sequence of events ocurred to me today that left me wondering if I can
> rsync the raw files as a form of replication. I'd like to keep
> postmaster running, but flush and lock everything, then perform the copy
> via rsync so only the new data is propigated, all while postmaster is
> running.
>
> In general, data is only added to a few tables in the database, with
> updates occuring infrequently to the rest. Rarely are deletes ever done.
> During the sync neither DB will change except as part of the rsync.
>
> I think this would be a quick, dirty, safe and efficient way to
> accomplish this without having to take down postmaster and send the
> whole shebang over.
>
> Are people using this? Will it work? Is it feasible? Thoughts?

I've done this, and it seems to work fine. But why not dump the database
to a file and rsync that instead? Then you wouldn't have to ensure that
the database is static, and you will probably get a faster transfer.

m.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-01-28 06:05:22 Re: Using RSYNC for replication?
Previous Message Matt Mello 2003-01-28 05:51:31 Re: Indexing foreign keys