Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j2WNf-00084b-9R for pgsql-committers@arkaria.postgresql.org; Fri, 14 Feb 2020 08:31:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j2WNd-0006S4-U3 for pgsql-committers@arkaria.postgresql.org; Fri, 14 Feb 2020 08:31:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j2WNd-0006Rx-KT for pgsql-committers@lists.postgresql.org; Fri, 14 Feb 2020 08:31:21 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j2WNa-0006qe-HC for pgsql-committers@lists.postgresql.org; Fri, 14 Feb 2020 08:31:21 +0000 Received: by mail-pg1-x542.google.com with SMTP id 70so4574506pgf.8 for ; Fri, 14 Feb 2020 00:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=B++NfpzXnn+ILsiQi7B8kkK2JtBuqmFN/sJcFy6jet4=; b=VwvjvvrVBpRfT+vp/zv/vAQjTJIaAiPnNhNL43LGOqCspAHgswRtNobRGz7SqEIqJ8 hKwFjGRTyLVJHQ0b3noeNGFaigpyvdDtyLgCP2Xe9LMga48Qyd8mlEtvbjqzZ2S+jQkD kJT4gqSQh1idEdXpNSaevOsd/iUkyYtrwvAVLLhJxfxn2EvkO27V1ppmo4bEFVywy0IK ux7NAiw6eqDpnnNqjWD/hF1anz9WlwF1+R48G7zbUt1D7SJftDP1XhmlTslq/8L7V9BA Oxi90OGmgt+y0lopf0KPqf5vw+TIPD/64vBYl3z0WE5MbfhMs6EgDk2kH47UsR+0h/gC 3Lbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=B++NfpzXnn+ILsiQi7B8kkK2JtBuqmFN/sJcFy6jet4=; b=cM2RCF/GA1fshmuNPtEMYpnbBolyqaLLqstqYdE4b2y6ByUHRraswioXgx10c64veC lnfSiNKSTgSZ71HjZZiXDboJHVBNrdHA5cQj2qb2GL50nfPsD6fNBbHo4TDxVU1jfMf+ OZqrselLFvWUuiXnoxcrGXQi/bT+WUDEqoaBqyWrnZmR15MXCXj6vN+g/5TX6bpJ4lit GvQ6jGZNVSxkPZfSfeilMX7YoiMjEf9DRON8x9IphEBNWAINjriRp+Ieg6szWW1KEELO LYKX9wrQDchyeL+Lg8ighTRfjrNA5/L7aT96cYgaOAZryeGEF5VYY8lUq5JUf9JZGXcy cK0w== X-Gm-Message-State: APjAAAXZX/VkKhxljMm/4yfcuFL9PNJnCBeeLgMlw2HXDJ4PxNxvRYS1 4DGlV6OZ7oP9zG8eR3a5q9g= X-Google-Smtp-Source: APXvYqz+SRmvGHCHCGNuNA0yT0PzhWwEjl73o9mQPsLqat2ecCdq4vqlCvp2q/vD22aYA+UY5cvBDg== X-Received: by 2002:a63:c144:: with SMTP id p4mr2235956pgi.226.1581669076349; Fri, 14 Feb 2020 00:31:16 -0800 (PST) Received: from localhost (w196209.dynamic.ppp.asahi-net.or.jp. [121.1.196.209]) by smtp.gmail.com with ESMTPSA id z29sm6155603pgc.21.2020.02.14.00.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2020 00:31:15 -0800 (PST) Date: Fri, 14 Feb 2020 17:29:54 +0900 (JST) Message-Id: <20200214.172954.755137825293856536.horikyota.ntt@gmail.com> To: michael@paquier.xyz Cc: masao.fujii@oss.nttdata.com, jgdr@dalibo.com, peter.eisentraut@2ndquadrant.com, robertmhaas@gmail.com, pgsql-committers@lists.postgresql.org Subject: Re: pgsql: walreceiver uses a temporary replication slot by default From: Kyotaro Horiguchi In-Reply-To: <20200213074821.GJ1520@paquier.xyz> References: <20200211235326.412e3fe2@firost> <8121ab86-6267-1652-20d1-ebede28048a9@oss.nttdata.com> <20200213074821.GJ1520@paquier.xyz> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk At Thu, 13 Feb 2020 16:48:21 +0900, Michael Paquier wrote in > On Wed, Feb 12, 2020 at 06:11:06PM +0900, Fujii Masao wrote: > > On 2020/02/12 7:53, Jehan-Guillaume de Rorthais wrote: > >> In my humble opinion, I prefer the previous behavior, streaming without > >> temporary slot, for one reason: primary availability. > > > > +1 > > > >> With temp slot created by default, if one standby lag far behind, it can make > >> the primary unavailable. We have nothing yet to forbid a slot to fill the > >> pg_wal partition. How new users creating their first cluster would react in such > >> situation? I suppose the original discussion was mostly targeting them? > >> Recovering from this is way more scary than building a standby. > >> > >> So the default behavior might not be desirable and maybe > >> wal_receiver_create_temp_slot might be off by default? > >> > >> Note that Kyotaro HORIGUCHI is working on a patch to restricting maximum keep > >> segments by repslots: > >> > >> https://www.postgresql.org/message-id/flat/20190627162256.4f4872b8%40firost#6cba1177f766e7ffa5237789e748da38 > > > > Yeah, I think it's better to disable this option until something like > > Horiguchi-san's proposal will have been committed, i.e., until > > the upper limit on the number (or size) of WAL files that remain > > for slots become configurable. > > Even with that, are we sure this extra feature would be a reason > sufficient to change the default value of this option to be enabled? I think the feature (slot limit) is not going to be an reason to enable it (tmp slot). In the first place I think we cannot determine the default value generally workable.. > I am not sure about that either. My opinion is that this option is > useful to have and that it is not really a problem if you have slot > monitoring on the primary (or a standby for cascading). And I'd like > to believe that it is a common practice lately for base backups, > archivers based on pg_receivewal or even logical decoding, but it > could be surprising for some users who do not do that yet. So > Jehan-Guillaume's arguments sound also sensible to me (he also > maintains an automatic failover solution called PAF). > > From what I can see nobody really likes the current state of things > for this option, and that does not come down only to its default > value. The default GUC value and the way the parameter is loaded by > the WAL sender are problematic, still easy enough to fix. How do we > move on from here? I could post a patch based on what Sergei Kornilov > has sent around [1], but that's Peter's feature. Any opinions? > > [1]: https://www.postgresql.org/message-id/20200122055510.GH174860@paquier.xyz regards. -- Kyotaro Horiguchi NTT Open Source Software Center