Re: [HACKERS] Restricting maximum keep segments by repslots
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Bruce Momjian <bruce@momjian.us>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, pgsql-hackers@lists.postgresql.org, thomas.munro@enterprisedb.com, sk@zsrv.org, michael.paquier@gmail.com, peter.eisentraut@2ndquadrant.com
Date: 2018-07-31T19:14:03Z
Lists: pgsql-hackers
On 2018-07-31 15:11:52 -0400, Bruce Momjian wrote: > On Tue, Jun 26, 2018 at 04:26:59PM +0900, Kyotaro HORIGUCHI wrote: > > Hello. This is the reabased version of slot-limit feature. > > > > This patch limits maximum WAL segments to be kept by replication > > slots. Replication slot is useful to avoid desync with replicas > > after temporary disconnection but it is dangerous when some of > > replicas are lost. The WAL space can be exhausted and server can > > PANIC in the worst case. This can prevent the worst case having a > > benefit from replication slots using a new GUC variable > > max_slot_wal_keep_size. > > Have you considered just using a boolean to control if max_wal_size > honors WAL preserved by replication slots, rather than creating the new > GUC max_slot_wal_keep_size? That seems like a bad idea. max_wal_size influences checkpoint scheduling - there's no good reason to conflate that with retention? Greetings, Andres Freund
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