postgres-pro

Analyze PostgreSQL execution plans and recommend safe index and query optimizations.

2|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/rabbicse/go-projects --skill postgres-pro-rabbicse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-pro
Source: https://github.com/rabbicse/go-projects/tree/main/projects/movie-ticket-booking/.claude/skills/postgres-pro
Command: npx skills add https://github.com/rabbicse/go-projects --skill postgres-pro-rabbicse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams diagnose, optimize, and operate PostgreSQL systems when queries are slow, indexes are ineffective, or database maintenance is becoming risky and time-consuming.

Core Features & Use Cases

  • Query Performance Tuning: Analyze execution plans, identify bottlenecks, and recommend safer, faster index or query changes.
  • JSONB and Advanced Features: Design efficient JSONB queries, choose the right index types, and use PostgreSQL extensions for search, vectors, spatial data, and security.
  • Replication and Maintenance: Configure and monitor streaming or logical replication, tune VACUUM and autovacuum, and track health with pg_stat views.
  • Use Case: A production order system starts timing out after growth; this Skill can inspect the plan, verify index usage, tune statistics, and suggest monitoring checks to confirm the fix.

Quick Start

Use the postgres-pro skill to analyze my slow PostgreSQL query, explain the execution plan, and recommend the safest production-ready optimization.

Frequently Asked Questions about postgres-pro

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

FAQPage Schema
How do I analyze a slow PostgreSQL query using its execution plan?

To analyze a slow PostgreSQL query, inspect its EXPLAIN execution plan to identify bottlenecks like sequential scans or inefficient joins. Verify index usage, refresh statistics with ANALYZE, and apply safer index changes to resolve performance bottlenecks in production.

What is the best way to optimize JSONB queries in PostgreSQL?

Optimizing JSONB queries in PostgreSQL involves designing efficient query structures and choosing the right index types, such as GIN indexes. You can also leverage PostgreSQL extensions for advanced search and spatial data to improve JSONB workload performance.

How do I tune VACUUM and autovacuum to prevent database maintenance issues?

Tune VACUUM and autovacuum in PostgreSQL by adjusting configuration parameters to manage bloat and transaction ID wraparound safely. Proper VACUUM tuning prevents maintenance operations from blocking production workloads and maintains operational reliability.

Why does PostgreSQL replication lag occur and how can I monitor it?

PostgreSQL replication lag occurs due to network latency, long-running transactions, or insufficient streaming and logical replication configuration. Monitor replication lag and overall health by tracking pg_stat views and conducting regular replication health checks.

Can I make online index changes safely in a production PostgreSQL database?

Yes, you can make online index changes safely in a production PostgreSQL database by creating indexes concurrently. This approach avoids blocking table writes, but requires execution-plan verification and health checks afterward to confirm reliable outcomes.