replication-overview

Map PostgreSQL replication source code for walsender, walreceiver, and reorderbuffer logic.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/matejformanek/postgres-claude --skill replication-overview
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: replication-overview
Source: https://github.com/matejformanek/postgres-claude/tree/main/.claude/skills/replication-overview
Command: npx skills add https://github.com/matejformanek/postgres-claude --skill replication-overview

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates ambiguity when designing, debugging, or reviewing PostgreSQL replication architectures by providing a cited, authoritative map of the source code and operational invariants.

Core Features & Use Cases

  • Architectural Guidance: Navigate complex replication flavors including physical streaming, logical decoding, and PUB/SUB logical replication.
  • Diagnostic Support: Quickly identify the source files and GUCs responsible for walsender, walreceiver, and output-plugin behavior.
  • Use Case: When a patch touches replication slots or logical decoding, use this skill to verify the correct callback contracts and ensure the implementation respects slot persistency and WAL recycling constraints.

Quick Start

Use the replication-overview skill to identify the relevant source files and GUCs for configuring logical replication between two PostgreSQL clusters.

Frequently Asked Questions about replication-overview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does PostgreSQL logical replication work internally?

PostgreSQL logical replication uses logical decoding to decode WAL records into a change stream via output plugins and the reorderbuffer. This skill maps the walsender and walreceiver source files governing that pipeline.

How do I configure PostgreSQL physical streaming replication and WAL archiving?

Configuring PostgreSQL physical streaming replication involves setting WAL archiving parameters and managing replication slots via the walsender and walreceiver processes. This skill identifies the relevant GUCs and source files for setting up physical streaming architectures.

What is the difference between logical decoding and physical streaming in PostgreSQL?

Physical streaming replicates block-level WAL changes directly, while logical decoding decodes WAL into row-level changes via output plugins. This skill provides architectural guidance to navigate both replication flavors and their distinct source code paths.

How do I debug PostgreSQL replication slot management and WAL recycling issues?

Debugging replication slot management requires verifying slot persistency invariants and WAL recycling constraints within the walsender logic. Use this skill to pinpoint the exact source files and GUCs responsible for slot behavior and output plugin callbacks.

Do I need to understand PostgreSQL source code to use replication slots effectively?

Understanding source-level callback contracts is necessary to manage replication slots and review logical decoding patches effectively. This skill provides cited documentation of walsender and reorderbuffer logic to ensure implementations respect slot persistency constraints.

Why is my PostgreSQL synchronous commit mechanism not working as expected?

Synchronous commit issues often stem from misconfigured GUCs or incorrect walsender behavior during transaction acknowledgment. This skill facilitates code navigation and architectural review to diagnose the synchronous commit mechanisms in PostgreSQL replication.