<div dir="ltr"><div>Hi Tatsuo,</div><div>Thanks for the answer. <br>Hmm... AFAIR, pcp socket usually is available on either master and standby nodes. <br>What is the motivation of waiting for a primary node before creating a PCP port? <br></div><div><br></div><div><div><div><div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>BR</div><div>Igor Yurchenko<br></div></div></div></div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 3 May 2024 at 07:38, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
> "0.0.0.0")}, 16) = 0<br>
> [pid 20484] bind(6, {sa_family=AF_INET6, sin6_port=htons(9999),<br>
> inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=htonl(0),<br>
> sin6_scope_id=0}, 28) = 0<br>
> [pid 20508] bind(4, {sa_family=AF_INET, sin_port=htons(9694),<br>
> sin_addr=inet_addr("0.0.0.0")}, 16) = 0<br>
> [root@pg-mgrdb2 ~]#<br>
> <br>
> I hope it gives any hint of what is going on. I'll try to check the source<br>
> code a bit later.<br>
<br>
I think the pgpool main process had been trying to find the primary<br>
node. grep find_primary_node from the log shows:<br>
<br>
[pid 20657] fcntl(5, F_GETFL2024-05-01 18:02:33: pid 20484: LOG: find_primary_node_repeatedly: waiting for finding a primary node<br>
[pid 20484] write(2, "2024-05-01 18:02:33: pid 20484: "..., 752024-05-01 18:02:33: pid 20484: LOG: find_primary_node: standby node is 1<br>
[pid 20484] write(2, "2024-05-01 18:02:34: pid 20484: "..., 752024-05-01 18:02:34: pid 20484: LOG: find_primary_node: standby node is 1<br>
:<br>
:<br>
[pid 20484] write(2, "2024-05-01 18:02:51: pid 20484: "..., 752024-05-01 18:02:51: pid 20484: LOG: find_primary_node: standby node is 1<br>
[pid 20484] write(2, "2024-05-01 18:02:52: pid 20484: "..., 752024-05-01 18:02:52: pid 20484: LOG: find_primary_node: standby node is 1<br>
<br>
By default pgpool tries to find the primary node up to<br>
search_primary_node_timeout, default to 300 seconds. Since The search<br>
started at: 18:02:33, and the search still continues. After it succeeds<br>
to find the primary node or it's timed out, pcp sockets will be<br>
created. I don't know why pgpool was failing to find the primary node<br>
though.<br>
<br>
Best reagards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS LLC<br>
English: <a href="http://www.sraoss.co.jp/index_en/" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en/</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div>