Re: Support for N synchronous standby servers - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Support for N synchronous standby servers
Date
Msg-id CAB7nPqTy11qNV8QqqGj53tfQg9e9c4=cVuvEOWZYkdXOWs+WWw@mail.gmail.com
Whole thread Raw
In response to Re: Support for N synchronous standby servers  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Support for N synchronous standby servers
List pgsql-hackers
On Fri, Aug 22, 2014 at 11:42 PM, Michael Paquier
<michael.paquier@gmail.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,
itis just priority of last node added to the list. So it may happen that a node with       higher priority is still
therein 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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Re: proposal: ignore null fields in not relation type composite type based constructors
Next
From: Amit Kapila
Date:
Subject: Re: Audit of logout