aj-geddes avatar

Data Replication Setup

Sets up database replication for high availability and disaster recovery scenarios. Covers PostgreSQL primary-standby configurations, logical replication, and multi-master setups. You'd reach for this when spinning up read replicas, configuring cross-region failover, or building out a disaster recovery strategy. The included reference guides walk through WAL configuration, replication user setup, and monitoring approaches. It's solid foundational work that saves you from piecing together replication configs from scattered documentation, though you'll still need to tune parameters for your specific load and availability requirements.

skills.sh installs
424
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill data-replication-setup --agent claude-code

Installs into .claude/skills of the current project.

Files

Data Replication Setup

Table of Contents

Overview

Configure database replication for disaster recovery, load distribution, and high availability. Covers master-slave, multi-master replication, and monitoring strategies.

When to Use

  • High availability setup
  • Disaster recovery planning
  • Read replica configuration
  • Multi-region replication
  • Replication monitoring and maintenance
  • Failover automation
  • Cross-region backup strategies

Quick Start

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'

Reference Guides

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, DevOps & CI/CD, AI & Agent Building, Databases
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1bobmatnyc avatardigitalocean-overviewbobmatnyc/claude-mpm-skillsDigitalOcean platform overview for account setup, projects, tooling (Control Panel, doctl, API, Terraform), and service selection across compute, storage, datab419skills.sh installs
2hummingbot avatarlp-agenthummingbot/skillsRun automated liquidity provision strategies on concentrated liquidity (CLMM) DEXs using Hummingbot API.417skills.sh installs
3sanjay3290 avatargoogle-slidessanjay3290/ai-skillsRead and write Google Slides presentations - get text, find presentations, create presentations, add slides, replace text, and manage slide content. Use when us416skills.sh installs
4secondsky avatarcloudflare-d1secondsky/claude-skillsCloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1_ERROR, statement too long, too many requests queued errors.416skills.sh installs
5bobmatnyc avatardigitalocean-networkingbobmatnyc/claude-mpm-skillsDigitalOcean networking services including VPC, firewalls, load balancers, reserved IPs, DNS, IPv6, and NAT gateway. Use when designing or securing network conn415skills.sh installs
6pproenca avatarexpo-react-native-coderpproenca/dot-skillsComprehensive Expo React Native feature development guide. This skill should be used when building mobile app screens, navigation, data fetching, authentication415skills.sh installs