max_slot_wal_keep_size
A configuration parameter to limit the amount of storage used by replication slots
max_slot_wal_keep_size
is a configuration parameter to limit the amount of storage used by replication slots.
max_slot_wal_keep_size
was added in PostgreSQL 13.
Default value
The default value for max_slot_wal_keep_size
is: -1
(no limit).
Applying changes
Changes to max_slot_wal_keep_size
can be applied with pg_reload_conf()
, pg_ctl reload
or SIGHUP
.
Details
postgres=# SELECT * FROM pg_settings WHERE name='max_slot_wal_keep_size'; -[ RECORD 1 ]---+------------------------------------------------------------------------ name | max_slot_wal_keep_size setting | -1 unit | MB category | Replication / Sending Servers short_desc | Sets the maximum WAL size that can be reserved by replication slots. extra_desc | Replication slots will be marked as failed, and segments released for | deletion or recycling, if this much space is occupied by WAL on disk. context | sighup vartype | integer source | default min_val | -1 max_val | 2147483647 enumvals | boot_val | -1 reset_val | -1 sourcefile | sourceline | pending_restart | f
Change history
- PostgreSQL 13
- added (commit c6550776)
References
- PostgreSQL documentation: max_slot_wal_keep_size
Useful links
- PostgreSQL 13: Don’t let slots kill your primary - July 2020 blog article by 2ndQuadrant