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

From Andres Freund
Subject Re: Refactoring the checkpointer's fsync request queue
Date
Msg-id 20181114214948.r2adyxjclnz2lvxe@alap3.anarazel.de
Whole thread Raw
In response to Re: Refactoring the checkpointer's fsync request queue  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Refactoring the checkpointer's fsync request queue  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2018-11-14 16:36:49 -0500, Robert Haas wrote:
> On Tue, Nov 13, 2018 at 6:44 PM Thomas Munro
> <thomas.munro@enterprisedb.com> wrote:
> > I'm not sure if it matters whether we send the fd before or after the
> > write, but we still need some kind of global ordering of fds that can
> > order a given fd with respect to writes in other processes, so the
> > patch introduces a global shared counter captured immediately after
> > open() (including when reopened in the vfd machinery).
> 
> But how do you make reading that counter atomic with the open() itself?

I don't see why it has to be. As long as the "fd generation" assignment
happens before fsync (and writes secondarily), there ought not to be any
further need for synchronizity?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: date_trunc() in a specific time zone
Next
From: Tom Lane
Date:
Subject: Re: Constraint documentation