Ridge Pgwire and Drivers
ridged exposes a bounded PostgreSQL-wire v3 subset on loopback. Pgwire is a
transport contract; it does not make Ridge a PostgreSQL server.
Default endpoint
| Setting | Default |
|---|---|
| Host | 127.0.0.1 |
| Port | 7898 |
| Database | ridge |
| User | ridge |
| Maximum message | 1 MiB |
Keep the listener on loopback. For a remote host, use Ridge Admin's verified
SSH direct-tcpip transport or an operator-controlled SSH connection.
Security configuration
First-run bootstrap creates the data directory, a durable superuser, and the initial database in one recoverable operation, then prints connection instructions:
ridged --init --data=/absolute/path/to/ridge --password=SECRET
The catalog lands at {data}/security.catalog with owner-only permissions.
A server started with the same --data discovers it automatically; no
environment configuration is required. Rerunning --init against a valid
catalog reports the existing initialization instead of replacing it.
The service still recognizes the operator environment:
RIDGE_PGWIRE_PORT
RIDGE_PGWIRE_DATABASE
RIDGE_PGWIRE_USER
RIDGE_PGWIRE_PASSWORD
RIDGE_PGWIRE_READ_ONLY
RIDGE_PGWIRE_TLS_CERT
RIDGE_PGWIRE_TLS_KEY
RIDGE_SECURITY_CATALOG
RIDGE_PGWIRE_USER/RIDGE_PGWIRE_PASSWORD/RIDGE_PGWIRE_DATABASE are
bootstrap and one-time migration inputs, not the primary onboarding path.
RIDGE_SECURITY_CATALOG overrides the catalog location when the catalog
must live outside the data directory.
Password authentication is cleartext inside the verified TLS channel. Ridge does not claim SCRAM, certificate identity, or broad PostgreSQL privilege behavior beyond the documented security catalog. Protect the environment file with restrictive permissions.
Protocol surface
The daemon supports startup, SSL negotiation, simple query, and a bounded text
Parse/Bind/Describe/Execute/Sync lifecycle. It preserves transaction/error
status, parameter/result metadata, typed NULL, binary-safe text values,
named/unnamed statements, bounded portal rebinding and batching, cancellation,
and DISCARD ALL.
Unsupported features include COPY, general binary formats, JDBC relational
Describe Portal, and broad catalogs.
Validated clients
| Client | Frozen evidence |
|---|---|
| libpq / psql | 17.5 |
| JDBC | 42.7.7 |
| Go pgx | 5.7.5 |
| Python psycopg | 3.2.9 |
| Node pg | 8.16.3 |
Only the documented test settings and query shapes are claimed. An ORM can still fail if it expects PostgreSQL catalogs, server parameters, migrations, or binary encodings outside the subset.
Basic connection
psql -X -h 127.0.0.1 -p 7898 -U ridge -d ridge
pg_isready -h 127.0.0.1 -p 7898 -d ridge
Use a bounded connection pool. On disconnect, replay read-only work only when the caller explicitly allows it. Never replay a mutation whose acknowledgment was lost; its outcome is uncertain until verified.