[pgpool-hackers: 4611] Re: Proposal: add more fields to pcp_proc_info.

Tatsuo Ishii ishii at postgresql.org
Tue Jun 24 21:03:00 JST 2025


> This proposal adds new fields: client_host, client_port and statement
> to pcp_proc_info.  Also add corresponding pgpool_adm extension
> function pcp_proc_info. With these addition it is possible to allow to
> track the relationship among clients of pgpool, pgpool itself and
> PostgreSQL. Here is an example:
> 
> test=# select p.client_host,p.client_port,g.state,g.query from pg_stat_activity as g, pcp_proc_info(host => '', port => 11001, username => t-ishii', password => 't-ishii') as p where g.pid = p.backend_pid::int;
>  client_host | client_port | state |   query   
> -------------+-------------+-------+-----------
>  127.0.0.1   | 54072       | idle  | select 1;
> (1 row)
> 
> Moreover the patch allow to know what commands (statements) are
> executing by using pcp_proc_info. Previously it was not possible
> unless looking into the pgpool log.

I have pushed this along with necessary changes to documents.

https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=706ca859c64c50a47e6dc2ff31f6be22c6ce5a13

> One thing I need a discussion is, the version number of libpcp.so. The
> current version is libpcp.so.2. Changing pcp_proc_info requires a
> version up to libpcp.so. Possible coices are:
> 
> libpcp.so.3
> libpcp.so.2.1
> Other

Since I didn't get any option, I decided go with libpcp.so.2.1.

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list