pgsql: Remove useless Asserts in Result Cache code

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove useless Asserts in Result Cache code
Date: 2021-04-02 21:42:04
Message-ID: E1lSRYK-0005S2-Ve@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove useless Asserts in Result Cache code

Testing if an unsigned variable is >= 0 is pretty pointless.

There's likely enough code in remove_cache_entry() to verify the cache
memory accounting is correct in assert enabled builds. These Asserts
were not adding much extra cover, even if they had been checking >= 0 on a
signed variable.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1267d9862fc6a4f8cdc0ca38d1988b61f39da585

Modified Files
--------------
src/backend/executor/nodeResultCache.c | 4 ----
1 file changed, 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2021-04-02 21:43:43 Re: pgsql: Add Result Cache executor node (take 2)
Previous Message Andres Freund 2021-04-02 20:47:34 Re: pgsql: Add Result Cache executor node (take 2)