Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHJHC-0001F5-K8 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2015 22:11:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHJHC-0007O8-0u for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2015 22:11:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZHJH8-0007MQ-TK for pgsql-hackers@postgresql.org; Mon, 20 Jul 2015 22:11:07 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZHJH0-0007fO-0Z for pgsql-hackers@postgresql.org; Mon, 20 Jul 2015 22:11:05 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [195.39.71.250]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 50EFE4011BF; Mon, 20 Jul 2015 15:10:50 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 8765B36F0; Tue, 21 Jul 2015 02:10:48 +0400 (SAMT) Date: Tue, 21 Jul 2015 00:10:48 +0200 From: Alvaro Herrera To: Adam Brightwell Cc: PostgreSQL Hackers Subject: Re: Unnecessary #include in objectaddress.h? Message-ID: <20150720221048.GV2301@postgresql.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.8 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Adam Brightwell wrote: > All, > > While looking at the include dependency graph for objectaddress.h: > > http://doxygen.postgresql.org/objectaddress_8h.html > > I saw that pg_list.h is both included and inherited (through multiple > paths) by objectaddress.h. Perhaps this doesn't matter, but I thought > I would at least bring it up and propose removing this redundant > #include from objectaddress.h. I wondered whether to bother about this kind of thing for a while. It doesn't have any practical impact immediately, because obviously pg_list.h is still included indirectly by objectaddress.h (via lock.h in this case IIRC). If we made some restructuring that caused the other header not to include pg_list.h anymore, that would make objectaddress.h broken -- unless objectaddress.h itself no longer needed pg_list.h. We've had in previous rounds whole iterations on a "pgrminclude" script that does this kind of thing, but the breakage after each such run is large. All in all, I wouldn't bother unless there is an actual change. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers