Re: Refactoring the checkpointer's fsync request queue - Mailing list pgsql-hackers

From Shawn Debnath
Subject Re: Refactoring the checkpointer's fsync request queue
Date
Msg-id 20190305171557.GA30015@f01898859afd.ant.amazon.com
Whole thread Raw
In response to Re: Refactoring the checkpointer's fsync request queue  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Refactoring the checkpointer's fsync request queue
List pgsql-hackers
On Tue, Mar 05, 2019 at 11:53:16AM -0500, Tom Lane wrote:
> Thomas Munro <thomas.munro@gmail.com> 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.

Agree - I do pay attention to these, but this one slipped through the 
cracks (copied smgr.h then edited to remove smgr bits). Thanks for 
catching this, will fix in the next patch iteration.

-- 
Shawn Debnath
Amazon Web Services (AWS)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rare SSL failures on eelpout
Next
From: David Steele
Date:
Subject: Re: Re: Optimze usage of immutable functions as relation