pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: David Rowley <drowley@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add Result Cache executor node (take 2)
Date: Fri, 2 Apr 2021 13:47:34 -0700
Message-ID: <20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de> (raw)
In-Reply-To: <E1lS8LX-0005sr-FZ@gemulon.postgresql.org>
References: <E1lS8LX-0005sr-FZ@gemulon.postgresql.org>

Hi,

On 2021-04-02 01:11:35 +0000, David Rowley wrote:
> Add Result Cache executor node (take 2)

Since this commit I am seeing

In file included from /home/andres/src/postgresql/src/include/postgres.h:46,
                 from /home/andres/src/postgresql/src/backend/executor/nodeResultCache.c:67:
/home/andres/src/postgresql/src/backend/executor/nodeResultCache.c: In function ‘entry_purge_tuples’:
/home/andres/src/postgresql/src/backend/executor/nodeResultCache.c:290:27: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
  290 |  Assert(rcstate->mem_used >= 0);
      |                           ^~
/home/andres/src/postgresql/src/include/c.h:848:9: note: in definition of macro ‘Assert’
  848 |   if (!(condition)) \
      |         ^~~~~~~~~
/home/andres/src/postgresql/src/backend/executor/nodeResultCache.c: In function ‘remove_cache_entry’:
/home/andres/src/postgresql/src/backend/executor/nodeResultCache.c:349:27: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
  349 |  Assert(rcstate->mem_used >= 0);
      |                           ^~
/home/andres/src/postgresql/src/include/c.h:848:9: note: in definition of macro ‘Assert’
  848 |   if (!(condition)) \
      |         ^~~~~~~~~

Now, it's a bit of an over-pedantic warning, but it's also kinda right,
ensuring that a variable that cannot be negative is bigger than 0 is a
bit redundant.

Greetings,

Andres Freund





view thread (3+ messages)  latest in thread

Message-ID: <20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de>
Permalink:  ../20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, drowley@postgresql.org
  Subject: Re: pgsql: Add Result Cache executor node (take 2)
  In-Reply-To: <20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de>
  References: <E1lS8LX-0005sr-FZ@gemulon.postgresql.org> <20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de>

* 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