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 1j29Ei-0007Lv-UK for pgsql-committers@arkaria.postgresql.org; Thu, 13 Feb 2020 07:48:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j29Eg-00037F-Oc for pgsql-committers@arkaria.postgresql.org; Thu, 13 Feb 2020 07:48:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j29Eg-00032c-DX for pgsql-committers@lists.postgresql.org; Thu, 13 Feb 2020 07:48:34 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j29Ed-00005d-T8 for pgsql-committers@lists.postgresql.org; Thu, 13 Feb 2020 07:48:33 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1BEF221B2C; Thu, 13 Feb 2020 02:48:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 13 Feb 2020 02:48:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=9UVp5UniAjwQoBK13t6g8UU2p/l BByDTkWEJsq8ue04=; b=cbRkHVL3x/io2EioeFCRTnpPLv2b9WKI0MhGdYrHE0W LSsfvBQWJBBEV3V7cZfNwVKJV2Y2gB+9UCUjwSUTibXb2jhQP8Sa9R7xbUyIPjjW j4Sj5e4qXmJQfQGZHQtlYfzFo0fKneIswSnHiZARseBTIEYj+sqr3hi/oNKReZCh ZaLFpW/XqHd8q6TZRIG60OiEEccdfSHWrVzMlvNK48O2MCti46SNtFV853fdGn7N oJns06kbBT+H4jzBRcE/O+hMNb8HHzlk/8sEjteEqM/gQe/9T1Es28EPrK6IMV76 SUhuSAzQJYXOHcOeXL/8CbyhxSTsCksH6EI7evEI3Ow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=9UVp5U niAjwQoBK13t6g8UU2p/lBByDTkWEJsq8ue04=; b=ADDM6GkLV6ELfrwebs5EvG IR3F6e+QY9ZQ6qrO5MDTgAUicKgsiO9ud3GNYBrViiCfpEtQgCcPX/6OgaFunaHi muoNlVUQxlckvArcz49pMDyL46brII8CGYEzuNChrFtuBNL9cGdBoCSCdvAbXdek NRf8ZHVnurZ0ZyVk3NhMvG1pWEC1OCQu05UBHe7OPH4nax1YhM31ArKKWLpludD1 MnfeEv7M/AWhdgeeT2t/XngR0ZVwM+Ik1N+HNuoEJoDnXh2RuLevvhh1Tzvbzi2T VTKNyT9i6bkqW0zvjK1qoWicYD8S9Un5pcMM3isDLa28KbHsCtSy0lOUisSjF67g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrieejgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecu kfhppeduuddurddutddvrddukedtrddukeehnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id D76203280063; Thu, 13 Feb 2020 02:48:26 -0500 (EST) Date: Thu, 13 Feb 2020 16:48:21 +0900 From: Michael Paquier To: Fujii Masao Cc: Jehan-Guillaume de Rorthais , Peter Eisentraut , Robert Haas , pgsql-committers Subject: Re: pgsql: walreceiver uses a temporary replication slot by default Message-ID: <20200213074821.GJ1520@paquier.xyz> References: <739e2a5e-56d0-2a12-03ca-2c02631b1699@2ndquadrant.com> <20200211235326.412e3fe2@firost> <8121ab86-6267-1652-20d1-ebede28048a9@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d6iqOn7HZPWKXx18" Content-Disposition: inline In-Reply-To: <8121ab86-6267-1652-20d1-ebede28048a9@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --d6iqOn7HZPWKXx18 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > +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. >>=20 >> So the default behavior might not be desirable and maybe >> wal_receiver_create_temp_slot might be off by default? >>=20 >> Note that Kyotaro HORIGUCHI is working on a patch to restricting maximum= keep >> segments by repslots: >>=20 >> https://www.postgresql.org/message-id/flat/20190627162256.4f4872b8%40fir= ost#6cba1177f766e7ffa5237789e748da38 >=20 > 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 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).=20 =46rom 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 -- Michael --d6iqOn7HZPWKXx18 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl5E/0UACgkQnvQgOdby QH3rZg//bqtyY0NX8YnE+FIpK1L35hdnmZ9pBPatXL6Na69ELRigEU3EtMOGrjdk lcK3ZHDkRIZ7kDElwWA0ZyoVMOS2zzYn5X8wdt5SY/H1hdK0FhiC/Krys9KPtD// Di+1qoMRZ04Pg0RvXvs1tPxji6+sSifBOH49qoxOX7yy9VraQvVaMaxSZQRwRGWo BWAl4QftK+3zL8wg/1RwF23QloJLDSn8LtD4RBfo5P2rnkYmT34KJWLCIJB53Cc7 eNaUm/hTuSUjLG3W2lHsQzmK3svF9jKVa75+Zz0FKYi+VtJpgjCiHDEJiZeTcCs1 I8SQF09xVaE9wzEAOJePHqsX6YS3rlGA1nRWamAZvW9sILO38VO7PtSLV45Hihl+ DEuJZChpkv/qQcwwsowNU80WOnL4W68Db6CYNLfbaOtjg2UR79oLkOie+JfZToul dQhknopjbI7tiTFa9mnNuEhORkbHLS28e0thQ5CTIOhN0qEJFuf+4R438BoR16Dq R/wn/z28IGwUqdS8/8v1M15JGbHRVaBINP6/HGjZgjJriVpDkWGHTjxb2+S7Umra xrCExwzxYbDZeF0vg4BHZ6nuwwTQvC8eAP+WCPx0P+KJhlD0YZeXkJZQbYVFYrf+ dBRGE8asyEnVC6Wnfb3Ytnvbyws/kDneGD/LGn5KMruz2cDI+48= =xzjK -----END PGP SIGNATURE----- --d6iqOn7HZPWKXx18--