LOCK-2041 · pg-ledger-primaryPostgreSQL monitoring for engineering teams
Find what’s blocking your PostgreSQL.
See connection pressure, cache efficiency, and blocking sessions in one place. Investigate contention with masked SQL evidence instead of starting from an unexplained spike.
Start with one database. Automated session termination stays off by default. Pilot scope and costs are agreed before you proceed.
- Lookback window
- 7 days
- Forecast horizon
- 2 hours
- Metrics evaluated
- 2
- Minimum samples
- 6
Forecast crosses the seven-day deviation boundary at 13:35 UTC.
- Observed
- Linear forecast
- Deviation boundary
LOCK-2039 · pg-orders-primaryPRD-0187 · pg-orders-primaryFrom account to telemetry
A small, inspectable pilot—not a fleet-wide commitment.
Use a test database first. Confirm permissions, connectivity and the measurements you need before expanding the deployment.
- 01 · Register
Create your organization
Add one PostgreSQL instance and generate a scoped agent credential. Invite the engineers who will evaluate the results.
Create an account → - 02 · Connect
Run the Go agent
Run it where it can reach PostgreSQL over TLS and the GDE HTTPS endpoint. Review the monitoring role and installation instructions for your host.
- 03 · Investigate
Verify actual measurements
Check first telemetry, connection pressure and masked blocking evidence. Forecasts need sufficient history; they are not guaranteed incident predictions.
What a pilot should answer
Can the agent connect with the intended monitoring privileges? Do measurements match PostgreSQL? Can your engineers identify a blocker? Agree on the evaluation period, database count, support and any service or agent-hosting costs with us first.
Before you connect
Know what gets read—and what leaves your database.
A monitoring connection is still database access. Review its permissions and the deployment settings with your team.
Read the lock-monitoring guide →Outcomes by role
One record of database risk, read three ways.
Each team gets the view it needs from the same underlying data — without exporting raw queries to get there.
Explore the Architecture →01 · Platform & SRE
Investigate the pressure behind the graph.
Connection and cache metrics provide context; blocking-session evidence helps explain contention. Trend forecasts are an additional signal, not a guarantee.
- connection monitoring
- lock incidents
- masked query evidence
02 · Security review
Inspect the monitoring data path.
SQL literals become positional placeholders; query structure and identifiers can remain. Tenant-scoped access, authenticated agents and selected administrative audit events provide controls to review.
- tenant isolation
- RBAC
- audit logging
- SQL masking
03 · Engineering leadership
Evaluate with the engineers who own the workload.
Invite your team, control roles and review observations together. Automated preemption remains an operator-controlled, explicit opt-in.
- team access
- scoped pilot
- PostgreSQL
An additional signal, not a guarantee
Trend forecasts with explicit limitations.
GDE projects blocked connections and cache hit ratio up to two hours ahead when enough history is available. A confidence score is a model signal—not a calibrated probability of an outage. Sudden changes can make a projection wrong.
Metric
- Current
- 3
- 2h forecast
- 8
- 7-day median
- 1
- Deviation boundary
- 5
- Observed
- Linear forecast
- Comparison boundary
Lock incidents & query evidence
Every blocking pair carries its evidence.
The agent resolves the blocked and root-blocking sessions from PostgreSQL lock state. Both SQL texts are masked before storage, with literals replaced by positional placeholders.
pg-orders-primaryPID 18402 waits on an AccessExclusiveLock
PID 17291 identified after the five-second threshold
SQL literals replaced before telemetry leaves the data path
Credential-bound lock incident accepted once
UPDATE orders SET status = $1 WHERE id = $2
Safe opt-in preemption
Preemption stays off until an operator enables it.
The Go agent can terminate an eligible root blocker only when its runtime policy explicitly opts in. System roles, protected databases, replication, autovacuum, and non-client backends remain excluded.
- 01Disabled by default in every agent deployment.
- 02A global throttle limits termination attempts.
- 03Every decision emits a structured audit event.
Agent runtime policy · sample
production-safe-default- enabled
- GDE_AUTO_PREEMPTION_ENABLED=false
- minimum interval
- 5 minutes
- protected role
- payments_owner
- protected database
- billing
Structured stderr audit
- preemption · result=skipped · reason=disabled
Architecture
Built on components your platform team already understands.
A Go agent on your hosts, an idempotent ingestion path, and a Rails control plane backed by PostgreSQL, ClickHouse, and Redis.
Data path
GoAgentReads PostgreSQL connection, cache, and lock state and masks SQL before export.
ReceiverBounded ingestionAuthenticates the agent, deduplicates event IDs, and applies backpressure.
BatchIdempotent writesA retried event is accepted once before native ClickHouse insertion.
ClickHouseTelemetry storeRaw metrics, hourly rollups, and masked lock incidents.
Control plane
RailsApplication & APIDashboard reads, forecasts, authentication, RBAC, alerts, and audited admin mutations.
- →
PostgreSQL + RedisControl state & jobsClients, users, API keys, alert thresholds, audit entries, and Sidekiq delivery.
Security & reliability
Controls you can inspect in the product.
These are product capabilities, described as they behave. Ask us to walk through any of them against your own review checklist.
- ✓Tenant isolation
- Credential-bound client and agent identity scopes telemetry before storage; dashboard reads are always scoped to the authenticated client.
- ✓Role-based access control
- Admin, engineer, and readonly roles govern organization data; readonly users cannot mutate instance or credential configuration.
- ✓Audit logging
- API-key generation, API-key revocation, and alert-threshold changes are written asynchronously.
- ✓SQL data masking
- Blocking-query literals are replaced with positional placeholders such as $1, $2, and $3 before storage.
- ✓Secure agent authentication
- Agent credentials are checked against their tenant-and-agent scope; receiver identity is bound by the private gateway.
- ✓Idempotent ingestion
- Retried event IDs are deduplicated within the configured window. This is not an unlimited exactly-once guarantee.
- ✓Safe opt-in preemption
- Automated session preemption is disabled unless the agent operator enables it explicitly.
Start a pilot
Bring one database and one question.
Tell us what you need to investigate. We will review the host, access requirements and evaluation scope with you.
Prefer to explore first? Create an account. Agent hosting can incur costs on your provider.