Agent skill · software engineering · jeremylongshore
managing-database-replication
Process use when you need to work with database scalability.
Why this skill is useful
Adds executable scripts and detailed procedures for setting up and managing database replication across PostgreSQL, MySQL, and MongoDB that are not commonly found in public documentation.
What it needs
Requires mongosh, mysql, psql installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Database Replication Manager Overview Configure and manage database replication topologies for PostgreSQL (streaming replication, logical replication), MySQL (source-replica, group replication), and MongoDB (replica sets). This skill covers primary-replica setup, read scaling through replica routing, failover automation, replication lag monitoring, and conflict resolution for multi-primary configurations. Prerequisites Superuser or replication-role credentials on primary and replica servers Network connectivity between all replication nodes (verify with pgisready or mysqladmin ping) psql, mysql, or mongosh CLI tools installed on all nodes Matching major database versions across all replication nodes Sufficient disk space on replicas (equal to or greater than primary) SSH access to replica servers for initial base backup transfer Instructions 1. Choose the replication topology based on requirements: Single primary + read replicas: Best for read-heavy workloads. All writes go to primary; reads distributed across replicas. Multi-primary (active-active): Best for geographic distribution. Requires conflict resolution. Use PostgreSQL logical replication or MySQL Group Replication. Cascading replication: Replica A replicates from primary, Replica B replicates from Replica A. Reduces primary load for many replicas. 2. For PostgreSQL streaming replication, configure the primary: Set wallevel = replica, maxwalsenders = 10, maxreplicationslots = 10 Create replication user: CREATE ROLE replicator WITH REPLICATION LOGIN PASSWORD 'securepassword' Add replication entry to pghba.conf: host replication replicator replicaip/32 scram-sha-256 Reload configuration: SELECT pgreloadconf() 3. Initialize the replica with a base backup: pgbasebackup -h primaryhost -U replicator -D /var/lib/postgresql/data -Fp -Xs -P -R. The -R flag creates standby.signal and configures primaryconninfo automatically. 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/managing-database-replication--06f27a