Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhGa1-00AWMT-Bp for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 22:14:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rhGZz-00BDDe-Af for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 22:14:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhGZz-00BDDW-1e for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 22:14:39 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhGZv-002rcR-Vk for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 22:14:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 424MEW7u3885481; Mon, 4 Mar 2024 17:14:32 -0500 From: Tom Lane To: Alvaro Herrera cc: Kyotaro Horiguchi , x4mmm@yandex-team.ru, dilipbalaut@gmail.com, tndrwang@gmail.com, pgsql-hackers@lists.postgresql.org, tomas.vondra@enterprisedb.com Subject: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock In-reply-to: <202403031358.b435eh7u72td@alvherre.pgsql> References: <202403031358.b435eh7u72td@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Sun, 03 Mar 2024 14:58:39 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3885479.1709590472.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 04 Mar 2024 17:14:32 -0500 Message-ID: <3885480.1709590472@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > Pushed that way, but we can discuss further wording improvements/changes > if someone wants to propose any. I just noticed that drongo is complaining about two lines added by commit 53c2a97a9: drongo | 2024-03-04 14:34:52 | ../pgsql/src/backend/access/transam= /slru.c(436): warning C4047: '!=3D': 'SlruPageStatus *' differs in levels = of indirection from 'int' drongo | 2024-03-04 14:34:52 | ../pgsql/src/backend/access/transam= /slru.c(717): warning C4047: '!=3D': 'SlruPageStatus *' differs in levels = of indirection from 'int' These lines are Assert(&shared->page_status[slotno] !=3D SLRU_PAGE_EMPTY); Assert(&ctl->shared->page_status[slotno] !=3D SLRU_PAGE_EMPTY); These are comparing the address of something with an enum value, which surely cannot be sane. Is the "&" operator incorrect? It looks like SLRU_PAGE_EMPTY has (by chance, or deliberately) the numeric value of zero, so I guess the majority of our BF animals are understanding this as "address !=3D NULL". But that doesn't look like a useful test to be making. regards, tom lane