Fix a posible hang during health checking V3_1_STABLE
authorYugo Nagata <nagata@sraoss.co.jp>
Wed, 15 Jun 2016 06:24:21 +0000 (15:24 +0900)
committerYugo Nagata <nagata@sraoss.co.jp>
Mon, 3 Jul 2017 05:35:59 +0000 (14:35 +0900)
commitd1be197d655d3a110eefdecaed631cb993288e3b
tree7467c95a73984ca6befe33fb28dc79007f05025d
parent41ab703896934450bc2c635ad90aed2c99861c2a
Fix a posible hang during health checking

Helath checking was hang when any data wasn't sent
from backend after connect(2) succeeded. To fix this,
pool_check_fd() returns 1 when select(2) exits with
EINTR due to SIGALRM while health checkking is performed.

Reported and patch provided by harukat and some modification
by Yugo. Per bug #204.

backported from 3.4 or later;
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=ed9f2900f1b611f5cfd52e8f758c3616861e60c0
main.c
pool.h
pool_process_query.c