mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Allow users to limit storage reserved by replication slots
Replication slots are useful to retain data that may be needed by a replication system. But experience has shown that allowing them to retain excessive data can lead to the primary failing because of running out of space. This new feature allows the user to configure a maximum amount of space to be reserved using the new option max_slot_wal_keep_size. Slots that overrun that space are invalidated at checkpoint time, enabling the storage to be released. Author: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Reviewed-by: Jehan-Guillaume de Rorthais <jgdr@dalibo.com> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/20170228.122736.123383594.horiguchi.kyotaro@lab.ntt.co.jp
This commit is contained in:
@@ -925,9 +925,11 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
|
||||
<xref linkend="guc-archive-command"/>.
|
||||
However, these methods often result in retaining more WAL segments than
|
||||
required, whereas replication slots retain only the number of segments
|
||||
known to be needed. An advantage of these methods is that they bound
|
||||
the space requirement for <literal>pg_wal</literal>; there is currently no way
|
||||
to do this using replication slots.
|
||||
known to be needed. On the other hand, replication slots can retain so
|
||||
many WAL segments that they fill up the space allocated
|
||||
for <literal>pg_wal</literal>;
|
||||
<xref linkend="guc-max-slot-wal-keep-size"/> limits the size of WAL files
|
||||
retained by replication slots.
|
||||
</para>
|
||||
<para>
|
||||
Similarly, <xref linkend="guc-hot-standby-feedback"/>
|
||||
|
Reference in New Issue
Block a user