用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-postgresql --skill postgresql-scaling命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | postgresql-scaling |
| description | Scale PostgreSQL - partitioning, connection pooling, high availability |
| version | 3.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 07-postgresql-scaling |
| bond_type | PRIMARY_BOND |
| category | database |
| difficulty | advanced |
| estimated_time | 5h |
Atomic skill for horizontal and vertical scaling
Production-ready patterns for partitioning, connection pooling, and high availability.
parameters:
operation:
type: string
required: true
enum: [partition, pool, replicate, shard]
partition_type:
type: string
enum: [range, list, hash]
CREATE TABLE events (id BIGINT, data JSONB, created_at TIMESTAMPTZ)
PARTITION BY RANGE (created_at);
CREATE TABLE events_2024_q1 PARTITION OF events
FOR VALUES FROM ('2024-01-01') TO ('2024-04-01');
[pgbouncer]
pool_mode = transaction
default_pool_size = 20
max_client_conn = 1000
CREATE ROLE replicator REPLICATION LOGIN PASSWORD ;
pg_create_physical_replication_slot();
SELECT client_addr, pg_size_pretty(pg_wal_lsn_diff(sent_lsn, replay_lsn)) as lag
FROM pg_stat_replication;
| Mode | Use Case |
|---|---|
| session | Long connections |
| transaction | Web apps (recommended) |
| statement | Simple queries |
| Problem | Cause | Solution |
|---|---|---|
| Partition not used | Pruning disabled | SET enable_partition_pruning = on |
| Too many connections | No pooler | Use PgBouncer |
| Replication lag | Slow replica | Check I/O, network |
Skill("postgresql-scaling")