On Thu, Oct 2, 2008 at 12:05 PM, Aidan Van Dyk <[EMAIL PROTECTED]> wrote: > How does your current "write" strategy handle this situation. I mean, > how do you currently guarnetee that between when you call write() and > the kernel copies the buffer internally, no hint-bit are updated?
Working on the exact double-buffering technique now. > #define write(fd, buf, count) buffer_crc_write(fd, buf, count) I certainly wouldn't interpose the write() call itself; that's just asking for trouble. > whatever protection you have on the regular write is sufficient. The > time of the protection will need to start before the "buffer" period > instead of just the write, (and maybe not the write syscall anymore) but > with CPU caches and speed, the buffer period should be <= the time of > the write() syscall... Your fsync is your "on disk guarentee", not the > write, and that won't change. Agreed. > But I thought you didn't really care about hint-bit updates, even in the > current strategy... but I'm fully ignorant about the code, sorry... The current implementation does not take it into account. -- Jonah H. Harris, Senior DBA myYearbook.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers