Re: Data Replication - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Data Replication
Date
Msg-id dcc563d10812101941w52726bacxd8f228b18fdd95f5@mail.gmail.com
Whole thread Raw
In response to Re: Data Replication  ("Tim Uckun" <timuckun@gmail.com>)
Responses Re: Data Replication  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Data Replication  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-general
On Wed, Dec 10, 2008 at 7:40 PM, Tim Uckun <timuckun@gmail.com> wrote:
>>
>> You have to run a new base backup and have the slave ship logs to the
>> master.
>
> Mmmm. Does this backup have to be a full backup? What if your database
> is very large?

Yes.  Your backup is very large.

> I am hoping to get a setup which is similar to SQL server mirroring.
> It uses a witness server to keep track of who got what "logs" (it's
> based on transaction logging) and allows you to failover and fail back
> without having to do a full backup in between.

Nothing like that really exists for pgsql in terms of log shipping.
If you want some part of your db backed up / replicated somewhere, use
one of the real time replication.  Failover in slony is pretty easy to
do and happens in seconds.  But you do have to resubscribe the master
as a slave and copy everything over again after a failover to make the
old master the new master again.

With the slonik help scripts, it's pretty easy to drive, and lets you
do some interesting things, like having different indexes on the
target than on the source, i.e. for reporting queries.  But DDL's a
bit of a pain.  We take our app down and disconnect all clients before
running ddl changes, and it goes smooth, with a few minutes of
downtime tops.

Log shipping doesn't really lends itself to switching back and forth
between masters and slaves.

pgsql-general by date:

Previous
From: "Tim Uckun"
Date:
Subject: Re: Data Replication
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Data Replication