Rename wal_keep_segments to wal_keep_size.
Fujii Masao <fujii@postgresql.org>
Rename wal_keep_segments to wal_keep_size. max_slot_wal_keep_size that was added in v13 and wal_keep_segments are the GUC parameters to specify how much WAL files to retain for the standby servers. While max_slot_wal_keep_size accepts the number of bytes of WAL files, wal_keep_segments accepts the number of WAL files. This difference of setting units between those similar parameters could be confusing to users. To alleviate this situation, this commit renames wal_keep_segments to wal_keep_size, and make users specify the WAL size in it instead of the number of WAL files. There was also the idea to rename max_slot_wal_keep_size to max_slot_wal_keep_segments, in the discussion. But we have been moving away from measuring in segments, for example, checkpoint_segments was replaced by max_wal_size. So we concluded to rename wal_keep_segments to wal_keep_size. Back-patch to v13 where max_slot_wal_keep_size was added. Author: Fujii Masao Reviewed-by: Álvaro Herrera, Kyotaro Horiguchi, David Steele Discussion: https://postgr.es/m/574b4ea3-e0f9-b175-ead2-ebea7faea855@oss.nttdata.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +1 −1 |
| doc/src/sgml/config.sgml | modified | +11 −10 |
| doc/src/sgml/high-availability.sgml | modified | +2 −2 |
| doc/src/sgml/ref/pg_basebackup.sgml | modified | +1 −1 |
| doc/src/sgml/wal.sgml | modified | +2 −1 |
| src/backend/access/transam/xlog.c | modified | +18 −12 |
| src/backend/replication/slotfuncs.c | modified | +7 −6 |
| src/backend/utils/misc/guc.c | modified | +6 −5 |
| src/backend/utils/misc/postgresql.conf.sample | modified | +1 −1 |
| src/bin/pg_rewind/t/RewindTest.pm | modified | +2 −2 |
| src/include/access/xlog.h | modified | +2 −2 |
| src/test/recovery/t/019_replslot_limit.pl | modified | +5 −5 |
Documentation touched
Discussion
- max_slot_wal_keep_size and wal_keep_segments 24 messages · 2020-06-30 → 2020-07-28