Re: [PATCHES] SRA Win32 sync() code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: 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 18:21:38
Message-ID: 29231.1069006898@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> 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.

> If the background writer starts using fsync(), we can have normal
> backends that do a write() set a shared memory boolean. We can then
> test that boolean and do sync() only if other backends had to do their
> own writes.

That seems like the worst of both worlds --- you still are depending on
sync() for correctness.

Also, as long as backends only *seldom* do writes, making them fsync a
write when they do make one will be less of an impact on overall system
performance than having a sync() ensue shortly afterwards. I think you
are focusing too narrowly on the idea that backends shouldn't ever wait
for writes, and failing to see the bigger picture. What we need to
optimize is overall system performance, not an arbitrary restriction
that certain processes never wait for certain things.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2003-11-16 20:00:24 Re: [PATCHES] SRA Win32 sync() code
Previous Message Larry Rosenman 2003-11-16 18:17:19 Re: interesting SIGNAL 10 (BUSERR) on CVS

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Jan Wieck 2003-11-16 20:00:24 Re: [PATCHES] SRA Win32 sync() code
Previous Message Bruce Momjian 2003-11-16 18:06:48 Re: [PATCHES] SRA Win32 sync() code

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-11-16 18:30:24 Re: SIGPIPE handling
Previous Message Manfred Spraul 2003-11-16 18:20:14 Re: SIGPIPE handling