Fix corner case bug in Pgpool-II starting up.
authorTatsuo Ishii <ishii@postgresql.org>
Tue, 9 May 2017 23:30:17 +0000 (08:30 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Tue, 9 May 2017 23:30:17 +0000 (08:30 +0900)
commit1089d9c6f507cf75e8360fe597d69349c1adc80e
tree466c9bb2c43373da11df5382b86218ca163105a0
parentbb92667852a975d49232da18960b3643633d0d9b
Fix corner case bug in Pgpool-II starting up.

It is possible that a failover request is accepted before primary node
is searched.  This leads Pgpool-II to a strange state: there's no
primary node if the failed node was a primary node (even if new
primary node exists as a result of promotion of existing standby).

See [pgpool-hackers: 2321] for more details.
src/main/pgpool_main.c
src/test/regression/tests/003.failover/test.sh
src/test/regression/tests/055.backend_all_down/test.sh