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 1oECCi-0002io-V6 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jul 2022 16:05:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oECCg-0007G1-PP for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jul 2022 16:05:38 +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 1oECCe-00079k-Qp for pgsql-hackers@lists.postgresql.org; Wed, 20 Jul 2022 16:05:38 +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 1oECCb-0007VA-ND for pgsql-hackers@lists.postgresql.org; Wed, 20 Jul 2022 16:05:35 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A51275C017E; Wed, 20 Jul 2022 12:05:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 20 Jul 2022 12:05:31 -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=fm3; t=1658333131; x=1658419531; bh=QgxjXtSm2R P1zqXG4lGND4CCV8OElhNuUPI6ZdFZV8s=; b=e048wYHzH/9glXce0K5LOrPfmA b4pJQVUgCsLBwDyummiveAhnllmuleQCmPX1NAlg/zuFUPsjNAQWrcnLKlNlmLal hUx7FQyFCIjOSifpIRBia7sTtQifTY1vxO9tsCYXv/E9cPhIJr+Nfbxm9+MALYAS TDSMN5vBTSO4XkSrBWTti6Z+uY7uLKQQPSD4bq0d2dULrdBzCG+ajFCm7AtZ1bOv muuQZCa2KrSr7XSO30nwWZkNkx5r9DwGexrB+yNaVD1Ay1KOhKp2JwDOzkPOPLhQ 5crd/9G7zKcMfWFtiPjKTIHwpy7SAkgtNKxj+UrYNgfazeq41ctC6WgGb05Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id: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; t=1658333131; x=1658419531; bh=QgxjXtSm2RP1zqXG4lGND4CCV8OE lhNuUPI6ZdFZV8s=; b=Y+iflVVRlZie7EPQCmGk0nYsp3j5iCAJdn3X2dfZogcf bQV20qN0u0Sy/364/vCLtEe/Os7CDyr9zE4VKe/bnsQn4agSB0aAh/LrfUPXehWL MXpXqqsVQqhcpuJ9F1ar/nlN+y2Qw/lCBOkxBFWPL2FMkkxdge+JdgdHmI9+I3EE DyYi3QL5cZ3g115s/80HbQw8YgT7I1ZMNflj6c7t/AcxtBZZKoo9VCBnL/o95DGI ItgceQkT090m2+kk1KSh2EFRE6dRQfeSkgU4cDhFP+jE7xMZO+QuOZoPrnF9/Mvb 1hXspqv0XhGJZ0sypmb4Nk2tcYDvWjKrJSVwYws3Ag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudelvddgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Jul 2022 12:05:30 -0400 (EDT) Date: Wed, 20 Jul 2022 09:05:26 -0700 From: Andres Freund To: Greg Stark Cc: Kyotaro Horiguchi , Melanie Plageman , Justin Pryzby , Thomas Munro , "David G. Johnston" , PostgreSQL Hackers Subject: Re: shared-memory based stats collector - v70 Message-ID: <20220720160526.3pyyq3ileaxzdkl2@alap3.anarazel.de> References: <20220317073652.kz3uuh6le6vbfod4@alap3.anarazel.de> <20220325.142256.1649716600998659084.horikyota.ntt@gmail.com> <20220325.172418.1055357550509939415.horikyota.ntt@gmail.com> <20220402082102.ojdd2e6cobsmljvh@alap3.anarazel.de> <20220404041516.cctrvpadhuriawlq@alap3.anarazel.de> <20220405030506.lfdhbu5zf4tzdpux@alap3.anarazel.de> <20220406030008.2qxipjxo776dwnqs@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-07-20 11:35:13 -0400, Greg Stark wrote: > Is it true that the shared memory allocation contains the hash table > entry and body of every object in every database? Yes. However, note that that was already the case with the old stats collector - it also kept everything in memory. In addition every read access to stats loaded a copy of the stats (well of the global stats and the relevant per-database stats). It might be worth doing something fancier at some point - the shared memory stats was already a huge effort, cramming yet another change in there would pretty much have guaranteed that it'd fail. Greetings, Andres Freund