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 1j1BGF-0004vI-AJ for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2020 15:46:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j1BGE-0004zX-6f for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2020 15:46:10 +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 1j1BGD-0004zQ-Qf for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2020 15:46:09 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j1BGB-0003ZG-Cj for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2020 15:46:08 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 57A3022513; Mon, 10 Feb 2020 10:46:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 10 Feb 2020 10:46:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=U1rEuUgrkycHHRQB2HrMxgopDI7YI3liBWWyVvGGc wA=; b=GqHOLNPmdaIt73ag/gE9168Ro9gk35PTRMSgRK66xn/84Zc1xA2o/C+u2 LcveCGIhTHk8kKGFzjRVCjvYupVXUXtYSXpI26BqvoeL4rAgnExXCOk9tvkcJwvi Bohf+cIYkmlzairYw0ROmFIGxOaH/1rrx6d8dWItiHEOhkjfdNm5aC8hHX+RCmWq 4ZAwkhDfMCVEWIiZ9FJ42KIStzzQRylytPGoXbKBvCB8q9DKNMLs+ngOeSiAaPzc OdOWpJAnXLyBpPhSCAyJk5WvvNJFXvG0uMQb+GUfS1WNudWTSPhcd6zDot1bfuWl rMdpvy5ohVUKuozVREVQW0IEk0CWQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedugdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefheenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqh hurggurhgrnhhtrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhg pddvnhguqhhurggurhgrnhhtrdgtohhmnecukfhppeelfedrvdegvddrvdehhedrudduvd enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvght vghrrdgvihhsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df2ff70.dip0.t-ipconnect.de [93.242.255.112]) by mail.messagingengine.com (Postfix) with ESMTPA id 12DF530606FB; Mon, 10 Feb 2020 10:46:04 -0500 (EST) Subject: Re: pgsql: walreceiver uses a temporary replication slot by default To: Michael Paquier References: <20200122055510.GH174860@paquier.xyz> Cc: Postgres hackers , Sergei Kornilov , Andres Freund From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 10 Feb 2020 16:46:04 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200122055510.GH174860@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-01-22 06:55, Michael Paquier wrote: > In the thread about switching primary_conninfo to be reloadable, we > 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.anarazel.de The way I understood that discussion was that the issue is having both the startup process and the WAL receiver having possibly inconsistent knowledge about the current configuration. That doesn't apply in this case, because the setting is only used by the WAL receiver. Maybe I misunderstood. > 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. That would be a reasonable fix if we think the above is really an issue. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services