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.96) (envelope-from ) id 1wBz21-001Ydv-19 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 17:55:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBz1y-002t4n-0O for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 17:55:35 +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.96) (envelope-from ) id 1wBz1x-002t4e-2e for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 17:55:34 +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.98.2) (envelope-from ) id 1wBz1t-00000000fia-3cFN for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 17:55:31 +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 63CHtQHD340987; Sun, 12 Apr 2026 13:55:26 -0400 From: Tom Lane To: Fujii Masao cc: Amit Kapila , Robert Haas , PostgreSQL Hackers Subject: Re: pgsql: Reduce log level of some logical decoding messages from LOG to D In-reply-to: References: Comments: In-reply-to Fujii Masao message dated "Fri, 10 Apr 2026 23:01:41 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <340985.1776016526.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 12 Apr 2026 13:55:26 -0400 Message-ID: <340986.1776016526@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Fujii Masao writes: > Thanks for the review! I've pushed the patch. de74d1e9a has had a surprising consequence. Coverity has started to whine like this about each use of ereport(LogicalDecodingLogLevel(): >>> CID 1691470: Integer handling issues (CONSTANT_EXPRESSION= _RESULT) >>> "((MyBackendType =3D=3D B_BACKEND) ? 14 : 15) >=3D 21" is always f= alse regardless of the values of its operands. This occurs as the logical = second operand of "&&". 1975 ereport(LogicalDecodingLogLevel(), 1976 errmsg("logical decoding found consistent point at %X/%08X", 1977 LSN_FORMAT_ARGS(lsn)), 1978 errdetail("Logical decoding will begin using saved snapshot.")= ); It's right of course: neither log level is >=3D ERROR. I don't see why that would constitute a bug, so this is just useless nannyism from Coverity. We could dismiss these complaints as false positives, but the prospect of having to do that repeatedly in future isn't attractive. I wonder if anyone sees a way to rewrite to dodge this complaint. The only thing I can think of is to turn LogicalDecodingLogLevel() into an out-of-line function, which I think would silence it ... but I might be wrong, and anyway that's not a very attractive solution either. Anybody have a better idea? regards, tom lane