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

Muhammad Usama m.usama at gmail.com
Wed Jun 27 18:29:40 JST 2018


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-committers/attachments/20180627/12461580/attachment.html>


More information about the pgpool-committers mailing list