PGPOOL_AD...OL_STATUS(3)
π PGPOOL_AD...OL_STATUS(3) π
okay bestie, so this is a page from the pgpool-II 4.7.2 documentation and it's all about one very specific little function. she's lowkey iconic, she's a foreign-server function in the pgpool_adm family, and no cap, she's gonna hand you your pgpool.conf settings on a silver platter β¨
πΈ NAME πΈ
pgpool_adm_pcp_pool_status β a function to retrieves parameters in pgpool.conf.
fr fr, that's literally her whole job and she does it flawlessly π
π¦ SYNOPSIS π¦
she comes in two flavours, bestie, and both of them returns setof record π
pcp_pool_status returns setof record(text host, integer port,
text username, text password,
out item text, out value text,
out description text);
pcp_pool_status returns setof record(text pcp_server, out item text,
out value text,
out description text);
so you either hand her the whole host / port / username / password combo, or you just point her at a pcp_server. either way she pops back item, value, and description columns, periodt π
π DESCRIPTION π
pcp_pool_status retrieves parameters in pgpool.conf.
that's it. that's the mission. she's reading the config and reading it back to you, no drama, no crumbs left behind π
β¨ ARGUMENTS β¨
pcp_serverβ the foreign server name for pcp server. basically the nickname you gave your pcp server so you don't gotta spell everything out every single time π«Ά- Other arguments β see
pcp_common_options(1). go check the girlies over there, they got the full rundown π
π EXAMPLE π
here's what it looks like in the wild, and honestly? it's giving production-ready π
test=# SELECT * FROM pcp_pool_status(host => 'localhost', port => 11001, username => 't-ishii', password => 't-ishii') WHERE item ~ 'backend.*0';
item | value | description
-------------------------+------------------------------------------------+-------------------------------
backend_hostname0 | /tmp | backend #0 hostname
backend_port0 | 11002 | backend #0 port number
backend_weight0 | 0.500000 | weight of backend #0
backend_data_directory0 | /home/t-ishii/work/pgpool-II/current/aaa/data0 | data directory for backend #0
backend_status0 | 2 | status of backend #0
backend_flag0 | ALLOW_TO_FAILOVER | backend #0 flag
(6 rows)
look at those six rows. backend_hostname0, backend_port0, backend_weight0, backend_data_directory0, backend_status0, backend_flag0 β all of them, all accounted for, all serving looks π₯ and yes, the WHERE item ~ 'backend.*0' regex is doing the heavy lifting. iykyk π
bestie reminder: you never gotta guess what she's gonna return β the columns are locked in asitem,value, anddescription, every single time π
okay and for the cute sign-off: this whole unhinged love letter is from pgpool-II 4.7.2, dated 2023, and it lives under the manual page name PGPOOL_AD...OL_STATUS(3). mwah, go query something, ily π§π
π¦ where this page comes from
- ubuntu stonking: pgpool2 4.7.2-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms