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 1jYsed-00067a-Ld for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2020 14:46:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYsec-00080k-JU for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2020 14:46: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 1jYsec-00080d-CW for pgsql-hackers@lists.postgresql.org; Wed, 13 May 2020 14:46:38 +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 1jYseZ-0004RT-3q for pgsql-hackers@postgresql.org; Wed, 13 May 2020 14:46:37 +0000 Received: from hnk.local (p2358024-ipbf2221funabasi.chiba.ocn.ne.jp [114.177.56.24]) by oss.nttdata.com (Postfix) with ESMTPSA id CF17060172; Wed, 13 May 2020 23:46:30 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at oss.nttdata.com Subject: Re: SLRU statistics To: Tom Lane Cc: Tomas Vondra , Alvaro Herrera , Masahiko Sawada , "tsunakawa.takay@fujitsu.com" , "pgsql-hackers@postgresql.org" References: <20200402004136.wodwftan45mcwggm@development> <20200430181901.24tlriahmafi4sfn@development> <0e1c8904-13be-ab70-0096-54f0b30e43ba@oss.nttdata.com> <20200502000818.nn4kpewiput42bnb@development> <49b8ad17-f6d9-a086-a952-ff1fec3ac1b3@oss.nttdata.com> <20200502105500.hwhba3d6s3hlrqf6@development> <20200502165905.brfxv6dk5vjdbgti@development> <976bbb73-a112-de3c-c488-b34b64609793@oss.nttdata.com> <20200513082159.myflgcs5fnhnujbk@development> <32135.1589379999@sss.pgh.pa.us> From: Fujii Masao Message-ID: Date: Wed, 13 May 2020 23:46:30 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <32135.1589379999@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/05/13 23:26, Tom Lane wrote: > Fujii Masao writes: >> On 2020/05/13 17:21, Tomas Vondra wrote: >>> On Wed, May 13, 2020 at 04:10:30PM +0900, Fujii Masao wrote: >>>> Also I found another minor issue; SLRUStats has not been initialized to 0 >>>> and which could update the counters unexpectedly. Attached patch fixes >>>> this issue. > >> Pushed both. Thanks! > > Why is that necessary? A static variable is defined by C to start off > as zeroes. Because SLRUStats is not a static variable. No? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION