Fix unwanted recovery timeout in certain cases.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 12 Feb 2019 07:59:35 +0000 (16:59 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 12 Feb 2019 07:59:35 +0000 (16:59 +0900)
commit3e76c4becf8b70040434e6a0959d6ae9ba294192
tree11f71b89a65dda836b3ac37614dfc75a2d0b54cb
parent778f611e201d6df88ed90d01e49af77daf9f2926
Fix unwanted recovery timeout in certain cases.

In the second stage of online recovery in replication mode, it is
possible it fails with timeout (message: "wait_connection_closed:
existing connections did not close in %d sec.") if connection counter
is malformed by a child process aborts with SIGKILL, SEGFAULT or etc.
This could be detected by checking if client_idle_limit_in_recovery is
enabled and it has less value than recovery_timeout because all
clients must be kicked out by the time when
client_idle_limit_in_recovery is expired. If so, we should reset
conn_counter to 0 also.

Per bug 431.
src/pcp_con/recovery.c