Re: Raw partitions / cooked files
Posted in 1993
kevinc writes: |> Dave Kosenko writes: |> >............................... not to mention those of integrity (a |> >successful |> >return from a write() does not guarantee that the data is on disk when a |> >cooked |> >file is used; the data could be sitting in a Unix buffer, which can |> >result in |> >data loss if a crash occurs before that buffer is flushed to disk). |> |> Not true. LOGICAL LOG writes are synced writes if the log resides on a |> block special device (filesystem file). This is all the matters. That is only true if the o/s provides *guaranteed* synced writes. We do open all chunks with O_SYNC, but even still this is not 100% reliable across all platforms. |> |> If there happen to be 400 modified buffers in Online's Cache at the |> moment of failure, what's the difference? Data Consistency is not an issue |> of FS vs Character Special files...yeah I know, the indirection of tbpgcl |> flushing without sync to a filesystem file may catch non-synced Online |> buffers |> in the Unix cache at the time of failure, but it doesn't matter. |> |> Fast-recovery goes back the the last successfull checkpoint before the |> failure and reapplies ALL COMMITTED transactions AND rollsback those that |> didn't make it to commit. And therein lies the problem. If a committed transaction never makes it to disk because it was sitting in a Unix buffer waiting to be flushed when the system crashes (unbuffered logging cannot protect against Unix buffering), then the potential is there for a committed transaction that the application considers to be complete to be lost from the database. While the integrity of the reclaimed transactions is ok, the lost transactions can be a big problem for many applications (not all transactions can be recreated if they are lost). Dave Disclaimer: These opinions are not those of Informix Software, Inc. ************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney