Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVIcG-0007q4-KJ for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Dec 2018 16:04:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gVIcF-0007kT-9k for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Dec 2018 16:04:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVIcF-0007kI-2w for pgsql-bugs@lists.postgresql.org; Fri, 07 Dec 2018 16:04:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gVIcB-0002iw-VO for pgsql-bugs@lists.postgresql.org; Fri, 07 Dec 2018 16:04:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wB7G4JsZ030956; Fri, 7 Dec 2018 11:04:20 -0500 From: Tom Lane To: bianpan2016@163.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15539: Deadcode in OpenTableList In-reply-to: <15539-06d00ef6b1e2e1bb@postgresql.org> References: <15539-06d00ef6b1e2e1bb@postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Fri, 07 Dec 2018 10:18:59 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30954.1544198659.1@sss.pgh.pa.us> Date: Fri, 07 Dec 2018 11:04:19 -0500 Message-ID: <30955.1544198659@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= writes: > The function OpenTableList performs the condition check " if > (list_member_oid(relids, childrelid))" twice. The second condition will > always evaluate to FALSE. As a result, the code (i.e., heap_close) on the > true branch of the second condition check is deadcode. Yeah, you're right. I wonder whether we should've expected Coverity to notice that. Fix pushed, thanks for the report! regards, tom lane