What problem does it solve? PostgreSQL performance and reliability issues—slow queries, table bloat, connection exhaustion, unsafe migrations, and XID wraparound—are hard to diagnose without deep operational knowledge. This Skill provides structured guidance for schema design, query optimization, and production operations so you can resolve database problems systematically instead of guessing. ## Core Features & Use Cases - Query Performance Diagnosis: Use EXPLAIN (ANALYZE, BUFFERS) workflows, pg_stat_statements, and sargable predicate rewrites to find and fix slow queries. - Schema and Index Design: Apply correct data types (timestamptz, bigserial, text), composite/partial/covering indexes, and partitioning strategies for large tables. - Safe Migrations: Add NOT NULL columns and create indexes concurrently without locking production tables. - Operations & Troubleshooting: Configure PgBouncer pooling, tune autovacuum, monitor WAL/checkpoints, plan backups and PITR, and manage replication. - Use Case: Your orders table queries suddenly take 10 seconds. Use this Skill to run EXPLAIN ANALYZE, identify a sequential scan, and create a covering index that restores sub-millisecond reads. ## Quick Start Ask the agent to analyze a slow PostgreSQL query using EXPLAIN ANALYZE and recommend an index to fix it.