Production Runtime
pg-kinetic runtime behavior is centered on lifecycle state, readiness state, shutdown coordination, health endpoints, and admin snapshots.
For the exact stable 1.0 support boundary, PostgreSQL targets, authentication, TLS, pooling, recovery, compatibility, and preview exclusions, see the Stable 1.0 Release Contract.
Lifecycle States
SHOW RUNTIME can report:
startingreadydrainingstoppingstopped
Readiness is separate:
readymeans the proxy is accepting new worknot_readymeans startup is incomplete or the proxy is not accepting workdrainingmeans the runtime is winding down
Readiness
The proxy becomes ready after listeners initialize and backend checks pass when those checks are enabled.
GET /readyz returns 503 when the drain controller is not accepting clients or the backend probe is not ready.
Shutdown Sequence
Signal-driven shutdown follows this sequence:
- begin drain
- stop accepting new clients
- wait for active sessions within
drain_timeout_ms - wait through
shutdown_grace_mswhen sessions overrun the drain window - force-close remaining sessions
- transition toward stop
The HTTP health server does not implement /drain, so Kubernetes pre-stop HTTP hooks must not call it.
Runtime Engine Selection
[runtime.engine]
runtime_engine = "thread_per_core"
| Engine | Status |
|---|---|
thread_per_core | default and stable |
tokio_default | stable option |
tokio_current_thread | stable option |
io_uring | stable Linux option; requires the io-uring cargo feature |
io_uring uses monoio for the accept and transport layer while reusing the
shared pg-kinetic session, authentication, routing, pooling, timeout, cleanup,
and recovery logic.
Preflight
pg-kinetic preflight --config path/to/pg-kinetic.toml --format json
Preflight checks runtime assets and guardrails such as TLS files, auth user store loading, mirror isolation models, lifecycle timing, and adaptive config validity. Sharding, policy, and mirroring checks do not mean those features are live traffic features.
The JSON output includes ok, warning_count, error_count, warnings, and errors.
Release Checklist
- Confirm
SHOW RUNTIMEreports the expected node id, lifecycle state, readiness state, and runtime engine. - Confirm
SHOW SETTINGSmatches the intended backend address, drain budget, and health configuration. - Run
pg-kinetic preflight --config ...and clear all errors before rollout. - Verify the shutdown window is shorter than the supervisor termination grace period.
- Keep experimental runtime engines out of default deployments unless they have workload-specific benchmark evidence.