postgres-pro
Use when optimizing PostgreSQL queries, configuring replication, or implementing advanced database features. Invoke for EXPLAIN analysis, JSONB operations, extension usage, VACUUM tuning, performance monitoring. Keywords: PostgreSQL, EXPLAIN, replication, JSONB, pg_stat.
Security Assessment
About postgres-pro
The 'postgres-pro' skill is designed for advanced PostgreSQL database optimization and administration. It helps users address performance issues by providing tools for analyzing slow queries, configuring replication strategies, and optimizing database operations. By using this skill, database administrators can ensure that PostgreSQL databases are both high-performing and highly available, implementing best practices for query tuning, replication setup, and maintenance tasks like VACUUM tuning. The skill focuses on enhancing PostgreSQL database performance through in-depth analysis and configuration, making it an essential tool for database professionals managing large, production-grade systems.
Key features of 'postgres-pro' include the ability to optimize queries with EXPLAIN ANALYZE, implement JSONB operations, configure and manage various PostgreSQL extensions, and monitor and maintain the health of PostgreSQL databases. The skill provides guidance for optimizing query performance by creating suitable indexes (B-tree, GIN, GiST, BRIN), setting up and monitoring replication, and performing regular maintenance tasks such as VACUUM and ANALYZE. It also includes support for PostgreSQL extensions like PostGIS, pgvector, and pg_trgm, and facilitates database health checks with tools like pg_stat_statements. Whether managing database replication or tuning complex queries, this skill delivers the tools necessary to manage a PostgreSQL environment efficiently.
This skill is ideal for PostgreSQL database administrators, DevOps engineers, and SREs who are responsible for maintaining the performance and reliability of production PostgreSQL databases. Users of this skill are typically tasked with database performance tuning, replication configuration, and ensuring the overall health of their PostgreSQL systems. It is particularly useful for teams working with large-scale databases where high performance and availability are critical.
FAQ
How do I use this skill to optimize slow queries?
To optimize slow queries, you can use EXPLAIN ANALYZE to analyze the query execution plan. Based on the analysis, you can rewrite inefficient queries, update statistics, and create appropriate indexes such as B-tree, GIN, GiST, or BRIN to improve performance.
Can this skill help with PostgreSQL replication setup?
Yes, this skill can assist in setting up both streaming and logical replication, depending on your requirements. It also provides guidelines for monitoring replication health and addressing any issues related to lag or failover.
What are the limitations of this skill?
This skill emphasizes best practices such as using EXPLAIN ANALYZE and setting up proper replication, but it must not be used to disable autovacuum globally or to create indexes without analyzing query patterns. Additionally, using SELECT * in production queries or skipping necessary maintenance like VACUUM on high-churn tables should be avoided.
Is there any requirement for the PostgreSQL version?
This skill is designed for PostgreSQL versions 12 through 16, which includes support for key features like EXPLAIN ANALYZE, JSONB operations, and the various indexing methods used in PostgreSQL.
Install postgres-pro
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
Jeffallan/claude-skills