Re: Support for N synchronous standby servers - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Support for N synchronous standby servers
Date
Msg-id CAHGQGwGEHauT_c_Z_oZTVpTsiTdkgqt28s_oE-B55hSdc374GQ@mail.gmail.com
Whole thread Raw
In response to Support for N synchronous standby servers  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Support for N synchronous standby servers
List pgsql-hackers
On Sat, Aug 9, 2014 at 3:03 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> Hi all,
>
> Please find attached a patch to add support of synchronous replication
> for multiple standby servers. This is controlled by the addition of a
> new GUC parameter called synchronous_standby_num, that makes server
> wait for transaction commit on the first N standbys defined in
> synchronous_standby_names. The implementation is really
> straight-forward, and has just needed a couple of modifications in
> walsender.c for pg_stat_get_wal_senders and syncrep.c.

Great! This is really the feature which I really want.
Though I forgot why we missed this feature when
we had added the synchronous replication feature,
maybe it's worth reading the old discussion which
may suggest the potential problem of N sync standbys.

I just tested this feature with synchronous_standby_num = 2.
I started up only one synchronous standby and ran
the write transaction. Then the transaction was successfully
completed, i.e., it didn't wait for two standbys. Probably
this is a bug of the patch.

And, you forgot to add the line of synchronous_standby_num
to postgresql.conf.sample.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: PostgreSQL vs oracle doing 1 million sqrts am I doing it wrong?
Next
From: Claudio Freire
Date:
Subject: Re: Minmax indexes