PostgreSQL Replication Config Generator
Fill in your primary and standby details and get a complete PostgreSQL replication setup: the postgresql.conf changes, the pg_hba.conf line, the replication role and slot SQL, the pg_basebackup command, and the queries you need to confirm replication is actually working. Covers both streaming (physical) replication and logical replication for PostgreSQL 13 through 18. Everything is generated in your browser — no credentials are sent anywhere.
Parameter names follow PostgreSQL 12 and later, where the old recovery.conf settings live in postgresql.conf and recovery is triggered by a standby.signal file. Always test a failover in staging before you rely on it in production.
Do more than postgresql replication config generator — meet Chat2DB
Chat2DB is an AI-powered SQL client for Windows, macOS and Linux. Write SQL in natural language, format and optimize queries automatically, and manage MySQL, PostgreSQL, Oracle and 20+ other databases in one workspace.
How to use
- Choose streaming or logical replication and your PostgreSQL major version.
- Enter the primary and standby addresses, replication user and slot name.
- Copy each generated block to the matching server, restart PostgreSQL, and run the verification queries.
Frequently asked questions
What is the difference between streaming and logical replication in PostgreSQL?
Streaming (physical) replication ships raw WAL and produces a byte-identical, read-only copy of the whole cluster — ideal for high availability and read replicas. Logical replication decodes WAL into row changes and sends them per table, so the subscriber is a normal writable database that can hold a subset of tables and even run a different major version. Use streaming for failover, logical for selective replication and major-version upgrades.
Do I need a replication slot?
Not strictly for physical replication — wal_keep_size can cover short outages — but a slot is far safer because the primary refuses to recycle WAL the standby has not received yet. The trade-off is that an inactive slot retains WAL forever and can fill the disk, so monitor pg_replication_slots and drop slots you no longer use. Logical replication always uses a slot, created automatically by CREATE SUBSCRIPTION.
Which settings require a PostgreSQL restart?
wal_level, max_wal_senders, max_replication_slots, max_worker_processes and archive_mode are all postmaster-level settings that need a full restart. primary_conninfo, primary_slot_name, synchronous_standby_names, hot_standby_feedback and archive_command only need SELECT pg_reload_conf(). You can inspect a running database's settings — and edit them safely — with an SQL client such as Chat2DB.
