[pgpool-hackers: 1192] Re: Problem with pcp's UNIX domain socket

Muhammad Usama m.usama at gmail.com
Tue Dec 8 19:54:00 JST 2015


On Tue, Dec 8, 2015 at 2:02 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> > Hi Ishii San
> >
> > I don't think that PCP client side is required to recognize the
> > *pcp_socket_dir*, one because *pcp_socket_dir* only sets the directory
> > where the PCP server in pgpool-II would create the unix domain socket
> file.
> > And to connect to PCP server using the unix domain socket, pcp_* clients
> > needs to provide that path in hostname option of the command
> >
> > For example, if pcp_socket_dir = '/tmp' the client can put this
> pcp_socket_dir
> > path in -h command line argument of pcp_* commands
> >
> > $ bin/pcp_watchdog_info -h  /tmp/ -U postgres -v 0
>
> Ok, that makes sense.
>
> > Secondly, pcp_* frontend clients have no dependency on and visibility
> > of pgpool.conf file, so they have no idea about pcp_socket_dir value.
>
> This is questionable if we think about how PostgreSQL's libpq clients
> behaves. For example, on RHEL6 psql included in the official
> PostgreSQL rpm connects to UNIX domain socket under /tmp/ by default.
> However, on RHEL7, psql connects to UNIX domain socket under
> /var/lib/pgsql by default. So surely PostgreSQL clients has an idea
> about UNIX domain socket directory. Shouldn't we follow the
> PostgreSQL's way?
>

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 *unix_socket_directories* configuration
parameter defined in postgresql.conf file.

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.

Thanks
Best regards
Muhammad Usama



>
> > Thanks
> > Best regards
> > Muhammad Usama
> >
> >
> > On Tue, Dec 8, 2015 at 9:40 AM, Tatsuo Ishii <ishii at postgresql.org>
> wrote:
> >
> >> Usama,
> >>
> >> Does pcp recognize pcp_socket_dir? While searching libc/pcp.c, I could
> >> not find any reference to pcp_socket_dir.
> >>
> >> Best regards,
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese:http://www.sraoss.co.jp
> >> _______________________________________________
> >> pgpool-hackers mailing list
> >> pgpool-hackers at pgpool.net
> >> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20151208/9058ea50/attachment.html>


More information about the pgpool-hackers mailing list