feat: production-tuned pool defaults + tuning guide #168

Merged
ash merged 1 commit from feat/production-tuning into main 2026-03-02 22:48:51 +00:00
Owner

pgstore.NewPool with production defaults + docs/production-tuning.md covering pools, checkpoint batching, Postgres server settings, TCP keepalive for failover.

pgstore.NewPool with production defaults + docs/production-tuning.md covering pools, checkpoint batching, Postgres server settings, TCP keepalive for failover.
feat: production-tuned pool defaults + tuning guide — Refs #166
Some checks failed
CI / test-sqlitestore (push) Failing after 4s
CI / test-pgstore (push) Failing after 4s
CI / test-nats (push) Failing after 5s
CI / test-integration (push) Failing after 4s
CI / benchmarks (push) Failing after 4s
CI / test-codec-otelkit (push) Successful in 12s
CI / test-sqlitestore (pull_request) Failing after 5s
CI / test-pgstore (pull_request) Failing after 5s
CI / test-nats (pull_request) Failing after 7s
CI / test-integration (pull_request) Failing after 4s
CI / test-codec-otelkit (pull_request) Successful in 12s
CI / benchmarks (pull_request) Failing after 4s
CI / test-core (push) Failing after 1m13s
CI / test-core (pull_request) Failing after 1m18s
0604c7b96b
pgstore.NewPool: production-tuned connection pool with sensible defaults:
- MaxConns: max(4, NumCPU*2) — scales with hardware
- MinConns: 2 — no cold-start latency
- MaxConnLifetime: 30min — recycles after Postgres restarts
- MaxConnIdleTime: 5min — returns idle resources
- HealthCheckPeriod: 30s — fast dead connection detection
- WithSchema option for search_path

docs/production-tuning.md:
- Pool sizing for advisory locks
- Checkpoint batching (100x write reduction)
- Subscription tuning (batch size, poll interval)
- Full recommended production config
- Postgres server settings (WAL, autovacuum, TCP keepalive)
- TCP keepalive for faster leader election failover
ash merged commit 69e5776946 into main 2026-03-02 22:48:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit!168
No description provided.