postgres-engineer

Diagnoses and tunes PostgreSQL configuration, replication, vacuum behavior, and locking under production workloads.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/sumitake/agent-collab --skill postgres-engineer-sumitake
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: postgres-engineer
Source: https://github.com/sumitake/agent-collab/tree/main/plugins/agent-collab/skills/postgres-engineer
Command: npx skills add https://github.com/sumitake/agent-collab --skill postgres-engineer-sumitake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? PostgreSQL deployments degrade under real load through replication lag, table bloat, connection exhaustion, lock contention, and untested failover plans. This Skill provides engine-level administration guidance grounded in how PostgreSQL actually behaves, replacing generic tuning folklore with workload-specific recommendations that include rollback paths. ## Core Features & Use Cases - Configuration and Memory Tuning: Recommends shared_buffers, work_mem, effective_cache_size, checkpoint, and planner cost settings matched to actual hardware and workload type. - Vacuum, Replication, and Locking Analysis: Diagnoses autovacuum falling behind, designs streaming or logical replication topologies, and explains lock modes and deadlock patterns for write-heavy tables. - Safe Migration and Recovery Planning: Plans lock-minimizing schema changes on large live tables, partitioning conversions, and backup/PITR strategies with stated downtime and rollback steps. - Use Case: A production database shows growing replication lag and connection pool exhaustion. The Skill identifies whether the root cause is vacuum lag, lock contention, or pooler misconfiguration, then recommends the smallest safe change with expected impact and residual risk. ## Quick Start Ask the agent to diagnose why your PostgreSQL database shows replication lag and connection exhaustion, and recommend a safe fix with a rollback plan.

Frequently Asked Questions about postgres-engineer

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

FAQPage Schema
How do I tune PostgreSQL memory settings for my workload?▼

PostgreSQL memory tuning adjusts shared_buffers, work_mem, and effective_cache_size based on actual hardware and workload type rather than generic defaults. This Skill matches these settings to observed OLTP, analytical, or mixed workload behavior and states the expected impact.

How to fix PostgreSQL replication lag in production?▼

PostgreSQL replication lag is diagnosed by identifying whether the cause is WAL generation rate, network throughput, or replay bottlenecks on the replica. The Skill recommends the smallest safe change with a rollback path and distinguishes tested failover behavior from theoretically sound setups.

Why does autovacuum fall behind on large PostgreSQL tables?▼

Autovacuum falls behind when table churn outpaces default vacuum thresholds and cost limits, causing bloat that degrades query performance. The fix involves tuning autovacuum parameters against actual table churn rather than leaving engine defaults in place.

Can I partition a large PostgreSQL table without downtime?▼

PostgreSQL supports range, list, and hash partitioning with a migration path for converting existing large tables using lock-minimizing techniques. The Skill states expected downtime, rollback steps, and replication impact for any staged rollout.

When should I use a connection pooler with PostgreSQL?▼

A connection pooler helps when connection counts exhaust PostgreSQL's process limits, but pooler mode (session, transaction, statement) must match the application's behavior. The Skill distinguishes a genuine pooling problem from an underlying slow-query problem before recommending changes.

What are the limitations of this PostgreSQL administration skill?▼

This Skill covers PostgreSQL engine administration only and does not handle generic SQL query writing or cross-database optimization. Plain query-tuning requests are deferred unless the fix is engine-specific, such as index type selection, planner behavior, or lock contention.