How can I improve a WAL Replication Slot?
Connector: PostgreSQL using Logical Replication (WAL)
Parameters are set per database cluster and hence tuning this to support consistent and reliable WAL replication.
- max_wal_size: Default is set to 1 Gb. Set
max_wal_sizeto high enough to be rarely reached.
- checkpoint_timeout: Default is set to 5 minutes. Set
- max_wal_sender: Default is set to 10. Ideally set
max_wal_senderto 3 * Numbers of WAL connectors.
- wal_buffer : Default is set to 16MB. Ideally set
wal_bufferto 64MB - higher value is recommended when there are many concurrent connection to the database.
- Replication Slot struggle with processing logs either inflated or logs not being cleared.
- WAL Stuck.
- WAL Performance is low.