On Tue, Aug 15, 2006 at 02:15:05PM -0500, Jim C. Nasby wrote: > So what causes files to get 'lost' and get stuck in lost+found? > AFAIK that's because the file was written before the metadata. Now, if > fsync'ing a file also ensures that all the metadata is written, then > we're probably fine... if not, then we're at risk every time we create a > new file (every WAL segment if archiving is on, and every time a > relation passes a 1GB boundary). Only if fsync ensures that the data written to disk is ordered, which as far as I know, is not done for ext2. Dirty blocks are written in whatever order is fastest for them to be written, or sequential order, or some order that isn't based on examining the metadata. If my understanding is correct - and I've seen nothing yet to say that it isn't - ext2 is not safe, postgresql xlog or not, fsck or not. It is safer than no postgresql xlog - but there exists windows, however small, where the file system can be corrupted. The need for fsck is due to this problem. If fsck needs to do anything at all, other than replay a journal, the file system is broken. Cheers, mark -- mark@xxxxxxxxx / markm@xxxxxx / markm@xxxxxxxxxx __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/