pgpool_adm
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgpool | 4.7.1 | ADMIN | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 5900 | pgpool_adm | No | No | No | Yes | No | No | - |
| 5910 | pgpool_recovery | No | No | No | Yes | No | No | - |
| 5920 | pgpool_regclass | No | No | No | Yes | No | No | - |
| Related | pgautofailover pg_failover_slots pg_repack pg_rewrite pg_squeeze pg_dirtyread |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 4.7.1 | 1817161514 | pgpool | - |
| RPM | PGDG | 4.7.1 | 1817161514 | pgpool-II-pg$v-extensions | - |
| DEB | PGDG | 4.7.1 | 1817161514 | postgresql-$v-pgpool2 | - |
Install
You can install pgpool directly. First, make sure the PGDG repository is added and enabled:
pig repo add pgdg -u # Add PGDG repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pgpool; # Install for current active PG version
pig ext install -y pgpool -v 18 # PG 18
pig ext install -y pgpool -v 17 # PG 17
pig ext install -y pgpool -v 16 # PG 16
pig ext install -y pgpool -v 15 # PG 15
pig ext install -y pgpool -v 14 # PG 14
dnf install -y pgpool-II-pg18-extensions # PG 18
dnf install -y pgpool-II-pg17-extensions # PG 17
dnf install -y pgpool-II-pg16-extensions # PG 16
dnf install -y pgpool-II-pg15-extensions # PG 15
dnf install -y pgpool-II-pg14-extensions # PG 14
apt install -y postgresql-18-pgpool2 # PG 18
apt install -y postgresql-17-pgpool2 # PG 17
apt install -y postgresql-16-pgpool2 # PG 16
apt install -y postgresql-15-pgpool2 # PG 15
apt install -y postgresql-14-pgpool2 # PG 14
Create Extension:
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.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.