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.92) (envelope-from ) id 1j7aOa-00050n-U4 for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 07:49:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7aOZ-0005yH-Mq for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 07:49:15 +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 1j7aOZ-0005wP-De for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2020 07:49:15 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7aOX-0005D9-4t for pgsql-hackers@postgresql.org; Fri, 28 Feb 2020 07:49:15 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0232322233; Fri, 28 Feb 2020 02:49:11 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 28 Feb 2020 02:49:11 -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=XBFTo+qZePC87bY43jxWLD53I6N2TJaTzZ6kkktCj NY=; b=GZn2OLDdnq0/ddfr7yksMF6LYd4eVEp2RS8mt0pe7k36hceiAIZrWicLk J4ApP90B7IPuFRNTwpGrrLamQcHBr4TAA6RMBLznyQdcDreUXjVlmzFjGgmL+4gT 40jCtbNq1zTdvObpgQGccs29JPzH/bofvcoOtd4gdmOlt5RqhF7KiqCCmVp7Lx/d QmqaBU4LBMYsQiV1CchZTN5HtGJaAA6P0Q9B0ZcukTgcRCQhW6EItnrwMn4ZXUU7 EhZqYKvmPLejmm2NdjyqXrpgwlq5qMMVvwUgz7Yz5sQJ6jv+s5oMIsJVIPDSHcrx mod40Z4KKCVXgpj+ZKEo3uI2x29rQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrleejgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtkeertddtfeehnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeelfedrvdegvddrudelgedrudelieenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df2c2c4.dip0.t-ipconnect.de [93.242.194.196]) by mail.messagingengine.com (Postfix) with ESMTPA id D77573060F09; Fri, 28 Feb 2020 02:49:09 -0500 (EST) Subject: Re: Improve handling of parameter differences in physical replication To: Michael Paquier References: <4ad69a4c-cc9b-0dfe-0352-8b1b0cd36c7b@2ndquadrant.com> <27894a76-d498-f3fd-d77f-7c03140fbfe9@oss.nttdata.com> <20200228074547.GE2688@paquier.xyz> Cc: Fujii Masao , pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <5c2e1f12-2775-6e69-c1c8-46c759417b66@2ndquadrant.com> Date: Fri, 28 Feb 2020 08:49:08 +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: <20200228074547.GE2688@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-02-28 08:45, Michael Paquier wrote: > On Thu, Feb 27, 2020 at 02:37:24PM +0100, Peter Eisentraut wrote: >> On 2020-02-27 11:13, Fujii Masao wrote: >>>> Btw., I think the current setup is slightly buggy.  The >> MaxBackends value that is used to size shared memory is computed as >> MaxConnections + autovacuum_max_workers + 1 + max_worker_processes + >> max_wal_senders, but we don't track autovacuum_max_workers in WAL. >>> Maybe this is because autovacuum doesn't work during recovery? >> >> Autovacuum on the primary can use locks or xids, and so it's possible that >> the standby when processing WAL encounters more of those than it has locally >> allocated shared memory to handle. > > Putting aside your patch because that sounds like a separate issue.. > Doesn't this mean that autovacuum_max_workers should be added to the > control file, that we need to record in WAL any updates done to it and > that CheckRequiredParameterValues() is wrong? That would be a direct fix, yes. Perhaps it might be better to track the combined MaxBackends instead, however. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services