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 1lYVBL-0002yp-UF for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Apr 2021 14:47:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lYVBK-0000rZ-To for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Apr 2021 14:47:22 +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 1lYV8I-0006OO-7e for pgsql-hackers@lists.postgresql.org; Mon, 19 Apr 2021 14:44:14 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYV8D-0004Dl-4u for pgsql-hackers@postgresql.org; Mon, 19 Apr 2021 14:44:13 +0000 Received: from hnk.local (p2043043-ipbf1801funabasi.chiba.ocn.ne.jp [221.185.194.43]) by oss.nttdata.com (Postfix) with ESMTPSA id DFCBE622C3; Mon, 19 Apr 2021 23:44:05 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: track_planning causing performance regression To: Justin Pryzby Cc: Pavel Stehule , Peter Geoghegan , Julien Rouhaud , "Tharakan, Robins" , pgsql-hackers@postgresql.org References: <2895b53b033c47ccb22972b589050dd9@EX13D05UWC001.ant.amazon.com> <42a13b4c-e60c-c6e7-3475-8eff8050bed4@oss.nttdata.com> <646e5cae-5e8b-feaa-43dc-014bf355bf08@oss.nttdata.com> <20210418233615.GB7256@telsasoft.com> From: Fujii Masao Message-ID: Date: Mon, 19 Apr 2021 23:44:05 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210418233615.GB7256@telsasoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/04/19 8:36, Justin Pryzby wrote: > Reviewing this change which was committed last year as > 321fa6a4a26c9b649a0fbec9fc8b019f19e62289 > > On Fri, Jul 03, 2020 at 03:57:38PM +0900, Fujii Masao wrote: >> On 2020/07/03 13:05, Pavel Stehule wrote: >>> pá 3. 7. 2020 v 4:39 odesílatel Fujii Masao napsal: >>> >>> Maybe there can be documented so enabling this option can have a negative impact on performance. >> >> Yes. What about adding either of the followings into the doc? >> >> Enabling this parameter may incur a noticeable performance penalty. >> >> or >> >> Enabling this parameter may incur a noticeable performance penalty, >> especially when a fewer kinds of queries are executed on many >> concurrent connections. > > Something seems is wrong with this sentence, and I'm not sure what it's trying > to say. Is this right ? pg_stat_statements users different spinlock for each kind of query. So fewer kinds of queries many sessions execute, fewer spinlocks they try to acquire. This may lead to spinlock contention and significant performance degration. This is what the statement is trying to say. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION