What problem does it solve?
Helps engineers and DBAs diagnose, optimize, and troubleshoot PostgreSQL databases to improve query performance, reduce resource contention, and ensure reliable backups and replication behavior, with PlanetScale-specific guidance when applicable.
Core Features & Use Cases
- Schema & Index Guidance: Recommendations for primary keys, data types, composite and partial indexes, and index audit queries to find unused, duplicate, or bloat-prone indexes.
- Query & Planner Optimization: Advice on query rewrites, EXPLAIN analysis, planner tuning (random_page_cost, effective_cache_size), and pagination best practices to reduce latency and IO.
- Operations & Reliability: Procedures for MVCC/VACUUM tuning, WAL/checkoutpoint configuration, PITR/backups, replication slot management, checkpoint tuning, and memory/connection pooling strategies including PgBouncer sizing and PlanetScale CLI insights.
- Monitoring & Runbooks: Key monitoring queries (pg_stat views, pg_stat_statements), host metric checks, and actionable checks for long transactions, XID wraparound, and autovacuum health.
- Use Case Example: Diagnose a high-write table that is causing WAL bloat and slow checkpoints, then produce index, autovacuum, and WAL/archive recommendations and an actionable rollback plan.
Quick Start
Ask the postgres skill to analyze a specific slow SQL query and return index, configuration, and monitoring recommendations for the target database.