From: Stephen Frost <sfrost@snowman.net>
To: Andres Freund <andres@anarazel.de>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: pgsql-hackers@lists.postgresql.org
Cc: thomas.munro@enterprisedb.com
Cc: sk@zsrv.org
Cc: michael.paquier@gmail.com
Cc: peter.eisentraut@2ndquadrant.com
Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
Date: Tue, 31 Jul 2018 15:21:27 -0400
Message-ID: <20180731192127.GF27724@tamriel.snowman.net> (raw)
In-Reply-To: <20180731191403.satjiy4i3ce3voqs@alap3.anarazel.de>
References: <20180129.192634.217484965.horiguchi.kyotaro@lab.ntt.co.jp>
<20180129.194023.228030941.horiguchi.kyotaro@lab.ntt.co.jp>
<20180319.170948.139803971.horiguchi.kyotaro@lab.ntt.co.jp>
<20180626.162659.223208514.horiguchi.kyotaro@lab.ntt.co.jp>
<20180731191152.GA2791@momjian.us>
<20180731191403.satjiy4i3ce3voqs@alap3.anarazel.de>
Greetings,
* Andres Freund (andres@anarazel.de) wrote:
> 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?
I agree that we shouldn't conflate checkpointing and retention. What I
wonder about though is what value will wal_keep_segments have once this
new GUC exists..? I wonder if we could deprecate it... I wish we had
implemented repliation slots from the start with wal_keep_segments
capping the max WAL retained but that ship has sailed and changing it
now would break existing configurations.
Thanks!
Stephen
Attachments:
[application/pgp-signature] signature.asc (818B, ../20180731192127.GF27724@tamriel.snowman.net/2-signature.asc)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: sfrost@snowman.net, andres@anarazel.de, bruce@momjian.us, 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
Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
In-Reply-To: <20180731192127.GF27724@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox