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 1nbwFI-0004Qe-3n for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Apr 2022 03:22:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nbwFG-0004N3-VH for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Apr 2022 03:22:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbwFG-0004Mt-Lx for pgsql-hackers@lists.postgresql.org; Wed, 06 Apr 2022 03:22:10 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nbwFE-0000ZM-5g for pgsql-hackers@lists.postgresql.org; Wed, 06 Apr 2022 03:22:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7E1CB3200B25; Tue, 5 Apr 2022 23:22:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 05 Apr 2022 23:22:04 -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=FXGYy6GZPiJK5W8pjBQHwu81/3VpLdf8L2s8Yg mSGFA=; b=3hYxyJS8n+Q5lb52AOV162ceryEoLapa81gsRO5lG/1xYPecRJLHlc Vhx4CU83GfFfeiKL7y9EI456obi12L1a1yC4W08yUPb1p70w159yvpVqBs/WZtd5 V/HMIf0X2bkCFX6ToiYUexdjs61L6OmVOZ4yRla7T8ANZIi7pwfl++4bgbatHzOC 6c0IWjrCQOY9U7u2qZobHLEvuUOKzMrw+mMm/QKuXkHjHhELOQsUtFQQWKm0+ozp 0Td8fJNvhPmLAzh2VJ2LSJrXzMQtleug6j5T+tblM28yE6J7IJ3jWqYrTCTYEdgX gxgX5OXFJ9Z47/AL94Bw0e+opCgWjARg== 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=FXGYy6GZPiJK5W8pj BQHwu81/3VpLdf8L2s8YgmSGFA=; b=XhZcBbjhRo1Se790Gsp/Klm2pb9zF6epk 1KqI3WlF+9And29NcxAPPLdUspejAY5+vWXZK8RZSLwLnf85Nl/qSmk4HQqCpqDk 5FEBY7KyHFu8hSHzSoqmwXAjFA8LS3ou8Toe7jVavvd53C+34y+2+V+8j+9I8Xzo mqyt5l2NHYITCsbtBL4Tq3bBrM1X47KIbcEYPSG5LiH83Fobxe1puT8f7eUAMD1p VoXjDi+VPcDyN53/+O3y5qxOZ+XhgArgLecVt/8wI6unWS5PA31jD8H6Snhwi7i0 L3mETx4xhxCDyupyyM3AWYidogYm/v+WBVpV4HkI9I+V0prt9GKlw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejhedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Apr 2022 23:22:02 -0400 (EDT) Date: Tue, 5 Apr 2022 20:22:01 -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: <20220406032201.hmmwvsulockamnsb@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-04-05 23:11:07 -0400, Greg Stark wrote: > I've never tried to review a 24-patch series before. It's kind of > intimidating.... Is there a good place to start to get a good idea of > the most important changes? It was more at some point :). And believe me, I find this whole project intimidating and exhausting. The stats collector is entangled in a lot of places, and there was a lot of preparatory work to get this point. Most of the commits aren't really interesting, I broke them out to make the "main commit" a bit smaller, because it's exhausting to look at a *huge* single commit. I wish I could have broken it down more, but I didn't find a good way. The interesting commit is v70-0010-pgstat-store-statistics-in-shared-memory.patch which actually replaces the stats collector by storing stats in shared memory. It contains a, now hopefully decent, overview of how things work at the top of pgstat.c. Greetings, Andres Freund