postgres-pro

Optimize PostgreSQL performance with EXPLAIN, JSONB, and VACUUM tuning.

Updated May 31, 2026
One-click install
npx skills add https://github.com/fanguyun/SkillManager --skill postgres-pro-fanguyun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-pro
Source: https://github.com/fanguyun/SkillManager/tree/main/postgres-pro
Command: npx skills add https://github.com/fanguyun/SkillManager --skill postgres-pro-fanguyun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires postgresql, pg_stat_statements, jsonb, replication, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you optimize PostgreSQL databases, configure replication, and implement advanced features like EXPLAIN analysis, JSONB operations, and VACUUM tuning.

Core Features & Use Cases

  • Query Optimization: Analyze and optimize slow queries with EXPLAIN.
  • JSONB Operations: Implement JSONB storage and indexing strategies.
  • Replication Configuration: Set up streaming or logical replication.
  • Extension Usage: Configure and use PostgreSQL extensions like PostGIS and pgvector.
  • VACUUM Tuning: Fine-tune VACUUM, ANALYZE, and autovacuum for performance.
  • Monitoring: Monitor database health with pg_stat views.
  • Use Case: For example, you can use this Skill to identify and optimize slow queries in your PostgreSQL database, configure a streaming replication setup, or tune the VACUUM process to prevent table bloat.

Quick Start

Run the following SQL command to analyze the slowest query in your database: SELECT query, mean_exec_time, calls FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 1;

Frequently Asked Questions about postgres-pro

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

FAQPage Schema
How do I optimize slow PostgreSQL queries using EXPLAIN analysis?

To optimize slow PostgreSQL queries, you use EXPLAIN analysis to inspect query execution plans and identify bottlenecks. You can also query pg_stat_statements to find operations with the highest mean execution time for targeted tuning.

What is the best way to configure PostgreSQL streaming or logical replication?

The best way to configure PostgreSQL replication involves setting up streaming or logical replication to duplicate data across nodes. This Skill provides the necessary configuration references to establish replication for high availability.

How do I implement JSONB storage and indexing strategies in PostgreSQL?

To implement JSONB storage and indexing strategies, you utilize PostgreSQL's JSONB data type for flexible document storage. This Skill supports advanced JSONB operations to efficiently query and index nested JSON structures.

Do I need pg_stat_statements to monitor PostgreSQL database health?

Yes, you need pg_stat_statements to monitor PostgreSQL database health effectively. This extension tracks query execution statistics, which combined with pg_stat views, helps identify performance bottlenecks.

Why does my PostgreSQL table bloat and how do I tune VACUUM to prevent it?

PostgreSQL table bloat occurs when dead tuples are not reclaimed efficiently, and you prevent it by tuning VACUUM. This Skill helps fine-tune VACUUM, ANALYZE, and autovacuum settings to maintain storage health.