quorum commit Re: Synchronous replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: Aidan Van Dyk <aidan(at)highrise(dot)ca>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: quorum commit Re: Synchronous replication
Date: 2010-07-26 08:58:34
Message-ID: AANLkTik9-33Fdrh3UxiCsLSZTAz6aOqLQL3z6tsLBFKD@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 22, 2010 at 5:37 PM, Yeb Havinga <yebhavinga(at)gmail(dot)com> wrote:
> Fujii Masao wrote:
>>
>> How should the synchronous replication behave when the number of connected
>> standby servers is less than quorum?
>>
>> 1. Ignore quorum. The current patch adopts this. 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. Aidan wants this. Until the number of connected
>>   standbys has become more than or equal to quorum, transaction commit
>>   waits.
>>
>> Which is the right behavior of quorum commit? Or we should add new
>> parameter specifying the behavior of quorum commit?
>>
>
> Initially I also expected the quorum to behave like described by
> Aidan/option 2.

I have another question about the detailed design of quorum commit.

In the following case, how should quorum commit behave?

1. quorum_standbys = 2; there are three connected synchronous standbys
2. One standby sends the ACK back and fails
3. The ACK arrives from another standby
4. How should quorum commit behave?

(a) Transaction commit returns a "success" since the master has already
received two ACKs
(b) Transaction commit waits for the "last" ACK since only one of
currently connected standbys has sent the ACK

Regards,

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yeb Havinga 2010-07-26 09:31:51 Re: quorum commit Re: Synchronous replication
Previous Message Fujii Masao 2010-07-26 08:41:49 Re: Synchronous replication