Re: BUFFERED LOGGING: Is it safe??
Posted in 1995
> I'm trying to decide whether to use buffered or unbuffered logging > for a customer's database. The engine is Online 5.02.UC6. > > The Online Administrator's Guide says that "if you use buffered logging > and a failure occurs, you could lose more than just the current > transaction. In return for this risk, performance during alterations is > slightly improved." Does this mean that buffered logging carries with it > the risk that the fast-recovery mechanism might not be able to restore the > database to a consistent state in the event of a failure, or does it merely > mean that more transactions might be rolled back than otherwise would be? > > In other words, could buffered logging compromise the integrity of the > database in the event of a failure? > > Thanks in advance ... > -- > ______________________________________________________________________________ > Steve Chell steve@nezsdc.fujitsu.co.nz > Fujitsu NZ Ltd, Auckland, New Zealand FAX: +64.9.3564851 There is always the possibility of a compromise of integrity in the event of a failure. With buffered logging you may lose more logical log records (those associated with committed transactions) because the engine stores more of them in memory. This is done to allow the user to get on with his work, and to keep him from having to wait on the disk. With unbuffered logging the engine only keeps one transaction at a time in memory, and each user must wait for that one to be written to the logical logs (on disk) before he can do anything more. You still stand to lose that one transaction in the event of a failure even using unbuffered logging, which could leave your data in an inconsistant state. Buffered logging does carry the risk of the recovery mechanism not being able to restore. It does not mean that the engine would roll back more transactions, the engine would not know about them at all. No matter how far back you push the risk, by archives, logical logs, buffered logs, and backup data files, it's always there. You must judge whether the risks justify the costs, and where your break-even point lies. I'd choose unbuffered logging (as the Admin Guide suggests), and then change it as a last-ditch tuning option if the performance was not acceptable. Have fun, __________________________________________________________________ | Clem Akins Standard Disclaimers Apply | |Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" | | Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com | |________________________________________________________________|