Re: [PATCHES] SRA Win32 sync() code

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: 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 17:38:52
Message-ID: 3FB7B62C.9000007@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Manfred Spraul wrote:

> Tom Lane wrote:
>
>> Seriously though, if we can move the bulk of the writing work into
>> background processes then I don't believe that there will be any
>> significant penalty for regular backends. And I believe that it would
>> be a huge advantage from a correctness point of view if we could stop
>> depending on sync().
>>
> Which function guarantees that renames of WAL files arrived on the
> disk? AFAIK sync() is the only function that guarantees that.
>
> What about the sync app from sysinternals? It seems Mark Russinovich
> figured out how to implement sync on Win32:
> http://www.sysinternals.com/ntw2k/source/misc.shtml#Sync
>
> It requires administrative priveledges, but it shouldn't be that
> difficult to write a tiny service that runs in the LocalSystem
> account, listens to a pipe and syncs all disks when asked.

I think we'd have to do it from scratch, because of these license terms:

-------------------------------

There is no charge to use any of the software published on this Web site
at home or at work, so long as each user downloads and installs the
product directly from www.sysinternals.com.

A commercial license is required to redistribute any of these utilities
directly (whether by computer media, a file server, an email attachment,
etc.) or to embed them in- or link them to- another program.
------------------------------

Also, do we want to force a broad brush sync() of just fsync our own files?

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-11-16 17:57:24 Re: cvs head? initdb?
Previous Message Larry Rosenman 2003-11-16 17:38:29 interesting SIGNAL 10 (BUSERR) on CVS

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2003-11-16 18:06:48 Re: [PATCHES] SRA Win32 sync() code
Previous Message Tom Lane 2003-11-16 17:29:52 Re: [PATCHES] SRA Win32 sync() code

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-11-16 17:53:07 Re: SIGPIPE handling
Previous Message Tom Lane 2003-11-16 17:33:03 Re: SIGPIPE handling