[pgpool-hackers: 4343] Re: [pgpool-committers: 9433] pgpool: Feature: Support mutiple directories specification for pcp_sock

NINGWEI CHEN chen at sraoss.co.jp
Tue Jun 6 18:01:47 JST 2023


Hi,

I have pushed the patch to master branch to support pcp_socket_dir 
for multiple directories specification.

Now you can define a list of directories separated by comma,
which will be used for creating socket files for pcp commands.

If you have the following specification of pcp_socket_dir in your pgpool.conf,
===
pcp_socket_dir = '/tmp,/var/tmp'
pcp_port = 11001
===

after starting the pgpool-II, you will get two socket files in the specified directories.
===
$ ls -la /tmp | grep 11001
srwxrwxrwx   1 chen chen     0  6月  6 17:44 .s.PGSQL.11001
$ ls -la /var/tmp | grep 11001
srwxrwxrwx   1 chen chen    0  6月  6 17:44 .s.PGSQL.11001
===

And by using the -h options with pcp commands, you can chose the socket file you want.
===
$ pcp_node_info -p 11001 -h /tmp
localhost 11002 1 0.500000 waiting up standby standby 0 streaming async 2023-06-06 17:44:03
localhost 11003 1 0.500000 waiting up primary primary 0 none none 2023-06-06 17:44:03
$ pcp_node_info -p 11001 -h /var/tmp/
localhost 11002 1 0.500000 waiting up standby standby 0 streaming async 2023-06-06 17:44:03
localhost 11003 1 0.500000 waiting up primary primary 0 none none 2023-06-06 17:44:03
===


Best Regards.
-- 
SRA OSS LLC
Chen Ningwei<chen at sraoss.co.jp>


On Tue, 06 Jun 2023 05:41:21 +0000
Chen Ningwei <chen at sraoss.co.jp> wrote:

> Feature: Support mutiple directories specification for pcp_socket_dir.
> 
> Branch
> ------
> master
> 
> Details
> -------
> https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=e7e03154ba1e0f6d30b30cbec771a5fc5c27068d
> 
> Modified Files
> --------------
> doc.ja/src/sgml/connection-settings.sgml           |  6 +-
> doc/src/sgml/connection-settings.sgml              |  5 +-
> src/config/pool_config_variables.c                 | 23 ++++----
> src/include/pool_config.h                          |  3 +-
> src/main/pgpool_main.c                             | 69 ++++++++++++++--------
> src/pcp_con/pcp_child.c                            | 17 +++++-
> src/sample/pgpool.conf.sample-stream               |  2 +-
> src/test/regression/tests/035.unix_sockets/test.sh | 42 ++++++++++++-
> src/utils/pool_process_reporting.c                 | 10 +++-
> 9 files changed, 132 insertions(+), 45 deletions(-)
> 




More information about the pgpool-hackers mailing list