<html><head></head><body>Hi,<br>
<br>
<a href="http://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob_plain;f=rpm/redhat/9.5/postgresql/EL-7/postgresql-var-run-socket.patch;hb=HEAD">http://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob_plain;f=rpm/redhat/9.5/postgresql/EL-7/postgresql-var-run-socket.patch;hb=HEAD</a><br>
<br>
is the patch we add to RPMs, and it includes a comment that explains the reason for it.<br>
<br>
Regards,<br><br><div class="gmail_quote">On December 8, 2015 12:54:00 PM GMT+02:00, Muhammad Usama &lt;m.usama@gmail.com&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<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">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</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="">&gt; Hi Ishii San<br />
&gt;<br />
&gt; I don&#39;t think that PCP client side is required to recognize the<br />
</span>&gt; *pcp_socket_dir*, one because *pcp_socket_dir* only sets the directory<br />
<span class="">&gt; where the PCP server in pgpool-II would create the unix domain socket file.<br />
&gt; And to connect to PCP server using the unix domain socket, pcp_* clients<br />
&gt; needs to provide that path in hostname option of the command<br />
&gt;<br />
&gt; For example, if pcp_socket_dir = &#39;/tmp&#39; the client can put this pcp_socket_dir<br />
&gt; path in -h command line argument of pcp_* commands<br />
&gt;<br />
&gt; $ bin/pcp_watchdog_info -h  /tmp/ -U postgres -v 0<br />
<br />
</span>Ok, that makes sense.<br />
<span class=""><br />
&gt; Secondly, pcp_* frontend clients have no dependency on and visibility<br />
&gt; 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&#39;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&#39;t we follow the<br />
PostgreSQL&#39;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&#39;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 />
&gt; Thanks<br />
&gt; Best regards<br />
&gt; Muhammad Usama<br />
&gt;<br />
&gt;<br />
&gt; On Tue, Dec 8, 2015 at 9:40 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt; wrote:<br />
&gt;<br />
&gt;&gt; Usama,<br />
&gt;&gt;<br />
&gt;&gt; Does pcp recognize pcp_socket_dir? While searching libc/pcp.c, I could<br />
&gt;&gt; not find any reference to pcp_socket_dir.<br />
&gt;&gt;<br />
&gt;&gt; Best regards,<br />
&gt;&gt; --<br />
&gt;&gt; Tatsuo Ishii<br />
&gt;&gt; SRA OSS, Inc. Japan<br />
&gt;&gt; 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 />
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br />
&gt;&gt; _______________________________________________<br />
&gt;&gt; pgpool-hackers mailing list<br />
&gt;&gt; <a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br />
&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br />
&gt;&gt;<br />
</div></div></blockquote></div><br /></div></div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />pgpool-hackers mailing list<br />pgpool-hackers@pgpool.net<br /><a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>