Re: C-ISAM Corrupted Indexes
Posted in 1991
Tony Heskett (theskett@lhr-sys.ssf-sys.dhl.com) writes:
>
> Just so's I understand this properly, could I ask you to read this ?
>
> We're assuming 4GL and a logged SE DB (C-ISAM) , of course.
>
>
> # SNIP, SNIP
>
> BEGIN WORK
>
> DELETE FROM foo
> WHERE bar > 5>
> IF status < 0 THEN
> LET my_err_flag = 1
> END IF
>
> IF my_err_flag = 0 THEN
>
> DELETE FROM bar
> WHERE foo > 3>
> IF status < 0 THEN
> LET my_err_flag = 1
> END IF
>
> END IF
>
> IF my_err_flag = 1 THEN
> ROLLBACK WORK
> ELSE
> COMMIT WORK
> END IF
>
> # SNIP, SNIP
>
> Okay, so if it goes all the way thru, the checks on status are
> perfectly satisfactory, but if I flick the juice off half way thru
> one of the DELETEs the DB's trashed ?
Yes.
>
> At that point, can one restore the backup and do a rollforward, or
Yes.
> does one lose the log as well ?
Whether you lose the log or not depends upon where you're keeping it -
various trade-offs for file or tape. Your rollforward will go as far
as the last commit work that made it into whatever you have left of the log.
>
> Sounds like the answer might be a UPS, a signal handler around the
> sensitive bits and a strict ban on kill -9's on the backends.
> Shame about the UPS ...
Certainly would help, but would not protect against all kinds of
failures.
Generally, it's important to note that Informix-SE provides only a logical
log, whereas Online provides both logical and physical logs. As you point
out, the only sure way to recover from a crash with SE is to RECOVER
and ROLL FORWARD whereas Online Fast Recovery handles all that automatically.
In the real world, after a crash if there's nothing OBVIOUSLY wrong with
SE (even though undetected corruption may be present), the user is unlikely
to want to go through all the pain of recovery and rollforward (assuming he
isn't sending his logical logs to /dev/null in the first place). This can
lead to BIG recovery problems later, when the corruption is all over your
backups.
- Greg
------------ DHL WORLDWIDE EXPRESS -------------------------------------------
Greg Bryan gbryan@ssf-sys.dhl.com DHL Systems
Data Administrator uunet!ssf-sys.dhl.com!gbryan San Francisco
-------------------------------------------------------------------------------