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 1jZ3YW-0001Dy-QP for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2020 02:25:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jZ3YV-0002u0-Dw for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2020 02:25:03 +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 1jZ3YV-0002rL-7B for pgsql-hackers@lists.postgresql.org; Thu, 14 May 2020 02:25:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZ3YO-0000Y2-To for pgsql-hackers@postgresql.org; Thu, 14 May 2020 02:25:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 04E2OmnX011381; Wed, 13 May 2020 22:24:48 -0400 From: Tom Lane To: Fujii Masao cc: Alvaro Herrera , Tomas Vondra , Masahiko Sawada , "tsunakawa.takay@fujitsu.com" , "pgsql-hackers@postgresql.org" Subject: Re: SLRU statistics In-reply-to: References: <20200513161406.GA437@alvherre.pgsql> <7838.1589388950@sss.pgh.pa.us> <8367.1589391884@sss.pgh.pa.us> Comments: In-reply-to Fujii Masao message dated "Thu, 14 May 2020 11:18:53 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11379.1589423088.1@sss.pgh.pa.us> Date: Wed, 13 May 2020 22:24:48 -0400 Message-ID: <11380.1589423088@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fujii Masao writes: > On 2020/05/14 2:44, Tom Lane wrote: >> I got through check-world with the assertion shown that we are not >> counting any SLRU operations in the postmaster. Don't know if we >> want to commit that or not --- any thoughts? > +1 to add this assertion because basically it's not good thing > to access to SLRU at postmaster and we may want to fix that if found. > At least if we get rid of the SLRUStats initialization code, > IMO it's better to add this assertion and ensure that postmaster > doesn't update the SLRU stats counters. Seems reasonable --- I'll include it. It might be nice to have similar assertions protecting BgWriterStats. But given that we've made that public to be hacked on directly by several different modules, I'm not sure that there's any simple way to do that. regards, tom lane