Skip to content

Example — postgres-cluster

Example — postgres-cluster

Full PostgreSQL cluster + HeliosProxy compose, suitable for local development.

Source on GitHub: HDB-HeliosDB-Proxy/examples/postgres-cluster

What it provisions

  • One PG primary + two streaming-replication standbys (Docker Compose)
  • HeliosProxy v0.4.0 in front, configured with topology-postgres backend discovery
  • Health checks polling pg_is_in_recovery() on a 5-second cadence
  • Optional admin web UI on :9090

Run

Terminal window
git clone https://github.com/dimensigon/HDB-HeliosDB-Proxy.git
cd HDB-HeliosDB-Proxy/examples/postgres-cluster
docker compose up -d

Connect via psql postgresql://demo:demo@localhost:5432/postgres. Open http://localhost:9090/ for the admin console.

What to look at

  • docker-compose.yml — backend topology and proxy configuration
  • proxy.toml — pool modes, lag-aware routing, query analytics
  • init/ — primary bootstrap SQL + standby provisioning script