Re: Background writer process - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Background writer process
Date
Msg-id 200311140018.hAE0Ih908395@candle.pha.pa.us
Whole thread Raw
In response to Re: Background writer process  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Jan Wieck wrote:
> That is all right and as said, how often, how much and how forced we do 
> the IO can all be configurable and as flexible as people see fit. But 
> whether you use sync(), fsync(), fdatasync(), O_SYNC, O_DSYNC or 
> posix_fadvise(), somewhere you have to do the write(). And that write 
> has to be coordinated with the buffer cache replacement strategy so that 
> you write those buffers that are likely to be replaced soon, and don't 
> write those that the strategy thinks keeping for longer anyway. Except 
> at a checkpoint, then you have to write whatever is dirty.
> 
> The patch I posted does this write() in coordination with the strategy 
> in a separate background process, so that the regular backends don't 
> have to write under normal circumstances (there are some places in DDL 
> statements that call BufferSync(), that's exceptions IMHO). Can we agree 
> on this general outline? Or do we have any better proposals?

Agreed.  Background write() is a win on all all OS's.  It is just the
kernel to disk part we will have to have configurable, I think.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Background writer process
Next
From: Peter Eisentraut
Date:
Subject: Re: Any more "must fix" issues for 7.4?