From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Support for N synchronous standby servers |
Date: | 2014-08-10 16:31:27 |
Message-ID: | CAHGQGwGEHauT_c_Z_oZTVpTsiTdkgqt28s_oE-B55hSdc374GQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Aug 9, 2014 at 3:03 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Freire | 2014-08-10 17:43:17 | Re: Minmax indexes |
Previous Message | Pavel Stehule | 2014-08-10 15:34:21 | Re: PostgreSQL vs oracle doing 1 million sqrts am I doing it wrong? |