auditing-operational-health

Audit PostgreSQL operational health with diagnostic SQL queries and remediation strategies.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/musher-dev/bundles --skill auditing-operational-health
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auditing-operational-health
Source: https://github.com/musher-dev/bundles/tree/main/database-schema-governance/skills/auditing-operational-health
Command: npx skills add https://github.com/musher-dev/bundles --skill auditing-operational-health

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the silent degradation of PostgreSQL databases by proactively monitoring and diagnosing critical operational health issues before they cause catastrophic failures.

Core Features & Use Cases

  • XID Wraparound Monitoring: Detects and alerts on the risk of transaction ID exhaustion, which can force emergency shutdowns.
  • Bloat Detection: Identifies table and index bloat caused by accumulated dead tuples, which impacts performance and disk usage.
  • Autovacuum Tuning Guidance: Provides insights and parameters for optimizing PostgreSQL's background maintenance processes.
  • Performance Metrics: Analyzes cache hit ratios and sequential scan rates to pinpoint performance bottlenecks.
  • Use Case: When experiencing unexplained database slowdowns, this Skill can be used to diagnose issues related to XID wraparound, table bloat, or inefficient vacuuming, providing actionable queries and thresholds for remediation.

Quick Start

Use the auditing-operational-health skill to check the XID wraparound status for all databases.

Frequently Asked Questions about auditing-operational-health

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

FAQPage Schema
How do I check PostgreSQL health for XID wraparound and transaction ID exhaustion risks?

PostgreSQL health monitoring for XID wraparound involves executing diagnostic SQL queries against system catalogs to track transaction ID consumption rates, preventing forced emergency shutdowns caused by ID exhaustion. The skill provides specific queries to detect risk and interpret thresholds for remediation.

What causes table and index bloat in PostgreSQL and how can I detect it?

Table and index bloat in PostgreSQL is caused by accumulated dead tuples from update and delete operations. You can detect bloat by running diagnostic SQL queries that analyze system statistics to identify wasted disk space and performance degradation, enabling targeted vacuum remediation strategies.

How do I tune PostgreSQL autovacuum to fix unexplained database slowdowns?

To tune PostgreSQL autovacuum and resolve unexplained database slowdowns, you analyze autovacuum effectiveness using provided performance metrics and diagnostic queries. The skill offers specific parameter insights and thresholds to optimize background maintenance processes for clearing dead tuples efficiently.

What are the best PostgreSQL performance metrics to check for cache hit ratios and sequential scan rates?

The best PostgreSQL performance metrics to check are cache hit ratios and sequential scan rates, which pinpoint performance bottlenecks. Analyzing these metrics via diagnostic SQL queries reveals inefficient data access patterns, guiding optimization strategies for improved database operational health.

Do I need direct database access to monitor PostgreSQL operational health and execute diagnostic queries?

Yes, you need direct database access to monitor PostgreSQL operational health, as the skill requires executing diagnostic SQL queries directly against the database to analyze system statistics for XID wraparound, bloat, autovacuum effectiveness, and cache hit ratios.

Why does PostgreSQL performance degrade over time even with autovacuum enabled?

PostgreSQL performance degrades over time with autovacuum enabled due to suboptimal autovacuum tuning, accumulating table and index bloat from dead tuples, and low cache hit ratios. Diagnostic queries help identify whether autovacuum parameters need adjustment to clear dead tuples more efficiently.