Re: [PATCHES] SRA Win32 sync() code

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [PATCHES] SRA Win32 sync() code
Date: 2003-11-16 20:43:27
Message-ID: 3FB7E16F.8090701@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Tom Lane wrote:

> Jan Wieck <JanWieck(at)Yahoo(dot)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(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2003-11-16 21:13:33 Bittorrent test
Previous Message Tom Lane 2003-11-16 20:17:08 Re: [PATCHES] SRA Win32 sync() code

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2003-11-16 22:46:17 Re: [PATCHES] SRA Win32 sync() code
Previous Message Tom Lane 2003-11-16 20:17:08 Re: [PATCHES] SRA Win32 sync() code

Browse pgsql-patches by date

  From Date Subject
Next Message Rod Taylor 2003-11-16 21:58:43 Alter Table phase 1 -- Please apply to 7.5
Previous Message Tom Lane 2003-11-16 20:17:08 Re: [PATCHES] SRA Win32 sync() code