Re: WAL & SHM principles - Mailing list pgsql-hackers

From ncm@zembu.com (Nathan Myers)
Subject Re: WAL & SHM principles
Date
Msg-id 20010307132108.K624@store.zembu.com
Whole thread Raw
In response to Re: WAL & SHM principles  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Mar 07, 2001 at 11:21:37AM -0500, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > The only problem is that we would no longer have control over which
> > pages made it to disk.  The OS would perhaps write pages as we modified
> > them.  Not sure how important that is.
> 
> Unfortunately, this alone is a *fatal* objection.  See nearby
> discussions about WAL behavior: we must be able to control the relative
> timing of WAL write/flush and data page writes.

Not so fast!

It is possible to build a logging system so that you mostly don't care
when the data blocks get written; a particular data block on disk is 
considered garbage until the next checkpoint, so that you might as well 
allow the blocks to be written any time, even before the log entry.

Letting the OS manage sharing of disk block images via mmap should be 
an enormous win vs. a fixed shm and manual scheduling by PG.  If that
requires changes in the logging protocol, it's worth it.

(What supported platforms don't have mmap?)

Nathan Myers
ncm@zembu.com


pgsql-hackers by date:

Previous
From: ncm@zembu.com (Nathan Myers)
Date:
Subject: Re: Proposed WAL changes
Next
From: "Mikheev, Vadim"
Date:
Subject: RE: WAL & SHM principles