postgres-best-practices

Identify and apply PostgreSQL performance best practices for queries, schemas, and configurations.

6|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/ChrstprJohn/SamsonDentalCenter --skill postgres-best-practices-chrstprjohn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-best-practices
Source: https://github.com/ChrstprJohn/SamsonDentalCenter/tree/main/.agent/skills/postgres-best-practices
Command: npx skills add https://github.com/ChrstprJohn/SamsonDentalCenter --skill postgres-best-practices-chrstprjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Postgres performance and reliability can degrade when queries, schemas, and configurations are not optimized. This skill collates Supabase-driven best practices to help teams improve query speed, referential integrity, maintenance, and scalability across Postgres deployments.

Core Features & Use Cases

  • Provides structured guidance across Query Performance, Connection Management, Security & RLS, Schema Design, Concurrency & Locking, Data Access Patterns, Monitoring & Diagnostics, and Advanced Features.
  • Helps identify common bottlenecks such as missing indexes, inappropriate index types, suboptimal partitioning, inefficient pagination, stalled statistics, and misconfigured connection pools, enabling precise, automated improvements.
  • Use cases include accelerating large analytics workloads, securing multi-tenant databases, tuning maintenance workflows, and preparing scalable schemas for growth.

Quick Start

Run a quick Postgres health check by surveying your indexes, statistics, and RLS policies; implement the top three optimizations recommended for your setup.

Frequently Asked Questions about postgres-best-practices

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

FAQPage Schema
How do I optimize Postgres query performance for slow analytics workloads?

Optimize Postgres query performance by identifying missing indexes, correcting inappropriate index types, and resolving suboptimal partitioning. This skill analyzes your schema and query workloads to recommend precise automated improvements for accelerating analytics.

What is the best way to manage Postgres connection pooling and prevent bottlenecks?

Manage Postgres connection pooling by surveying your operational environment to identify misconfigured pools. This skill provides structured guidance on connection management to resolve bottlenecks and improve database reliability under concurrent workloads.

How do I secure multi-tenant databases using Postgres Row Level Security policies?

Secure multi-tenant databases using Postgres Row Level Security (RLS) policies by applying structured security best practices. This skill evaluates your data access patterns and RLS configurations to ensure proper isolation and referential integrity across tenants.

When do I need table partitioning in Postgres to prepare schemas for scalable growth?

You need table partitioning in Postgres when preparing scalable schemas for growth and large datasets. This skill evaluates your schema design and data access patterns to determine if partitioning is appropriate for improving maintenance and query speed.

Why does Postgres vacuum stall and how can I tune maintenance workflows?

Postgres vacuum stalls when maintenance workflows are misconfigured or statistics are outdated. This skill offers monitoring and diagnostics guidance to tune maintenance operations, ensuring statistics are updated and database performance remains stable.

Can I run a quick Postgres health check on my existing indexes and statistics?

You can run a quick Postgres health check by surveying your existing indexes, statistics, and RLS policies. This skill requires access to your database schema and operational environment to tailor recommendations and implement the top three optimizations.