db-admin
覆盖 PITR、复制与关键健康指标,适合 SRE 与数据库管理员使用。
会建议执行数据库脚本并需要数据库凭据与高权限
提供 PostgreSQL 生产级运维方案:备份、恢复、复制与性能监控。
负责把 PostgreSQL 当生产库打点:做备份/恢复(pg_dump、PITR、WAL)、监控健康(连接数、bloat、cache hit、死元组)、以及设置复制和 PgBouncer 连接池。遇到要做数据库恢复、定期备份、搭复制或诊断性能和维护时会用到。特点是覆盖生产级操作流程和细节(vacuum/autovacuum 调优、WAL 存档与保留策略),适合运维/DBA 场景。
▸ 展开 SKILL.md 英文原文
PostgreSQL database administration — backup/restore (pg_dump, PITR, WAL archiving), health monitoring (connections, bloat, cache hit ratio, dead tuples), connection pooling (PgBouncer), replication (streaming, logical), vacuum/autovacuum tuning, and scheduled backups with retention. Use when user asks to backup a database, restore from backup, monitor database health, set up replication, or perform DBA tasks. Do NOT use for schema design (use db-sculptor), query optimization (use db-sculptor), or migration planning (use db-sculptor).
帮我安装这个 skill:https://raw.githubusercontent.com/EliasOulkadi/shokunin/master/.pack/skills/db-admin/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/EliasOulkadi/shokunin/master/.pack/skills/db-admin/SKILL.md"# Database Administrator PostgreSQL production operations: backup, restore, monitoring, replication, and maintenance. ## Workflow ### Step 1: Run health check ```powershell scripts/monitor-db.ps1 -Database myapp ``` Checks 7 metrics: | Metric | Warning | Fail | |--------|---------|------| | Connection count | > 80% of max | > 95% of max | | Active queries | > 10 | > 20 | | Long-running (>5m) | Any | > 3 | | Cache hit ratio | < 99% | < 95% | | Dead tuple ratio | > 20% | > 40% | | Index usage (unused) | > 5 | > 10 | **If any metric is FAIL**: investigate immediately. See [references/postgres-admin.md](references/postgres-admin.md) for diagnosis and fix procedures. ### Step 2: Backup dat