Re: checkpointer continuous flushing - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: checkpointer continuous flushing
Date
Msg-id alpine.DEB.2.10.1511122018350.20444@sto
Whole thread Raw
In response to Re: checkpointer continuous flushing  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: checkpointer continuous flushing
List pgsql-hackers
>>> Basically yes, I'm suggesting a mutex in the vdf struct.
>> 
>> I can't see that being ok. I mean what would that thing even do? VFD
>> isn't shared between processes, and if we get a smgr flush we have to
>> apply it, or risk breaking other things.
>
> Probably something is eluding my comprehension:-)
>
> My basic assumption is that the fopen & fd is per process, so we just have to 
> deal with the one in the checkpointer process, so it is enough that the 
> checkpointer does not close the file while it is flushing things to it?

Hmmm...

Maybe I'm a little bit too optimistic here, because it seems that I'm 
suggesting to create a dead lock if the checkpointer has both buffers to 
flush in waiting and wishes to close the very same file that holds them.

So on wanting to close the file the checkpointer should rather flushes the 
outstanding flushes in wait and then close the fd, which suggest some 
global variable to hold flush context so that this can be done.

Hmmm.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Proposal: "Causal reads" mode for load balancing reads without stale data
Next
From: "Daniel Verite"
Date:
Subject: Re: psql: add \pset true/false