<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 2:02 PM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> Hi Ishii San<br>
><br>
> I don't think that PCP client side is required to recognize the<br>
</span>> *pcp_socket_dir*, one because *pcp_socket_dir* only sets the directory<br>
<span class="">> where the PCP server in pgpool-II would create the unix domain socket file.<br>
> And to connect to PCP server using the unix domain socket, pcp_* clients<br>
> needs to provide that path in hostname option of the command<br>
><br>
> For example, if pcp_socket_dir = '/tmp' the client can put this pcp_socket_dir<br>
> path in -h command line argument of pcp_* commands<br>
><br>
> $ bin/pcp_watchdog_info -h /tmp/ -U postgres -v 0<br>
<br>
</span>Ok, that makes sense.<br>
<span class=""><br>
> Secondly, pcp_* frontend clients have no dependency on and visibility<br>
> of pgpool.conf file, so they have no idea about pcp_socket_dir value.<br>
<br>
</span>This is questionable if we think about how PostgreSQL's libpq clients<br>
behaves. For example, on RHEL6 psql included in the official<br>
PostgreSQL rpm connects to UNIX domain socket under /tmp/ by default.<br>
However, on RHEL7, psql connects to UNIX domain socket under<br>
/var/lib/pgsql by default. So surely PostgreSQL clients has an idea<br>
about UNIX domain socket directory. Shouldn't we follow the<br>
PostgreSQL's way?<br></blockquote><div><br></div><div>Please correct me if I am wrong. But I think libpq clients on RHEL7 and RHEL6 only have different default values for the socket directory and are not dependent on value of <i></i><i></i><i></i><i></i><i></i><i>unix_socket_directories</i> configuration parameter defined in postgresql.conf file.</div><div><br></div><div>I am not sure, but I think the rpm build system on RHEL7 and RHEL6 might be changing the value of DEFAULT_PGSOCKET_DIR define in include/pg_config_manual.h before making the build to get the desired default socket directory values. And if we want to follow the PostgreSQL's way we can do the same by changing the UNIX_DOMAIN_PATH define in pcp_stream.h before building the rpm for the respective system.</div><div><br></div><div>Thanks<br></div><div>Best regards</div><div>Muhammad Usama</div><div><br></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
> Thanks<br>
> Best regards<br>
> Muhammad Usama<br>
><br>
><br>
> On Tue, Dec 8, 2015 at 9:40 AM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:<br>
><br>
>> Usama,<br>
>><br>
>> Does pcp recognize pcp_socket_dir? While searching libc/pcp.c, I could<br>
>> not find any reference to pcp_socket_dir.<br>
>><br>
>> Best regards,<br>
>> --<br>
>> Tatsuo Ishii<br>
>> SRA OSS, Inc. Japan<br>
>> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
>> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
>> _______________________________________________<br>
>> pgpool-hackers mailing list<br>
>> <a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
>> <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
>><br>
</div></div></blockquote></div><br></div></div>