Greg Smith <greg@xxxxxxxxxxxxxxx> writes: > James Mansion wrote: >> When I looked at the internals of TokyoCabinet for example, the design >> was flawed but >> would be 'fairly robust' so long as mmap'd pages that were dirtied did >> not get persisted >> until msync, and were then persisted atomically. > If TokyoCabinet presumes that's true and overwrites existing blocks with > that assumption, it would land onto my list of databases I wouldn't > trust to hold my TODO list. Flip off power to a server, and you have no > idea what portion of the blocks sitting in the drive's cache actually > made it to disk; that's not even guaranteed atomic to the byte level. The other and probably worse problem is that there's no application control over how soon changes to mmap'd pages get to disk. An msync will flush them out, but the kernel is free to write dirty pages sooner. So if they're depending for consistency on writes not happening until msync, it's broken by design. (This is one of the big reasons we don't use mmap'd space for Postgres disk buffers.) regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance