[pgpool-hackers: 4570] Proposal: add more fields to pcp_proc_info.
Tatsuo Ishii
ishii at postgresql.org
Sun Mar 9 13:59:15 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.
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
What do you think? (attached patch hires libpcp.so.3 but I am not sure
this is the most appropreate one).
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v1-0001-Add-client-address-port-and-statement-to-pcp_proc.patch
Type: application/octet-stream
Size: 56681 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20250309/04d1fc3d/attachment-0001.obj>
More information about the pgpool-hackers
mailing list