PostgreSQL Idle In Transaction Minutes Alert


Use the Idle In Transaction Minutes alert in Mini DBA to monitor PostgreSQL instances and make this condition visible before it becomes a wider database incident.

Screenshot pending: Mini DBA PostgreSQL Idle In Transaction Minutes alert screenshot placeholder

Alert Summary

  • Platform: PostgreSQL
  • Alert category: Query
  • Default enabled: true
  • Default evaluation frequency: Minute
  • Threshold label: Minutes
  • Unit: minutes

What Mini DBA Checks

Mini DBA describes this alert as: Sessions idle in a transaction can hold locks and prevent vacuum cleanup. The default evaluation frequency is Minute, so the alert is intended to be close enough to operational reality for live triage.

Why This Alert Is Helpful

This alert highlights concurrency pressure. Blocking, long sessions, and lock waits can turn a healthy server into a slow user experience, so the alert gives administrators an early route to the sessions, statements, and applications involved.

When To Enable It

Enable it once the instance has a normal workload baseline. It is especially useful on busy OLTP, reporting, and integration systems where resource pressure can quickly become user-visible.

Threshold Guidance

Threshold meaning: Minutes. Major threshold: 60 minutes. Minor threshold: 30 minutes. Comparison direction: "over". Use higher thresholds on batch-heavy, development, or intentionally bursty systems where brief pressure is expected. Use lower thresholds on latency-sensitive production systems, small instances with little headroom, and services with strict recovery or availability commitments.

Remediation For An Active Alert

Open the activity, blocking, and query views to identify the lead blocker, SQL text, wait type, login, host, and application. Prefer fixing the query or transaction pattern, but kill or cancel the blocking session when the business impact is higher than the rollback risk.

Investigation Workflow

  1. Confirm the alert is still active and note the first seen time, affected instance, and severity.
  2. Review the top consumers, host counters, service tier or instance size, and recent workload changes in Mini DBA before changing configuration or ending sessions.
  3. Compare the current value with the normal baseline for the same time of day or maintenance window.
  4. Record the cause, corrective action, and whether thresholds or routing should be adjusted after the incident.

Avoiding Alert Noise

If this alert is noisy, check whether the workload naturally has short bursts. Raise the duration or threshold for expected batch windows, but keep a lower route for production systems where user-facing latency matters. Avoid simply disabling the alert until you know whether the noise is caused by threshold choice or by a real capacity trend.

Related Pages