pgpool_adm
pgpool_adm
pgpool : Administrative functions for pgPool
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5900 | pgpool_adm | pgpool | 4.7.1 | ADMIN | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
----d-- | No | No | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | pgautofailover pg_failover_slots pg_repack pg_rewrite pg_squeeze pg_dirtyread |
| Siblings | pgpool_recovery pgpool_regclass |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 4.7.1 | 18 17 16 15 14 | pgpool | - |
| RPM | PGDG | 4.7.1 | 18 17 16 15 14 | pgpool-II-pg$v-extensions | - |
| DEB | PGDG | 4.7.1 | 18 17 16 15 14 | postgresql-$v-pgpool2 | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
el8.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
el9.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
el9.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
el10.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
el10.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
d12.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
d12.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
d13.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
d13.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
u22.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
u22.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
u24.x86_64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
u24.aarch64 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 | PGDG 4.7.1 |
Source
Install
Make sure PGDG repo available:
pig repo add pgdg -u # add pgdg repo and update cacheInstall this extension with pig:
pig install pgpool; # install via package name, for the active PG version
pig install pgpool_adm; # install by extension name, for the current active PG version
pig install pgpool_adm -v 18; # install for PG 18
pig install pgpool_adm -v 17; # install for PG 17
pig install pgpool_adm -v 16; # install for PG 16
pig install pgpool_adm -v 15; # install for PG 15
pig install pgpool_adm -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pgpool_adm;Usage
The pgpool_adm extension provides SQL-callable wrapper functions for Pgpool-II PCP (Pgpool Control Protocol) commands, enabling administration of Pgpool-II from within PostgreSQL.
Available Functions
| Function | Description |
|---|---|
pgpool_adm_pcp_node_info | Display information on a given backend node |
pgpool_adm_pcp_health_check_stats | Display health check statistics for a node |
pgpool_adm_pcp_pool_status | Retrieve parameters from pgpool.conf |
pgpool_adm_pcp_node_count | Get the number of backend nodes |
pgpool_adm_pcp_attach_node | Attach a backend node |
pgpool_adm_pcp_detach_node | Detach a backend node |
pgpool_adm_pcp_proc_info | Display Pgpool-II child process information |
Call Methods
Functions support two calling conventions:
Direct parameters (hostname, port, username, password, plus function-specific args):
SELECT * FROM pgpool_adm_pcp_node_info('localhost', 9898, 'admin', 'password', 0);
SELECT * FROM pgpool_adm_pcp_node_count('localhost', 9898, 'admin', 'password');
SELECT * FROM pgpool_adm_pcp_pool_status('localhost', 9898, 'admin', 'password');Foreign server reference (uses port 9898 and credentials from ~/.pcppass):
SELECT * FROM pgpool_adm_pcp_node_info(server_name := 'pgpool_server', node_id := 0);
SELECT * FROM pgpool_adm_pcp_node_count(server_name := 'pgpool_server');Node Management
-- Detach a backend node
SELECT pgpool_adm_pcp_detach_node('localhost', 9898, 'admin', 'password', 1);
-- Re-attach a backend node
SELECT pgpool_adm_pcp_attach_node('localhost', 9898, 'admin', 'password', 1);The default PCP communication port is 9898. Credentials can be managed via the .pcppass file in the user’s home directory.
Last updated on