Re: Refactoring the checkpointer's fsync request queue

Shawn Debnath <sdn@amazon.com>

From: Shawn Debnath <sdn@amazon.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, "Dmitry Dolgov" <9erthalion6@gmail.com>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-03-13T01:00:07Z
Lists: pgsql-hackers
On Thu, Mar 07, 2019 at 08:11:51PM +1300, Thomas Munro wrote:
> On Wed, Mar 6, 2019 at 6:16 AM Shawn Debnath <sdn@amazon.com> wrote:
> > On Tue, Mar 05, 2019 at 11:53:16AM -0500, Tom Lane wrote:
> > > Thomas Munro <thomas.munro@gmail.com> writes:
> > > > 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.
> 
> Huh... so why it was in smgr.h then?  Seems bogus.  Fix pushed to master.

So ... wondering if there are any other left over items for this patch 
or is it good to go? I imagine there's at least a couple of us who would 
love to see this get in for PG12.

Thanks!

-- 
Shawn Debnath
Amazon Web Services (AWS)


Commits

  1. Fix bugs in mdsyncfiletag().

  2. Refactor the fsync queue for wider use.

  3. Don't forget about failed fsync() requests.

  4. PANIC on fsync() failure.

  5. Move LockClauseStrength, LockWaitPolicy into new file nodes/lockoptions.h.

  6. Add new file for checkpointer.c

  7. Split work of bgwriter between 2 processes: bgwriter and checkpointer.

  8. Install infrastructure for shared-memory free space map. Doesn't actually