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 1iu8zH-0005yy-1M for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jan 2020 05:55:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iu8zF-0000EK-QP for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jan 2020 05:55:33 +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 1iu8zE-0000ED-D0 for pgsql-hackers@lists.postgresql.org; Wed, 22 Jan 2020 05:55:33 +0000 Received: from [66.111.4.26] (helo=out2-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iu8z8-0003wZ-Fs for pgsql-hackers@lists.postgresql.org; Wed, 22 Jan 2020 05:55:32 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C300321F32; Wed, 22 Jan 2020 00:55:14 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 22 Jan 2020 00:55:14 -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=fm3; bh=EstpQnCqv+8GUR6Br+YemcUnrS3 qy6PxKAwOQx4Og2c=; b=l4YInhvCKw+i7X5rGYKoubNoOFx0Z4XG8fgAAnqBBRK ow7j5cWWz8tKG6YF9vjDCRdOYKREuPSX5J5Ng5k0jWtnhmboKt4ov5t78gLa+nxl 1HE3H9iic8Hh2tG0LQiPHo/98SC3NvWIrOFbtTxuyv2hqAD1PcJug3KXMTh8DG7k NdpKJphkfLim3nW+UDRgsBjUPFXYLs7S356z/iXbaqMPFV64zDLFT8K927t5tCuV f/dh9+CY10/MQ8HCL642E7XVUkEHSgp/tYiWItYcndsm//yoc1yv0hIQDHp4j7iC LA1M4wvCy95F2ZrKAPrSctZwE/H0sXi9SrKOXFiweKQ== 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=fm1; bh=EstpQn Cqv+8GUR6Br+YemcUnrS3qy6PxKAwOQx4Og2c=; b=hPmM/64t6IxzTRQRCp2WpO icv1KY7S/9hQ4AWV28sYUqnpmP4O9dAO3NMYRtN+wJUyfssY+ns8YH4ZcnGK+vRp fIaM9fMY8rS4OktysDxqJcdgu3c6HcG6jTf4rFI6/uxIZVjrkBYrTBG9QebKkoOB uYVMcCRRZCLxa6gCQBujsdAO8D7U7ZWOlM00Uibui7TFHyBS1nBO6HxrKvXP+bY9 C+THmsyNSdJnIjjYqWxGtw5/uth3lhpPsEWpo4tr3WwgZSmKxegYA2p8WORDhUQL b/c43b3Ydyo3KbinNsMkumebK5jkuQI5KwLukuW/F8AKn4aQOqWoqWp11EGSsD0w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudelgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfk phepudduuddruddtvddrudektddrudekheenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii 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 F40B93060CBE; Wed, 22 Jan 2020 00:55:12 -0500 (EST) Date: Wed, 22 Jan 2020 14:55:10 +0900 From: Michael Paquier To: Peter Eisentraut Cc: Postgres hackers , Sergei Kornilov , Andres Freund Subject: Re: pgsql: walreceiver uses a temporary replication slot by default Message-ID: <20200122055510.GH174860@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="OgApRN/oydYDdnYz" Content-Disposition: inline In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.26 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --OgApRN/oydYDdnYz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Peter, (Adding Andres and Sergei in CC.) On Tue, Jan 14, 2020 at 01:57:34PM +0000, Peter Eisentraut wrote: > walreceiver uses a temporary replication slot by default >=20 > If no permanent replication slot is configured using > primary_slot_name, the walreceiver now creates and uses a temporary > replication slot. A new setting wal_receiver_create_temp_slot can be > used to disable this behavior, for example, if the remote instance is > out of replication slots. A recent message from Seigei Kornilov has attracted my attention to this commit: https://www.postgresql.org/message-id/370331579618998@vla3-6a5326aeb4ee.qlo= ud-c.yandex.net In the thread about switching primary_conninfo to be reloadable, we=20 have argued at great lengths that we should never have the WAL receiver fetch by itself the GUC parameters used for the connection with its primary. Here is the main area of the discussion: https://www.postgresql.org/message-id/20190217192720.qphwrraj66rht5lj@alap3= =2Eanarazel.de The previous thread was long enough so it can easily be missed. However, it seems to me that we may need to revisit a couple of things for this commit? In short, the following things: - wal_receiver_create_temp_slot should be made PGC_POSTMASTER, similarly to primary_slot_name and primary_conninfo. - WalReceiverMain() should not load the parameter from the GUC context by itself. - RequestXLogStreaming(), called by the startup process, should be in charge of defining if a temp slot should be used or not. -- Michael --OgApRN/oydYDdnYz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4n474ACgkQnvQgOdby QH0U8w//Zqy31cS+toOLKk2RJosWFBoL+7Lepd53MzuQvcVDzTwOwljqg+q+ZgKm ljRPNXAA9sTDhJEWafQvBXU2ttQEJF3YNo04oOzXhrOFhZUjCubSaSPZ1w27/5Od Um7AxHjRfK2DE0bdEwqVQ3iJocPLcIjIVKVHuppj+3wtkZpGfOxdb7SxP+IMHNKH EzgQoO0UILu7hRtvAzM7Q9B5sQz1LcbsaszqzvSAmbxDhB1r+ix4ZD8DRx8tBZrM MrnerXoLpq4L8rRqAVvo1JWL5z0+eSZEOW5QjYej0P5yBD/b6VUgSI2Vg5O0c9P0 nhnIhVUOMGg763yzrkbvB6ebtj1wJlTYDl/2hTAgeKtpZ/por/l3Xwhwc42q/rcu 1rJOVPNFK9+B/y0bO6B0d1649raDz6+yVIxjD/KL/OueW9z0pdnBhvFrsGo55cVC m4MP5dAiL1TxDUP55WfFebXSGz1zgOVFvCclaDMX4iGt0aH1IeWI6lhQ/VryE1g1 tGnZGjcyejWIliSemlymc2kwyfMt3kMm6KbvK4uJy9PTwrVIRKOFqpjrelUmUQUm sRvdfQ+75Dy/DTKri4AMu2tljvwRsOldIodL6FAlkHSztObyIWWbrqATR9o0iCAp yf0qik4Lt3ce1i4S2RwUd5unLwneemdrsLxV2kWYhSG3fbIalyg= =Ic4G -----END PGP SIGNATURE----- --OgApRN/oydYDdnYz--