Re: Restricting maximum keep segments by repslots
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-03-01T09:43:30Z
Lists: pgsql-hackers
On Tue, Feb 28, 2017 at 10:04 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > It would make more sense to just switch max_wal_size from a soft to a > hard limit. The current behavior is not cool with activity spikes. Having a hard limit on WAL size would be nice, but that's a different problem from the one being discussed here. If max_wal_size becomes a hard limit, and a standby with a replication slot dies, then the master eventually starts refusing all writes. I guess that's better than a PANIC, but it's not likely to make users very happy. I think it's entirely reasonable to want a behavior where the master is willing to retain up to X amount of extra WAL for the benefit of some standby, but after that the health of the master takes priority. You can't really get that behavior today. Either you can retain as much WAL as might be necessary through archiving or a slot, or you can retain a fixed amount of WAL whether it's actually needed or not. There's currently no approach that retains min(wal_needed, configured_value). -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Save slot's restart_lsn when invalidated due to size
- 12e52ba5a76e 13.0 landed
- 0188bb82531f 14.0 landed
-
Fix checkpoint signalling
- 1816a1c6ffe4 13.0 landed
-
Check slot->restart_lsn validity in a few more places
- d0abe78d8427 13.0 landed
-
Allow users to limit storage reserved by replication slots
- c6550776394e 13.0 landed
-
Remove header noise from test_decoding test
- 69360b34589b 13.0 landed
-
Rework WAL-reading supporting structs
- 709d003fbd98 13.0 cited
-
Flip argument order in XLogSegNoOffsetToRecPtr
- a22445ff0be2 12.0 cited