data-replication-setup by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill data-replication-setup配置数据库复制以实现灾难恢复、负载分配和高可用性。涵盖主从复制、多主复制以及监控策略。
PostgreSQL - 配置主服务器:
-- On primary server: postgresql.conf
-- wal_level = replica
-- max_wal_senders = 10
-- wal_keep_size = 1GB
-- Create replication user
CREATE ROLE replication_user WITH REPLICATION ENCRYPTED PASSWORD 'secure_password';
-- Allow replication connections: pg_hba.conf
-- host replication replication_user standby_ip/32 md5
-- Enable WAL archiving for continuous backup
-- archive_mode = on
-- archive_command = 'test ! -f /archive/%f && cp %p /archive/%f'
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
每周安装数
104
仓库
GitHub 星标数
126
首次出现
2026年1月21日
安全审计
已安装于
opencode87
gemini-cli86
codex82
claude-code82
cursor80
github-copilot70
Configure database replication for disaster recovery, load distribution, and high availability. Covers master-slave, multi-master replication, and monitoring strategies.
PostgreSQL - Configure Primary Server:
-- On primary server: postgresql.conf
-- wal_level = replica
-- max_wal_senders = 10
-- wal_keep_size = 1GB
-- Create replication user
CREATE ROLE replication_user WITH REPLICATION ENCRYPTED PASSWORD 'secure_password';
-- Allow replication connections: pg_hba.conf
-- host replication replication_user standby_ip/32 md5
-- Enable WAL archiving for continuous backup
-- archive_mode = on
-- archive_command = 'test ! -f /archive/%f && cp %p /archive/%f'
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Master-Slave (Primary-Standby) Setup | Master-Slave (Primary-Standby) Setup |
| Logical Replication | Logical Replication |
| Master-Slave Setup | Master-Slave Setup |
Weekly Installs
104
Repository
GitHub Stars
126
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykFail
Installed on
opencode87
gemini-cli86
codex82
claude-code82
cursor80
github-copilot70
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
94,100 周安装
应用程序性能优化全栈指南:从分析、数据库到前端与CDN的端到端优化
220 周安装
Encore API 端点开发指南:TypeScript API 创建与配置教程
222 周安装
学术论文LaTeX模板库:Nature/Science/IEEE期刊会议海报申请书模板
218 周安装
安全套件 (security-suite) - 二进制与仓库安全测试、行为契约分析与CI门控工具
223 周安装
tldraw SDK 文档编写指南 - 技术文档规范与MDX组件使用教程
221 周安装
TanStack Query (React Query) 教程:React 异步状态管理与数据获取库
222 周安装