pgconfigurator
pgconfigurator

max_replication_slots

Requires a restarttuned by pgconfiguratorcount (slots)

How many replication slots can exist — slots guarantee WAL retention for consumers.

What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded

What it does

A replication slot makes the primary keep WAL until a specific standby or logical consumer has confirmed it, so a lagging consumer never misses segments. max_replication_slots caps how many such slots exist (covering both physical standbys and logical subscriptions).

How to tune it

Set it to cover your standbys and logical subscriptions with a little headroom. The safety comes with a risk: a slot for a consumer that disappears will retain WAL forever and can fill the disk — monitor pg_replication_slots and drop dead slots.

FAQ

Can a replication slot fill up my disk?
Yes. A slot holds WAL until its consumer confirms it; if the standby/subscriber is gone, WAL accumulates without limit. Monitor slot lag and drop orphaned slots — or use wal_keep_size as a bounded alternative where appropriate.

Related parameters