Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVyt8-00075L-Eq for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Mar 2022 16:58:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nVyt6-00049l-QX for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Mar 2022 16:58:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVyt6-00049b-HX for pgsql-hackers@lists.postgresql.org; Sun, 20 Mar 2022 16:58:40 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVyt0-0001vX-3W for pgsql-hackers@lists.postgresql.org; Sun, 20 Mar 2022 16:58:39 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 90B9E5C00CC; Sun, 20 Mar 2022 12:58:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 20 Mar 2022 12:58:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=QhO8ZcqMpcNV4LzVi2OrihRaRwM6W7GAvTzCbm Rh2To=; b=xP2VY0T4Xbgh7WVYFwO0Z83fJ/Gg18SSGHFVr8cdpDZNBrtTggiXgI aLLKOcySg5SGkWPs7dMPf3unZRvMWdvRQJElUw0CwUeH179kZke7gQdOIifkqVFq 5SZsLaiOYmlA0q/0dgNwOqAvRyEY0l8zUjc/inbc0m5DlyCOcSjwlUXhbE2qxK1R X6Hlr8hN2AEWbWQI2SGcFHgVDiW0jIplQH1I/xzOv7nvMACQqFU9+ycT5MimWl2s jSN46eT7/MttZz+koKyWLMyWugrvc9qKJyljXh3jOO600m0RXZQZGfVRXj0SlOGu /bCEoY9yGZ9vCfheH5zVZgYwR1U1zPbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=QhO8ZcqMpcNV4LzVi 2OrihRaRwM6W7GAvTzCbmRh2To=; b=WQ+0QMBIknSLLr0wwsiTjkgBEh+Tc9Vcu gqPR9oWa+ixYAQ40pAGgScR4AtplIq+ic4XEGixOyxDEC5fmz4j6WCfNY56tcABu 7H+NeNYmxDyejUBGYTYnYKzXmhTLCbReGBUvHTuZfrcjt7wfZBER7HOUBKMJXVPv SWB1k5+jzcoSuvX6+WLB9ypY5MYMuglbvCLpHPH2IWJXSEu3l6f6O0rGCrmQE1Sx lFQYv/lQfJsjYV58K4lys1YYEUrGf+PdWVW/uhSe5lH2y3cdW02AcZ0oFnZ6VV30 p8KaqA5cnY4eY/3AEslt+m5ZKYtsy8tCvoFg4YGO7KtPQsrlWTS6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeguddgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffvuffkfhggtggujgfhsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpeekleehgeeuvdfhffeggeekgfetueeuleffvddvtdeiveegjeekjefgkeet vedvtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Mar 2022 12:58:32 -0400 (EDT) Date: Sun, 20 Mar 2022 09:58:31 -0700 To: Melanie Plageman Cc: Kyotaro Horiguchi , Ibrar Ahmed , masao.fujii@oss.nttdata.com, gkokolatos@protonmail.com, PostgreSQL Hackers Subject: Re: shared-memory based stats collector - v66 Message-ID: <20220320165831.msddvqz2nfrptyps@alap3.anarazel.de> [IFrom: Andres Freund References: <20210721.170949.572695811364264016.horikyota.ntt@gmail.com> <20210721155802.6bhjy3oe7feapgwa@alap3.anarazel.de> <20210726.175201.1255224992745035759.horikyota.ntt@gmail.com> <20210727012754.dmd5feciccnkd6g2@alap3.anarazel.de> <20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de> <20220317073652.kz3uuh6le6vbfod4@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: From: Andres Freund List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-03-20 12:32:39 -0400, Melanie Plageman wrote: > Attached is a TAP test to check that stats are cleaned up on a physical > replica after the objects they concern are dropped on the primary. Thanks! > I'm not sure that the extra force next flush on standby is needed after > drop on primary since drop should report stats and I wait for catchup. A drop doesn't force stats in other sessions to be flushed immediately, so unless I misunderstand, yes, it's needed. > Also, I don't think the tests with DROP SCHEMA actually exercise another > code path, so it might be worth cutting those. > +/* > + * Checks for presence of stats for object with provided object oid of kind > + * specified in the type string in database of provided database oid. > + * > + * For subscription stats, only the objoid will be used. For database stats, > + * only the dboid will be used. The value passed in for the unused parameter is > + * discarded. > + * TODO: should it be 'pg_stat_stats_present' instead of 'pg_stat_stats_exist'? > + */ > +Datum > +pg_stat_stats_exist(PG_FUNCTION_ARGS) Should we revoke stats for this one from PUBLIC (similar to the reset functions)? > +# Set track_functions to all on standby > +$node_standby->append_conf('postgresql.conf', "track_functions = 'all'"); That should already be set, cloning from the primary includes the configuration from that point in time. > +$node_standby->restart; FWIW, it'd also only require a reload.... Greetings, Andres Freund