Re: Support for N synchronous standby servers

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support for N synchronous standby servers
Date: 2014-08-23 05:52:23
Message-ID: CAB7nPqTy11qNV8QqqGj53tfQg9e9c4=cVuvEOWZYkdXOWs+WWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 22, 2014 at 11:42 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
>>
>> 2. Logic of deciding the highest priority one seems to be in-correct.
>> Assume, s_s_num = 3, s_s_names = 3,4,2,1
>> standby nodes are in order as: 1,2,3,4,5,6,7
>>
>> As per the logic in patch, node 4 with priority 2 will not be added in the list whereas 1,2,3 will be added.
>>
>> The problem is because priority updated for next tracking is not the highest priority as of that iteration, it is just priority of last node added to the list. So it may happen that a node with higher priority is still there in list but we are comparing with some other smaller priority.
>
>
> Fixed. Nice catch!

Actually by re-reading the code I wrote yesterday I found that the fix
in v6 for that is not correct. That's really fixed with v7 attached.
Regards,
--
Michael

Attachment Content-Type Size
20140823_multi_syncrep_v7.patch text/x-patch 23.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-08-23 06:44:02 Re: Audit of logout
Previous Message Pavel Stehule 2014-08-23 05:21:50 Re: Re: proposal: ignore null fields in not relation type composite type based constructors