postgresql

Analyze PostgreSQL configurations, queries, and health metrics for optimization.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/randoneering/nix-flake-mirror --skill postgresql-randoneering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql
Source: https://github.com/randoneering/nix-flake-mirror/tree/main/home/programs/opencode/skills/postgres/pg_optimization
Command: npx skills add https://github.com/randoneering/nix-flake-mirror --skill postgresql-randoneering

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

PostgreSQL optimization and health monitoring across configurations, queries, cloud providers, and maintenance.

Core Features & Use Cases

  • Configuration tuning (postgresql.conf, memory, WAL, autovacuum)
  • Query optimization (EXPLAIN analysis, index design, rewriting patterns)
  • Cloud provider guidance (AWS RDS, GCP Cloud SQL, Azure)
  • Health monitoring and troubleshooting (bloat detection, replication lag, vacuum status)
  • Pattern-based optimization workflows

Quick Start

Analyze a slow PostgreSQL plan and propose targeted indexing and configuration adjustments.

Frequently Asked Questions about postgresql

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

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

PostgreSQL query optimization uses EXPLAIN analysis to inspect execution plans, identify bottlenecks, and apply index design patterns or query rewrites to improve slow query performance.

How do I tune postgresql.conf parameters for memory and autovacuum?

PostgreSQL configuration tuning adjusts memory, WAL, and autovacuum parameters within postgresql.conf to optimize database health, ensuring efficient resource utilization and background maintenance.

Does PostgreSQL performance tuning differ between AWS RDS and GCP Cloud SQL?

PostgreSQL tuning applies cross-provider best practices for AWS RDS, GCP Cloud SQL, and Azure Flexible Server, adapting configuration and replication strategies to each cloud platform's specific parameters.

How do I monitor PostgreSQL health metrics for bloat and replication lag?

PostgreSQL health monitoring detects table bloat, tracks replication lag, and checks vacuum status to troubleshoot performance degradation and maintain database reliability.

What is the best way to design indexes for PostgreSQL query optimization?

PostgreSQL index design applies structured patterns to match query execution plans, reducing sequential scans and accelerating data retrieval for complex query workloads.