Re: Synchronous replication

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synchronous replication
Date: 2010-07-17 18:14:56
Message-ID: 4C41F320.7020200@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14/07/10 09:50, Fujii Masao wrote:
> Quorum commit
> -------------
> In previous discussion about synchronous replication, some people
> wanted the quorum commit feature. This feature is included in also
> Zontan's synchronous replication patch, so I decided to create it.
>
> The patch provides quorum parameter in postgresql.conf, which
> specifies how many standby servers transaction commit will wait for
> WAL records to be replicated to, before the command returns a
> "success" indication to the client. The default value is zero, which
> always doesn't make transaction commit wait for replication without
> regard to replication_mode. Also transaction commit always doesn't
> wait for replication to asynchronous standby (i.e., replication_mode
> is set to async) without regard to this parameter. If quorum is more
> than the number of synchronous standbys, transaction commit returns
> a "success" when the ACK has arrived from all of synchronous standbys.

There should be a way to specify "wait for *all* connected standby
servers to acknowledge"

> Protocol
> --------
> I extended the handshake message "START_REPLICATION" so that it
> includes replication_mode read from recovery.conf. If 'async' is
> passed, the master thinks that it doesn't need to wait for the ACK
> from the standby.

Please use self-explanatory names for the modes in START_REPLICATION
command, instead of just an integer.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Selena Deckelmann 2010-07-17 19:02:12 Re: Broken due to CVS branching? .bki has wrong info for build
Previous Message Tom Lane 2010-07-17 17:51:06 Re: Broken due to CVS branching? .bki has wrong info for build