スキル一覧に戻る
pluginagentmarketplace

postgresql-scaling

by pluginagentmarketplace

PostgreSQL developer roadmap plugin with database patterns and query optimization

1🍴 0📅 2026年1月5日
GitHubで見るManusで実行

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

PostgreSQL Scaling Skill

Atomic skill for horizontal and vertical scaling

Overview

Production-ready patterns for partitioning, connection pooling, and high availability.

Prerequisites

  • PostgreSQL 16+
  • Understanding of replication
  • PgBouncer or Patroni experience

Parameters

parameters:
  operation:
    type: string
    required: true
    enum: [partition, pool, replicate, shard]
  partition_type:
    type: string
    enum: [range, list, hash]

Quick Reference

Range Partitioning

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 Config

[pgbouncer]
pool_mode = transaction
default_pool_size = 20
max_client_conn = 1000

Replication Setup

CREATE ROLE replicator WITH REPLICATION LOGIN PASSWORD 'secret';
SELECT pg_create_physical_replication_slot('replica1');

Monitor Lag

SELECT client_addr, pg_size_pretty(pg_wal_lsn_diff(sent_lsn, replay_lsn)) as lag
FROM pg_stat_replication;

Pool Mode Selection

ModeUse Case
sessionLong connections
transactionWeb apps (recommended)
statementSimple queries

Troubleshooting

ProblemCauseSolution
Partition not usedPruning disabledSET enable_partition_pruning = on
Too many connectionsNo poolerUse PgBouncer
Replication lagSlow replicaCheck I/O, network

Usage

Skill("postgresql-scaling")

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です