Skip to content

Requirements and tested versions

Requirement Version
Go 1.26 or newer. CI builds with the minimum version in go.mod and the latest stable release.
C compiler, CGO enabled Any compiler Go supports, such as GCC or Clang. The SQL parser uses libpg_query through cgo, so CGO_ENABLED=0 builds fail.

There are no prebuilt binaries, container images, or releases yet. Build from a known commit:

Terminal window
go build -o bin/pg-proxy ./cmd/pg-proxy

CI builds and tests on Linux (Ubuntu 24.04, x86-64). The binary also builds and runs on macOS and other Unix systems. One feature is Linux-only: detecting a client that disconnects while it waits for a backend connection. On other systems, the proxy notices the disconnect only when it next writes to the client.

PostgreSQL Status
14, 18 The integration and PostgreSQL regression suites run in CI on every change.
15, 16, 17 The PostgreSQL regression suite runs in CI on every change. The full integration suite passes, but CI does not run it on these versions.
13 and older Not tested.

PG Proxy speaks PostgreSQL wire protocol version 3.0, which every supported PostgreSQL version uses. Features that depend on session state have limits under transaction pooling; see Transaction-pooling compatibility.

The integration suite runs against PostgreSQL 14 by default. To run it against another version that CI tests, set PG_PROXY_TEST_POSTGRES_MAJOR. It selects that version’s image, pinned by digest in internal/itest/images.go:

Terminal window
PG_PROXY_TEST_POSTGRES_MAJOR=18 go test -tags=integration -count=1 ./...

To run it against any other image, set PG_PROXY_TEST_POSTGRES_IMAGE. It takes precedence over PG_PROXY_TEST_POSTGRES_MAJOR:

Terminal window
PG_PROXY_TEST_POSTGRES_IMAGE=postgres:17-bookworm go test -tags=integration -count=1 ./...

Any PostgreSQL driver that uses protocol version 3.0 can connect, including libpq-based clients such as psql, pgx, JDBC, and node-postgres.

Client feature Support
TLS (sslmode) Supported. See Client TLS.
SCRAM-SHA-256 password authentication Supported with proxy.password_auth_enabled.
SCRAM-SHA-256-PLUS (channel binding) Not supported. Clients that require it (channel_binding=require) cannot connect.
MD5, GSSAPI, SSPI, client certificates Not supported.
Named and unnamed prepared statements Supported across backend connections. See Prepared statements.
Query cancellation Supported.