Fix pgpool main process segfault when PostgreSQL 9.5. is used.
authorTatsuo Ishii <ishii@postgresql.org>
Thu, 24 May 2018 04:31:04 +0000 (13:31 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Thu, 24 May 2018 04:31:04 +0000 (13:31 +0900)
commitd2b8efdd84ec23eb1ba1cee297fd731796228427
tree031ffc6f64251e9b6cb5195b39ed3dbfa5446b3f
parentf5663040c01107f386b71ed0549edf6c7aeaf8db
Fix pgpool main process segfault when PostgreSQL 9.5. is used.

pgpool_setup -n 3 (or greater) triggers the bug. While recovering node
2, pgpool main process tried to retrieve version info from backend #2
even if it's not running. This causes the sefault because connection
was not established yet. The reason why PostgreSQL 9.6 or later was not
suffered from the bug was, PostgreSQL exited the loop as soon as the
server version is higher than 9.5. To fix this, call to VALID_BACKEND
macro was added.
src/main/pgpool_main.c