Re: memory strangeness (fwd) - Mailing list pgsql-admin

From Curt Sampson
Subject Re: memory strangeness (fwd)
Date
Msg-id Pine.NEB.4.44.0207101319080.21914-100000@angelic.cynic.net
Whole thread Raw
In response to Re: memory strangeness (fwd)  (Tim Ellis <Tim.Ellis@gamet.com>)
List 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@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


pgsql-admin by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: unsubscribe me for heavens sakes!!!!!!!!!
Next
From: "Stefano Coletta"
Date:
Subject: R: Authentication in batch processing