bgw_replstatus
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
bgw_replstatus | 1.0.8 | STAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6510 | bgw_replstatus | No | Yes | Yes | No | No | No | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 1.0.8 | 1817161514 | bgw_replstatus | - |
| RPM | PGDG | 1.0.8 | 1817161514 | bgw_replstatus_$v | - |
| DEB | PGDG | 1.0.8 | 1817161514 | postgresql-$v-bgw-replstatus | - |
Install
You can install bgw_replstatus directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Usage
bgw_replstatus: lightweight replication status checker for load balancers
bgw_replstatus is a background worker that listens on a TCP port and immediately reports whether the node is a MASTER or STANDBY. Designed for load balancer health checks without requiring a full PostgreSQL connection.
How It Works
Any TCP connection to the configured port receives an immediate text response (MASTER or STANDBY) and the connection is closed. No request is needed.
Quick Test
HAProxy Configuration Example
Configuration
| Parameter | Default | Description |
|---|---|---|
bgw_replstatus.port | 5400 | TCP port to listen on |
bgw_replstatus.bind | (wildcard) | IP address to bind to |
Security note: There is no source verification. Protect the port with a host firewall.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)