Skip site navigation (1) Skip section navigation (2)

SRA Win32 sync() code

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: SRA Win32 sync() code
Date: 2003-11-16 05:00:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
Here is the SRA sync() code for Win32.  As you might know, fsync on
Win32 is _commit, and sync() is _flushall.  However, _flushall only
flushes only _open_ kernel buffers, not dirty buffers that have been
closed.  Therefore, on Win32, during checkpoint, you have to open,
fsync(_commit), close all file that have been modified since the
previous checkpoint.

Not sure how we are going to do this in Win32, but somehow we will have
to record all open files between checkpoints in an area that the
checkpoint process can read during a checkpoint.

Here is the SRA code that records the dirty file and the code that
cycles through the list and fsync's each one.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


pgsql-hackers by date

Next:From: Joe ConwayDate: 2003-11-16 05:27:46
Subject: Re: oh dear ...
Previous:From: Neil ConwayDate: 2003-11-16 02:18:48
Subject: Re: source version?

pgsql-patches by date

Next:From: Andrew DunstanDate: 2003-11-16 10:10:57
Subject: Re: improve overcommit docs
Previous:From: Bruce MomjianDate: 2003-11-16 04:49:54
Subject: Re: minor release note improvements

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2003-11-16 16:32:59
Subject: Re: [PATCHES] SRA Win32 sync() code
Previous:From: Bruce MomjianDate: 2003-11-15 02:11:14
Subject: Re: Win32 pg_ctl

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group