Fix finding primary node is not working.
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 8 Oct 2017 01:29:29 +0000 (10:29 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 8 Oct 2017 01:29:29 +0000 (10:29 +0900)
commitf484c6138304172f7d4ef4d02f1b15fad5b3cbf8
tree299022bda7e784d152813d8d470b767c4dffbe6c
parenteb9347ef9a489f38e6e8dc9308af9405d8e15aa8
Fix finding primary node is not working.

It was reported that finding primary node was not executed in local
mailing list [pgpool-general-jp: 1462]. The bug was introduced in
commit e4ce880bd36b8f249bf693c086a1313148f3449a between 3.4.11 and
3.4.12.  This requires the Req_info->primary_node_id to negatives
value but I forgot to miss the part. Fix the problem by initializing
Req_info->primary_node_id.

Note that the bug was not in 3.5 or above because commit
bda946e718fe6f3605eb7e82ada8754bd84a279c has made it. Unfortunately I
missed the commit was not in 3.4 stable.
src/main/pgpool_main.c