On Wednesday 2013-05-01 20:52, Claudio Freire wrote:
That means, in systems that have the adequate firmware, the journal will import the "last messages" your system produced before rebooting due to crash, straight from the dead..spooky :-)
Don't think I don't understand how the system works, because I've read the source. I've written patches for postgres (not upstreamed yet), so I kinda know a little bit about this stuff. Let me tell you.
When you mmap files,[...] it's also quite out of your control how writes happen in the end.[...] Pages you dirtied 30 minutes ago can still be unwritten[...] You tell it [the kernel] to [flush] with msync. [...] But msync flushes everything. And, again, in no particular order. If there's a crash, or a power outage, you don't know which pages have been written and which haven't. Postgres and most reasonably reliable databases you mention will have a WAL to make sure pages are written in the right order, and no torn pages appear. The WAL is a file opened in sync I/O mode. It's slow, but safe.[...] with memory mapped I/O, you have no way to force a specific write order.
You can have order with mmap. In fact, OpenLDAP developer Howard Chu presented the inner workings of a new MDB backend last year at LinuxCon Europe. mdb is all about mmap and uses COW with 2 snapshots {current,previous} at any time,[1,2] ensuring reliability whilst keeping speed. [1] www.openldap.org/pub/hyc/mdm-paper.pdf [2] www.openldap.org/pub/hyc/mdm-slides.pdf -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org