From: Greg Stark <gsstark@mit.edu>
To: Josh Berkus <josh@agliodbs.com>
Cc: Greg Stark <gsstark@MIT.EDU>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mark Aufflick <mark@pumptheory.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: seq scan cache vs. index cache smackdown
Date: 15 Feb 2005 13:39:46 -0500
Message-ID: <87k6p93bwt.fsf@stark.xeocode.com> (raw)
In-Reply-To: <200502150922.59176.josh@agliodbs.com>
References: <FC8ED065-7EE0-11D9-904E-003065D62456@pumptheory.com>
<9326.1108452962@sss.pgh.pa.us>
<87vf8u2qgw.fsf@stark.xeocode.com>
<200502150922.59176.josh@agliodbs.com>
Josh Berkus <josh@agliodbs.com> writes:
> Why is mmap not workable? It would require far-reaching changes to our code
> -- certainly -- but I don't think it can be eliminated from consideration.
Fundamentally because there is no facility for being notified by the OS before
a page is written to disk. And there's no way to prevent a page from being
written to disk (mlock just prevents it from being flushed from memory, not
from being synced to disk).
So there's no way to guarantee the WAL will be written before the buffer is
synced to disk.
Maybe it could be done by writing and syncing the WAL independently before the
shared buffer is written to at all, but that would be a completely different
model. And it would locking the shared buffer until the sync is done, and
require a private copy of the shared buffer necessitating more copies than the
double buffering in the first place.
--
greg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gsstark@mit.edu, josh@agliodbs.com, tgl@sss.pgh.pa.us, mark@pumptheory.com
Subject: Re: seq scan cache vs. index cache smackdown
In-Reply-To: <87k6p93bwt.fsf@stark.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox