Re: memory strangeness (fwd)

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Tim Ellis <Tim(dot)Ellis(at)gamet(dot)com>
Cc: stigmata(at)blackangel(dot)net, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: memory strangeness (fwd)
Date: 2002-07-10 04:24:41
Message-ID: Pine.NEB.4.44.0207101319080.21914-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 9 Jul 2002, Tim Ellis wrote:

> I've always been a proponent of letting the OS do what it does best, so
> this letting-the-OS-buffer-for-you concept, to me, is very appealing.

Me too. :-) Especially since it's generally going to be doing some sort
of buffering anyway, and has a whole bunch of code designed to optimzize
this buffering as best as possible.

> You still must know when the OS-buffered data has truly made it to disk
> while not needing to submit lots of sync() calls.

When you need to force blocks to disk, you just msync() them.

The bigger problem, if you're using mmap, is how to make sure your
modifications *don't* get written to disk until the WAL blocks have been
written. There's no standard way to tell the OS that it may *not* yet
write back certain blocks. So instead you'd probably have to reserve the
space in a block, keep a separate list of changes to the block that any
other processes must also examine, and only apply those changes to the
block after the WAL entry is confirmed written to stable storage.

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Luis Felipe Acevedo 2002-07-10 06:44:15 Case sensitive
Previous Message Nick Fankhauser 2002-07-10 02:36:23 Re: unsubscribe me for heavens sakes!!!!!!!!!