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 1lSQhh-0007GR-F0 for pgsql-committers@arkaria.postgresql.org; Fri, 02 Apr 2021 20:47:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lSQhg-0006eT-Cu for pgsql-committers@arkaria.postgresql.org; Fri, 02 Apr 2021 20:47:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lSQhf-0006du-Jk for pgsql-committers@lists.postgresql.org; Fri, 02 Apr 2021 20:47:40 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lSQhd-0008U6-4z for pgsql-committers@lists.postgresql.org; Fri, 02 Apr 2021 20:47:38 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4344C5C0071; Fri, 2 Apr 2021 16:47:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 02 Apr 2021 16:47:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=0 WucyyjaGaiWFmo0h8EvCAP6cHNWyRdNY8n5ODqTZbQ=; b=EPLbNOIEAZsOmrdZh JT0Xdxdypjssr8FSaLTG+yrwCJmvQi21mtJ8Lz5IxYlzKtWa9vMeC2ikDdh5eZbJ QIv8VJaFKZuyjqkj1wWVm29/PfvhhEdSHCsiguqZ1F/Y2AUOdbX9tnGLDhdfHRF0 L9b03KwjFgvXw851v09CEfylwfUmp7Ch7Lsib8W+qgMJripgbXqFcUgfXSkhhYa1 wKVO8t4d2nkD+pTcjxLGwVUYckbKprlEfJ5l83TrVYhXCJOLB5xX1NFFJlpvockt VHVXVYDQwaE48qlZhoeVu+OkhirzKvxURNYc1RZBbKCEGpEAq/vH8DNMzdPdA6n5 oZPLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=0WucyyjaGaiWFmo0h8EvCAP6cHNWyRdNY8n5ODqTZ bQ=; b=ZNUKKXQWIMD9apGTgZrKMDOWQoMuy4+p8vhYObWteB+g1X8O5OBxjnl7x huiynNLYoII8JPpwR/OXGAPclgxDRQOKJSr2Qrl3DXjqrLFd8jp6VCl2CMqchJ3Z cJzHmHGwbophTQEILMCqr1MS+qYIDeOCEw7xF+pfze7uQ1DBDQ6HDQsLFnRyMx4C 7S3bjxrYL9sbJ1ueAP6HiOavyirNo6eR8Kww4kpretsQh0ftKz4dCLb/cvqE//Ah HIsZZziobhpsLRCAQjsK0bF0pc+q2gbmRQoyDtIKoHn2Ry47+9H13PqDeQchyTFA edZ79QA1EWEN6vGJGd10Iw7+B6ijQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeiiedgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpeeiudeujefhueefffffffekiedthfelueffueelhfekheeujefffefg hfffffetffenucfkphepuddtjedrudegvddrfeefrddutdefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigv lhdruggv X-ME-Proxy: Received: from intern.anarazel.de (107-142-33-103.lightspeed.sntcca.sbcglobal.net [107.142.33.103]) by mail.messagingengine.com (Postfix) with ESMTPA id A1C0B1080054; Fri, 2 Apr 2021 16:47:35 -0400 (EDT) Date: Fri, 2 Apr 2021 13:47:34 -0700 From: Andres Freund To: David Rowley Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add Result Cache executor node (take 2) Message-ID: <20210402204734.6mo3nfacnljlicgn@alap3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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