← ClaudeAtlas

replication-overviewlisted

Hack or review PostgreSQL replication internals — covers physical streaming, archive shipping, logical decoding, logical replication PUB/SUB, and synchronous-commit machinery. Names walsender / walreceiver / replication slot / output plugin callbacks plus the relevant GUCs (wal_level, max_wal_senders, max_replication_slots, max_logical_replication_workers, primary_conninfo, primary_slot_name, synchronous_standby_names) and the source files behind each flavor. Use whenever a PG patch touches walsender, walreceiver, replication slots, logical decoding, output plugins, publications/subscriptions, conflict detection, sync replication, failover slots, pg_basebackup, or pg_receivewal — or when picking which mechanism fits a feature design. Skip for MySQL row-based / GTID replication, MongoDB replica sets, Cassandra hinted handoff, Kafka MirrorMaker / Confluent Replicator, Debezium / Flink CDC pipelines, AWS DMS, and Galera / Group Replication.
matejformanek/postgres-claude · ★ 0 · API & Backend · score 70
Install: claude install-skill matejformanek/postgres-claude
# Replication — operational orientation For the conceptual model (slot lifetimes, decoding pipeline, conflict semantics) read `knowledge/architecture/replication.md`. ## Which kind of replication? | If the user wants… | Flavor | Key GUCs | |---|---|---| | Hot standby, byte-identical copy, optional read queries | **Physical streaming** | `wal_level=replica`, `max_wal_senders`, `primary_conninfo`, `primary_slot_name` | | Point-in-time recovery from a base backup + WAL archive | **Physical archive (PITR)** | `wal_level=replica`, `archive_mode`, `archive_command`/`archive_library`, `restore_command` | | Stream row-level changes to a non-PG consumer (CDC, audit, custom sink) | **Logical decoding** via SQL or replication-protocol API + an output plugin | `wal_level=logical`, `max_replication_slots`, plugin (e.g. `test_decoding`, `pgoutput`) | | Selective table replication between PG clusters, schema-agnostic upgrade, cross-version | **Logical replication** (`CREATE PUBLICATION` / `CREATE SUBSCRIPTION`) | `wal_level=logical`, `max_replication_slots`, `max_logical_replication_workers`, `max_sync_workers_per_subscription`, `max_parallel_apply_workers_per_subscription` | | Wait-for-ACK durability on commit | **Synchronous replication** (overlay on physical or logical) | `synchronous_standby_names`, `synchronous_commit` | | Standbys keep logical slots in sync for failover | **Slot sync** | `sync_replication_slots`, `synchronized_standby_slots`, slot `failover=true` | [from-comment `