
> If the background writer uses fsync, it can write and allow the buffer
> to be reused and fsync later, while if we use O_SYNC, we have to wait
> for the O_SYNC write to happen before reusing the buffer;  
> that will be slower.

You can forget O_SYNC for datafiles for now. There would simply be too much to
do currently to allow decent performance, like scatter/gather IO, ...
Imho the reasonable target should be to write from all backends but sync (fsync)
from the background writer only. (Tune the OS if it actually waits until the 
pg invoked sync (== 5 minutes per default)) 

Andreas

Tue, 18 Nov 2003 10:40:24 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: Background writer process