Skip to content
Back to skills

Read Replicas

ASecurity

Postgres read replica strategy: routing, consistency, lag handling, failover, anti-patterns

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 14, 2026
databasesgobashdatabase

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 14, 2026

npx -y skills add SebastianLuser/claude-code-arcane --skill read-replicas --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Read Replicas?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Read Replicas
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sebastianluser-read-replicas/badge)](https://www.skillsdirectory.com/skills/sebastianluser-read-replicas)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: read-replicas
description: "Postgres read replica strategy: routing, consistency, lag handling, failover, anti-patterns"
category: "database"
argument-hint: "[setup|route|audit]"
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, Write, Edit, Task
---
# read-replicas — Postgres Read Replicas

Async copy of primary that only accepts reads. Scales read workloads, isolates analytics, enables cross-region DR.

## When to use

- Read/write ratio >= 10:1
- Heavy analytics/reports impacting OLTP
- Read-only dashboards, listings, search
- HA cross-zone or DR cross-region
- Isolating noisy workloads (CSV exports) from transactional traffic

## When NOT to use

- Small DB with low load — primary is enough
- Strict consistency required — async lag = stale reads
- No evidence of read saturation (doubles cost without benefit)
- Problem is bad indexes / slow queries — **optimize first**, then replicate

---

## Routing decision table

| Case | Target |
|------|--------|
| Writes (INSERT/UPDATE/DELETE) | **primary** |
| Read in same request after a write | **primary** (avoid stale read-your-writes) |
| Read-only endpoints (dashboards, listings) | **replica** |
| Transactions (even read-only BEGIN) | **primary** |
| Analytics / heavy reports | **dedicated analytics replica** |
| `SELECT ... FOR UPDATE / FOR SHARE` | **primary** |
| DDL / migrations | **primary** |

> → Read references/consistency-connection.md for read-after-write strategies, lag monitoring, lag-aware routing, connection pool architecture

> → Read references/ha-dr.md for HA vs read replica comparison and disaster recovery details

> → Read references/anti-patterns-checklist.md for anti-patterns and pre-deployment checklist

Files in this skill

  • SKILL.md1.7 KB
  • references/anti-patterns-checklist.md1.2 KB
  • references/consistency-connection.md1.2 KB
  • references/ha-dr.md498 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.