Re: SRA Win32 sync() code - Mailing list pgsql-patches

From Jan Wieck
Subject Re: SRA Win32 sync() code
Date
Msg-id 3FB7E16F.8090701@Yahoo.com
Whole thread Raw
In response to Re: SRA Win32 sync() code  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SRA Win32 sync() code  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:

> Jan Wieck <JanWieck@Yahoo.com> writes:
>> Removing sync() entirely requires very accurate fsync()'ing in the
>> background writer, the checkpointer and the backends. Basically none of
>> them can mark a block "clean" if he fails to fsync() the relation later!
>> This will be a mess to code.
>
> Not really.  The O_SYNC solution for example would be trivial to code.

Well, the bgwriter has basically the same chance the checkpointer has
... mdblindwrt() in the end, because he doesn't have the relcache handy.
So you want to open(O_SYNC), write(), close() every single block? I
don't expect that to be much better than a global sync().


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: SRA Win32 sync() code
Next
From: Rod Taylor
Date:
Subject: Alter Table phase 1 -- Please apply to 7.5