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

Re: [PATCHES] SRA Win32 sync() code

From: Kurt Roeckx <Q(at)ping(dot)be>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(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-19 20:07:34
Message-ID: 20031119200734.GA8685@ping.be (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
On Mon, Nov 17, 2003 at 12:46:34AM -0500, Bruce Momjian wrote:
> Tom Lane wrote:
> > > Do we know that having the background writer fsync a file that was
> > > written by a backend cause all the data to fsync?  I think I could write
> > > a program to test this by timing each of these tests:
> > 
> > That might prove something about the particular platform you tested it
> > on; but it would not speak to the real problem, which is what we can
> > assume is true on every platform...
> 
> The attached program does test if fsync can be used on a file descriptor
> after the file is closed and then reopened.  I see:
> 	
> 	write                  0.000613
> 	write & fsync          0.001727
> 	write, close & fsync   0.001633

> Does anyone have a platform where the last duration is significantly
> different from the middle timing?

write                  0.002807
write & fsync          0.015248
write, close & fsync   0.004696

This is a Linux 2.6.0-test5 on an old IDE disk.

The results change alot.  An other result shows:
write                  0.002737
write & fsync          0.006658
write, close & fsync   0.008431

The first time is stable, the other 2 aren't.

Averagly write & fsync would be about twice as big/slow as write,
close & fsync.


PS: Please specify some modes when creating files.

Kurt


In response to

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2003-11-19 20:09:29
Subject: Re: Commercial binary support?
Previous:From: Rod TaylorDate: 2003-11-19 20:01:12
Subject: Re: question about fixes in v7.4...

pgsql-patches by date

Next:From: Manfred SpraulDate: 2003-11-19 21:07:57
Subject: Re: [pgsql-hackers-win32] SRA Win32 sync() code
Previous:From: Hans-Jürgen SchönigDate: 2003-11-19 19:23:51
Subject: Add GUC setting to make created tables default to WITHOUT

pgsql-hackers-win32 by date

Next:From: Manfred SpraulDate: 2003-11-19 21:07:57
Subject: Re: [pgsql-hackers-win32] SRA Win32 sync() code
Previous:From: Claudio NatoliDate: 2003-11-19 06:26:48
Subject: Re: fork/exe

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