postgresql-health-check

Diagnose PostgreSQL 13+ health via SQL queries against system views.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/rudi-bruchez/dba-skills --skill postgresql-health-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-health-check
Source: https://github.com/rudi-bruchez/dba-skills/tree/main/skills/postgresql-health-check
Command: npx skills add https://github.com/rudi-bruchez/dba-skills --skill postgresql-health-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps identify and diagnose common performance issues and potential problems within a PostgreSQL database instance, ensuring optimal health and stability.

Core Features & Use Cases

  • Comprehensive Health Analysis: Checks connections, wait events, lock contention, bloat, autovacuum status, replication lag, and transaction ID wraparound risk.
  • Proactive Monitoring: Use during routine audits or when experiencing slowness, connection refusals, or high resource utilization.
  • Use Case: When users report that PostgreSQL is slow or queries are timing out, run this health check to pinpoint the bottleneck, whether it's lock contention, excessive bloat, or replication lag.

Quick Start

Run a PostgreSQL health check by executing the provided diagnostic queries.

Frequently Asked Questions about postgresql-health-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose PostgreSQL performance issues like lock contention and bloat?

Diagnose PostgreSQL performance by analyzing critical metrics including connections, wait events, lock contention, table bloat, and autovacuum status using SQL queries against system views for real-time diagnostics.

Why does my PostgreSQL database experience slowness or connection refusals?

PostgreSQL slowness and connection refusals often stem from lock contention, excessive bloat, high resource utilization, or replication lag, which you can pinpoint by running a comprehensive database health check.

Does this PostgreSQL health check support diagnostic queries for transaction ID wraparound risk?

Yes, the PostgreSQL health check supports diagnostic queries for transaction ID wraparound risk, alongside analyzing autovacuum status and replication lag, utilizing SQL queries against system views.

What's the best way to check PostgreSQL replication lag and wait events?

The best way to check PostgreSQL replication lag and wait events is to execute provided diagnostic SQL queries against system views to identify bottlenecks and ensure database stability.

Can I run PostgreSQL diagnostics on instances older than version 13?

You cannot run these PostgreSQL diagnostics on instances older than version 13, as the health check specifically supports PostgreSQL 13+ to analyze system views and critical database metrics.