> On Wed, 28 Jun 2000, Robert Graham Merkel wrote:
> > But what if some catastrophic event happens while the modified log
> > file is written to disk?  Couldn't you possibly lose the entire log?
> 
> I think not, but I don't know for sure.  I was thinking that GnuCash
> would open() the log for appending only, and every now and then write a single
> log entry using a single write() call.  What are the chances of a write error
> destroying data earlier in the log?  War stories, anyone?
>   (When chopping off the front of a log, GnuCash would use the same
> write-and-move procedure as it would when saving the database.)

When appending to a file, unless the end of file is exactly aligned
on a physical block boundary, the entire last block must be rewritten.
This puts the (partial) contents of the last block at risk.
Note that physical blocks on modern hard disks are much larger than
the nominal 512 bytes oa 1k that Linux uses internally.

-- hendrik

--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to