[pgpool-committers: 10331] pgpool: Fix bug in heartbeat.

Tatsuo Ishii ishii at postgresql.org
Mon Feb 10 20:12:28 JST 2025


Fix bug in heartbeat.

Following error message was recorded every wd_heartbeat_deadtime since
65dbbe7a0 was committed.

2025-02-10 10:50:37.990: heart_beat_receiver pid 1060625: ERROR:  failed to get socket data from heartbeat receive socket list
2025-02-10 10:50:37.990: heart_beat_receiver pid 1060625: DETAIL:  select() got timeout, exceed 30 sec(s)

The heartbeat receiver waits for heartbeart packet arrives in
select(2) until wd_heartbeat_deadtime is expired. I believe the logic
is wrong: it should wait forever until the packet arrives. In v4.5 or
earlier, the hearbeart receiver waits in recvfrom() without
timeout. So give NULL to select's timeout parameter so that it waits
forever.  Since 65dbbe7a0 is only in master branch, no backpatch is
made.

Reported by: Peng Bo

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=fd3965a177b960f337304f9b8b0ef1e610bc7d08

Modified Files
--------------
src/watchdog/wd_heartbeat.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)



More information about the pgpool-committers mailing list