PostgreSQL Administration Specialist
Overview
This skill routes PostgreSQL-specific database administration tasks to the dedicated PostgreSQL specialist for InfraForge AI.
Routing Criteria
Route to this skill when:
- PostgreSQL installation, configuration, and tuning
- Database clustering and replication setup
- PostgreSQL-specific performance optimization
- Connection pooling and pgBouncer configuration
- Backup strategies using pg_dump and WAL archiving
- Security configuration (pg_hba.conf, SSL, roles)
- PostgreSQL version upgrades and migrations
- Extensions management (PostGIS, pgvector, etc.)
- Troubleshooting PostgreSQL-specific issues
Capabilities
Installation & Configuration
- PostgreSQL installation on various platforms
- postgresql.conf tuning (memory, connections, parallelism)
- pg_hba.conf security configuration
- SSL/TLS setup for connections
High Availability & Replication
- Streaming replication setup
- PostgreSQL Cluster management (Patroni, Stolon)
- Automatic failover configuration
- Read replicas and load balancing
Backup & Recovery
- pg_dump and pg_dumpall usage
- Point-in-time recovery (PITR)
- WAL archiving and continuous archiving
- pgBackRest configuration
- Disaster recovery planning
Performance Tuning
- Query planning and execution analysis
- Index strategies (B-tree, GiST, GIN, BRIN)
- Autovacuum tuning and maintenance
- Connection pooling with PgBouncer
- Workload-specific tuning
Extensions & Advanced Features
- PostGIS geospatial operations
- Full-text search with pg_trgm
- JSON/JSONB operations
- Window functions and CTEs
- Partitioned tables
- Row-level security (RLS)
Monitoring & Troubleshooting
- pg_stat_statements analysis
- Log analysis and slow query logging
- Lock monitoring and deadlock detection
- Connection and session management
Related Skills
database-infraforge-database-infrastructure - Core database infrastructure
postgres-devforge-advanced-queries - Advanced PostgreSQL queries
Examples
Connection Pooling
-- Check connection usage
SELECT datname, numbackends, xact_commit, xact_rollback
FROM pg_stat_database;
-- pgBouncer statistics
SHOW POOLS;
SHOW STATS;
Performance Analysis
-- Top slow queries
SELECT query, calls, mean_time, total_time
FROM pg_stat_statements
ORDER BY mean_time DESC
LIMIT 10;
-- Index usage analysis
SELECT indexrelname, idx_scan, idx_tup_read, idx_tup_fetch
FROM pg_stat_user_indexes
WHERE idx_scan = 0
ORDER BY pg_relation_size(indexrelid) DESC;
This skill routes to the PostgreSQL specialist agent for database administration tasks.
1---2name: postgres-infraforge-postgresql3description: Routes PostgreSQL administration and management tasks to the PostgreSQL specialist for InfraForge AI.4---56# PostgreSQL Administration Specialist78## Overview9This skill routes PostgreSQL-specific database administration tasks to the dedicated PostgreSQL specialist for InfraForge AI.1011## Routing Criteria1213Route to this skill when:14- PostgreSQL installation, configuration, and tuning15- Database clustering and replication setup16- PostgreSQL-specific performance optimization17- Connection pooling and pgBouncer configuration18- Backup strategies using pg_dump and WAL archiving19- Security configuration (pg_hba.conf, SSL, roles)20- PostgreSQL version upgrades and migrations21- Extensions management (PostGIS, pgvector, etc.)22- Troubleshooting PostgreSQL-specific issues2324## Capabilities2526### Installation & Configuration27- PostgreSQL installation on various platforms28- postgresql.conf tuning (memory, connections, parallelism)29- pg_hba.conf security configuration30- SSL/TLS setup for connections3132### High Availability & Replication33- Streaming replication setup34- PostgreSQL Cluster management (Patroni, Stolon)35- Automatic failover configuration36- Read replicas and load balancing3738### Backup & Recovery39- pg_dump and pg_dumpall usage40- Point-in-time recovery (PITR)41- WAL archiving and continuous archiving42- pgBackRest configuration43- Disaster recovery planning4445### Performance Tuning46- Query planning and execution analysis47- Index strategies (B-tree, GiST, GIN, BRIN)48- Autovacuum tuning and maintenance49- Connection pooling with PgBouncer50- Workload-specific tuning5152### Extensions & Advanced Features53- PostGIS geospatial operations54- Full-text search with pg_trgm55- JSON/JSONB operations56- Window functions and CTEs57- Partitioned tables58- Row-level security (RLS)5960### Monitoring & Troubleshooting61- pg_stat_statements analysis62- Log analysis and slow query logging63- Lock monitoring and deadlock detection64- Connection and session management6566## Related Skills6768- `database-infraforge-database-infrastructure` - Core database infrastructure69- `postgres-devforge-advanced-queries` - Advanced PostgreSQL queries7071## Examples7273### Connection Pooling74```sql75-- Check connection usage76SELECT datname, numbackends, xact_commit, xact_rollback77FROM pg_stat_database;7879-- pgBouncer statistics80SHOW POOLS;81SHOW STATS;82```8384### Performance Analysis85```sql86-- Top slow queries87SELECT query, calls, mean_time, total_time88FROM pg_stat_statements89ORDER BY mean_time DESC90LIMIT 10;9192-- Index usage analysis93SELECT indexrelname, idx_scan, idx_tup_read, idx_tup_fetch94FROM pg_stat_user_indexes95WHERE idx_scan = 096ORDER BY pg_relation_size(indexrelid) DESC;97```9899---100101*This skill routes to the PostgreSQL specialist agent for database administration tasks.*