Re: Review of Synchronous Replication patches

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: zb(at)cybertec(dot)at
Cc: Yeb Havinga <yebhavinga(at)gmail(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>, hs(at)cybertec(dot)at
Subject: Re: Review of Synchronous Replication patches
Date: 2010-07-26 07:21:15
Message-ID: AANLkTim=tCQ8bwF5RE8QWknj5rXUc=81gayj8Zg_NgXn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 24, 2010 at 4:40 PM, <zb(at)cybertec(dot)at> wrote:
> Instead, I will post a patch that unifies my configuration choices with
> Fujii's patch. Do you have suggestions for better worded GUCs?
> "slave" seems to be phased out by "standby" for political correctness, so
> "synchronous_standby" instead of "synchronous_slave". You mentioned
> "min_sync_replication_clients" -> "quorum_min_sync_standbys". What else?

I think that the meaning of my "quorum" parameter is the same as
that of your "min_sync_replication_clients". Right?

I'm planning to add new parameter specifying the behavior of quorum
commit when the number of connected synchronous standbys becomes
less than "quorum".

1. Ignore quorum. If the ACKs from all connected standbys have
arrived, transaction commit is successful even if the number
of standbys is less than quorum. If there is no connected
standby, transaction commit always is successful without
regard to quorum.

2. Observe quorum. Until the number of connected standbys has
become more than or equal to quorum, transaction commit waits.

http://archives.postgresql.org/pgsql-hackers/2010-07/msg01327.php

Is the meaning of this parameter the same as that of your
"strict_sync_replication"?

> You also noticed that my patch addressed 2PC, maybe I will have to add
> this part to Fujii's patch, too. Note: I haven't yet read his patch,
> maybe working with LSNs instead of XIDs make this work automatically,
> I don't know. We should definitely test.

Yeah, transaction commit seems to have to wait for replication in
not only RecordTransactionCommit() but also EndPrepare(),
RecordTransactionCommitPrepared() and RecordTransactionAbortPrepared().

I'll fix that.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yeb Havinga 2010-07-26 08:27:39 Re: Synchronous replication
Previous Message KaiGai Kohei 2010-07-26 07:02:17 Re: security label support, part.2