Re: Synchronous replication patch built on SR - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Synchronous replication patch built on SR
Date
Msg-id AANLkTildduVhZEORx1q05SRs7aT8ia88n715pzG888Yb@mail.gmail.com
Whole thread Raw
In response to Re: Synchronous replication patch built on SR  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: Synchronous replication patch built on SR
Re: Synchronous replication patch built on SR
List pgsql-hackers
On Fri, May 14, 2010 at 9:33 AM, Boszormenyi Zoltan <zb@cybertec.at> wrote:
> If  min_sync_replication_clients == 0, then the replication is async.
> If  min_sync_replication_clients == max_wal_senders then the
> replication is fully synchronous.
> If 0 < min_sync_replication_clients < max_wal_senders then
> the replication is partially synchronous, i.e. the master can wait
> only for say, 50% of the clients to report back before it's considered
> synchronous and the relevant transactions get released from the wait.

That's an interesting design and in some ways pretty elegant, but it
rules out some things that people might easily want to do - for
example, synchronous replication to the other server in the same data
center that acts as a backup for the master; and asynchronous
replication to a reporting server located off-site.

One of the things that I think we will probably need/want to change
eventually is the fact that the master has no real knowledge of who
the replication slaves are.  That might be something we want to change
in order to be able to support more configurability.  Inventing syntax
out of whole cloth and leaving semantics to the imagination of the
reader:

CREATE REPLICATION SLAVE reporting_server (mode asynchronous, xid_feedback on);
CREATE REPLICATION SLAVE failover_server (mode synchronous,
xid_feedback off, break_synchrep_timeout 30);

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Selena Deckelmann
Date:
Subject: Re: List traffic
Next
From: Bruce Momjian
Date:
Subject: Re: List traffic