Re: MMAP Buffers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MMAP Buffers
Date
Msg-id 814.1302966152@sss.pgh.pa.us
Whole thread Raw
In response to Re: MMAP Buffers  (Greg Stark <gsstark@mit.edu>)
Responses Re: MMAP Buffers  (Radosław Smogura <rsmogura@softperience.eu>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> What he did, I gather, is treat the mmapped buffers as a read-only
> copy of the data. To actually make any modifications he copies it into
> shared buffers and treats them like normal. When the buffers get
> flushed from memory they get written and then the pointers get
> repointed back at the mmapped copy.

That seems much too late --- won't other processes still be looking at
the stale mmap'ed version of the page until a write-out happens?

I'm pretty concerned about the memory efficiency of this too, since it
seems like it's making it *guaranteed*, not just somewhat probable,
that there are two copies in RAM of every database page that's been
modified since the last checkpoint (or so).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Marko Kreen
Date:
Subject: Re: MMAP Buffers
Next
From: Tom Lane
Date:
Subject: Re: Broken HOT chains in system catalogs