quorum commit Re: Synchronous replication - Mailing list pgsql-hackers

From Fujii Masao
Subject quorum commit Re: Synchronous replication
Date
Msg-id AANLkTik9-33Fdrh3UxiCsLSZTAz6aOqLQL3z6tsLBFKD@mail.gmail.com
Whole thread Raw
Responses Re: quorum commit Re: Synchronous replication
List pgsql-hackers
On Thu, Jul 22, 2010 at 5:37 PM, Yeb Havinga <yebhavinga@gmail.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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Synchronous replication
Next
From: Yeb Havinga
Date:
Subject: Re: quorum commit Re: Synchronous replication