[pgpool-general: 8003] Re: pcp_node_info does not return when host is lost on 4.3.0

Tatsuo Ishii ishii at sraoss.co.jp
Wed Jan 26 17:09:46 JST 2022


>> I think the PQpingParams should take the same connect_timeout as configured
>> in the pgpool config. Otherwise this method might hit a timeout while other
>> parts of the code don't. I think that would only cause confusion.
> 
> Hum. That makes sense. Initially I thought PQpingParams is called only
> for pcp_node_info (and show pool_nodes) and the timeout should be
> small. But yes, user may be confused if different timeout is used.

Including this, attached is the latest v4 patch.

>> The loop is in get_nodes. It always iterates over all
>> nodes. inform_node_info (pcp_worker.c) calls this function and only prints
>> the selected node.
> 
>>> Also, it
>>> > should not try to connect twice. If the first attempt fails, the second
>>> > should be skipped.
>>>
>> 
>> Looking at the previous patches, I think both patches are needed. The last
>> patch (pcp_hang.patch) prevents a second timeout for the same backend when
>> the ping fails. The first (pcp_node_info_hang.patch) is also still needed,
>> because there's a small chance the database will get lost in between the
>> calls. pcp_node_info should not perform retries. So the two things
>> remaining are: setting a connect_timeout on PQpingParams and get_nodes
>> should be refactored to only collect the information for one node if the
>> pcp worker has a node id.
> 
> Right.
> 
> I have already fixed this and Peng is testing it now.
> 
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp_node_info_hang_v4.patch
Type: text/x-patch
Size: 5636 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20220126/fcd88cc0/attachment.bin>


More information about the pgpool-general mailing list