Type: | integer |
Default: | 10 |
Min: | 0 |
Max: | 262143 |
Context: | postmaster |
Restart: | true |
Since: | 9.4 |
Specifies the maximum number of replication slots (see streaming-replication-slots) that the server can support. The default is 10. This parameter can only be set at server start. Setting it to a lower value than the number of currently existing replication slots will prevent the server from starting. Also, wal_level must be set to replica
or higher to allow replication slots to be used.
Note that this parameter also applies on the subscriber side, but with a different meaning.
Recommendations
Set to twice as many replicas as you ever expect to have.
On StackOverflow
On pgsql-hackers
- Re: pg_upgrade and logical replication
- POC: enable logical decoding when wal_level = 'replica' without a server restart
- Re: Missing LWLock protection in pgstat_reset_replslot()
- Re: Linkify mentions of the primary/subscriber's max_replication_slots
- Re: POC: enable logical decoding when wal_level = 'replica' without a server restart