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 1huhfX-0005X1-9D for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 18:25:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1huhfV-0006me-8W for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 18:25:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huhfU-0006mW-Sn for pgsql-hackers@lists.postgresql.org; Mon, 05 Aug 2019 18:25:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1huhfS-0000Rd-Kg for pgsql-hackers@postgresql.org; Mon, 05 Aug 2019 18:25:11 +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 x75IP3Ih029999; Mon, 5 Aug 2019 14:25:03 -0400 From: Tom Lane To: Alvaro Herrera cc: vignesh C , Andres Freund , Pg Hackers Subject: Re: Unused header file inclusion In-reply-to: <20190805180656.GA11353@alvherre.pgsql> References: <20190805180656.GA11353@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 05 Aug 2019 14:06:56 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29997.1565029503.1@sss.pgh.pa.us> Date: Mon, 05 Aug 2019 14:25:03 -0400 Message-ID: <29998.1565029503@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Then there's the removal, which is in tuplesort.c because of > INT_MAX as added by commit d26559dbf356 and still present ... One has to be especially wary of removing system-header inclusions; the fact that they don't seem to be needed on your own machine doesn't prove they aren't needed elsewhere. > ... I suggest this patch should be rejected. Yeah. If we do anything along this line it should be based on pgrminclude results, and even then I think it'd require manual review, especially for changes in header files. The big picture here is that removing #includes is seldom worth the effort it takes :-( regards, tom lane