postgres

Optimize PostgreSQL production performance with tuning, indexing, and replication guidance.

26|8|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/arbazkhan971/godmode --skill postgres-arbazkhan971
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres
Source: https://github.com/arbazkhan971/godmode/tree/main/skills/postgres
Command: npx skills add https://github.com/arbazkhan971/godmode --skill postgres-arbazkhan971

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance, scaling, and operational reliability are hard to get right at production scale; this Skill provides a systematic approach to diagnosing slow queries, reducing bloat, configuring resource settings, and implementing safe replication and partitioning strategies to keep databases healthy and fast.

Core Features & Use Cases

  • Environment Assessment: Collect version, hosting type, workload profile, table sizes, and active connections to establish a baseline.
  • Performance Tuning: Recommend shared_buffers, work_mem, effective_cache_size, and random_page_cost adjustments, plus index and query optimizations guided by EXPLAIN ANALYZE.
  • Partitioning & Scaling: Advise range, list, or hash partitioning strategies for large tables and connect guidance for logical and streaming replication.
  • Operational Safety: Enforce hard rules such as never disabling autovacuum, creating indexes concurrently, and limiting direct connections through poolers like PgBouncer.
  • Extensions & Tooling: Guidance for pg_stat_statements, pgvector, TimescaleDB, PostGIS and when to prefer managed helpers like Supavisor for multi-tenant setups.

Quick Start

Analyze my PostgreSQL database for performance bottlenecks and recommend concrete tuning, indexing, partitioning, and pooling changes.

Frequently Asked Questions about postgres

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

FAQPage Schema
How do I tune PostgreSQL performance for slow queries in production?

PostgreSQL partitioning strategies for large tables involve range, list, or hash partitioning to improve scaling. This Skill advises the appropriate partitioning method and connects it with logical and streaming replication guidance to maintain operational reliability.

What is the best way to configure connection pooling with PgBouncer?

The best way to configure connection pooling with PgBouncer is to limit direct connections and route traffic through a pooler. This Skill provides pooling guidance to reduce connection overhead and ensures operational safety for self-managed and cloud-managed instances.

Why should I never disable autovacuum in PostgreSQL?

You should never disable autovacuum in PostgreSQL because it manages bloat and maintains operational safety by reclaiming dead tuples. This Skill enforces hard rules like keeping autovacuum active and creating indexes concurrently to prevent performance degradation.

Can I use PostgreSQL extensions like pgvector and TimescaleDB with managed cloud databases?

Yes, you can use PostgreSQL extensions like pgvector, TimescaleDB, and PostGIS with managed cloud databases. This Skill provides guidance on integrating these extensions and recommends managed helpers like Supavisor for multi-tenant setups.

How do I set up streaming and logical replication for PostgreSQL?

To set up streaming and logical replication for PostgreSQL, you configure replication parameters and establish connections between primary and replica instances. This Skill provides replication and backup guidance to ensure high availability and operational reliability.