pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: x4mmm@yandex-team.ru
Cc: dilipbalaut@gmail.com
Cc: tndrwang@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Cc: tomas.vondra@enterprisedb.com
Subject: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Date: Mon, 04 Mar 2024 17:14:32 -0500
Message-ID: <3885480.1709590472@sss.pgh.pa.us> (raw)
In-Reply-To: <202403031358.b435eh7u72td@alvherre.pgsql>
References: <202403031358.b435eh7u72td@alvherre.pgsql>

Alvaro Herrera <alvherre@alvh.no-ip.org> 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: '!=': '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: '!=': 'SlruPageStatus *' differs in levels of indirection from 'int'

These lines are

	Assert(&shared->page_status[slotno] != SLRU_PAGE_EMPTY);

	Assert(&ctl->shared->page_status[slotno] != 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 != NULL".  But that
doesn't look like a useful test to be making.

			regards, tom lane





view thread (131+ messages)  latest in thread

Message-ID: <3885480.1709590472@sss.pgh.pa.us>
Permalink:  ../3885480.1709590472@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3885480.1709590472@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, horikyota.ntt@gmail.com, 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: <3885480.1709590472@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox