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

From Giles Lean
Subject Re: WAL & SHM principles
Date
Msg-id 5418.984261653@nemeton.com.au
Whole thread Raw
In response to Re: WAL & SHM principles  (Martin Devera <devik@cdi.cz>)
Responses Re: WAL & SHM principles  (Martin Devera <devik@cdi.cz>)
List pgsql-hackers
> When you mmap, you don't use write() !  mlock actualy locks page in
> memory and as long as the page is locked the OS doesn't attempt to
> store the dirty page.  It is intended also for security app to
> ensure that sensitive data are not written to unsecure storage
> (hdd). It is definition of mlock so that you can be probably sure
> with it.

News to me ... can you please point to such a definition?  I see no
reference to such semantics in the mlock() manual page in UNIX98
(Single Unix Standard, version 2).

mlock() guarantees that the locked address space is in memory.  This
doesn't imply that updates are not written to the backing file.

I would expect an OS that doesn't have a unified buffer cache but
tries to keep a consistent view for mmap() and read()/write() to
update the file.

Regards,

Giles


pgsql-hackers by date:

Previous
From: Giles Lean
Date:
Subject: Re: Internationalized error messages
Next
From: Bruce Momjian
Date:
Subject: pgtop version 0.1