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 1h1DJm-0000C7-1p for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Mar 2019 16:53:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h1DJk-00077D-K4 for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Mar 2019 16:53:24 +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 1h1DJk-00074s-7s for pgsql-hackers@lists.postgresql.org; Tue, 05 Mar 2019 16:53:24 +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.89) (envelope-from ) id 1h1DJh-0008EG-M3 for pgsql-hackers@postgresql.org; Tue, 05 Mar 2019 16:53:23 +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 x25GrGjo003128; Tue, 5 Mar 2019 11:53:16 -0500 From: Tom Lane To: Thomas Munro cc: Shawn Debnath , Andres Freund , Dmitry Dolgov <9erthalion6@gmail.com>, Robert Haas , PostgreSQL-development Subject: Re: Refactoring the checkpointer's fsync request queue In-reply-to: References: <20190222224853.ahvm3bf52zqr7k7h@alap3.anarazel.de> <20190222230916.5mfsqn3oesd2nxiz@alap3.anarazel.de> <20190222234549.GA7397@f01898859afd.ant.amazon.com> <20190222235742.4oed46wocpjfpoa5@alap3.anarazel.de> <20190227212653.GA7171@f01898859afd.ant.amazon.com> <2a1667c64cc0485bb781704876ac5a0a@EX13D05UWC002.ant.amazon.com> <20190305160715.GA26468@f01898859afd.ant.amazon.com> Comments: In-reply-to Thomas Munro message dated "Wed, 06 Mar 2019 05:33:54 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3125.1551804796.1@sss.pgh.pa.us> Date: Tue, 05 Mar 2019 11:53:16 -0500 Message-ID: <3127.1551804796@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > +#include "fmgr.h" > +#include "storage/block.h" > +#include "storage/relfilenode.h" > +#include "storage/smgr.h" > +#include "storage/sync.h" > Why do we need to include fmgr.h in md.h? More generally, any massive increase in an include file's inclusions is probably a sign that you need to refactor. Cross-header inclusions are best avoided altogether if you can --- obviously that's not always possible, but we should minimize them. We've had some very unfortunate problems in the past from indiscriminate #includes in headers. regards, tom lane