Re: WAL & SHM principles

From: ncm(at)zembu(dot)com (Nathan Myers)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WAL & SHM principles
Date: 2001-03-07 21:21:08
Message-ID: 20010307132108.K624@store.zembu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 07, 2001 at 11:21:37AM -0500, Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at)zembu(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikheev, Vadim 2001-03-07 21:27:34 RE: WAL & SHM principles
Previous Message Nathan Myers 2001-03-07 21:10:52 Re: Proposed WAL changes