[pgpool-committers: 4828] Re: pgpool: First cut of primary server checking.

Tatsuo Ishii ishii at sraoss.co.jp
Thu Jun 28 09:20:45 JST 2018


Hi Usama,

No, it was not intentional. Will fix.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Hi Ishii-San
> 
> This commit made changes to find_primary_node() and after the changes the
> function returns 0 when no primary backend node is found instead of -1,
> Although the comment on top of the function still suggests that -1 will be
> returned when no primary is found ( same as was happening before the
> commit), but now when all the attached nodes are somehow standby and no
> primary node is present, the function still returns 0 and the caller
> assumes that node 0 is the primary node.
> Is this change intentional?
> 
> Thanks
> Best Regards
> Muhammad Usama
> 
> 
> 
> On Mon, Apr 9, 2018 at 1:47 PM Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>> First cut of primary server checking.
>>
>> For now followings are implemented:
>>
>> - Check all backend nodes starting node 0.
>>
>> - If primary nodes appear twice or more, the second one or after are
>>   assumed invalid.
>>
>> - Such invalid node will be degenerated at the next convenient
>>   time. Currently such timing is at the start up of Pgpool-II. This is
>>   apparently insufficient and should be improved later.
>>
>> TODO:
>> - Verify primary nodes using pg_stat_wal_receiver.
>>
>> - More chances to verify node status. Maybe in the same timing as
>>   streaming replication delay checking?
>>
>> - Add new GUCs to control of this feature.
>>
>> Branch
>> ------
>> master
>>
>> Details
>> -------
>>
>> https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f0631a6f260530616a5eb16b1538c2eb15abbac2
>>
>> Modified Files
>> --------------
>> src/include/pool.h                            |  16 +-
>> src/main/pgpool_main.c                        | 201
>> +++++++++++++++-----------
>> src/streaming_replication/pool_worker_child.c |  61 ++++----
>> 3 files changed, 166 insertions(+), 112 deletions(-)
>>
>> _______________________________________________
>> pgpool-committers mailing list
>> pgpool-committers at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-committers
>>


More information about the pgpool-committers mailing list