Subject Re: [firebird-support] Re: Firebird CS Database Corruption
Author Ann W. Harrison
stevemilner_2000 wrote:
>
> Examples (from the firebird log) of some of the errors when gfix was
> running:
>
> host.domain.net Sat Jun 4 17:48:33 2005
> Database: /var/db/live/storedata.gdb
> Index 4 is corrupt on page 682726 in table ITEM_HISTORY (164)

I think that one is a partially created or partially garbage collected
index item. That's not supposed to happen, but the database is pretty
good about dealing with index entries that don't have corresponding
records - slows everything down, of course, but isn't a sign of serious
corruption. The situation can arise if the database server is shutdown
hard - crashed, or unplugged.
>
> host.domain.net Sat Jun 4 17:50:15 2005
> Database: /var/db/live/storedata.gdb
> Index 10 is corrupt on page 523097 in table PAYMENT (184)

Same think different index. The "10" indicates that it's the tenth
index on the Payment table.
>
> host.domain.net Sat Jun 4 17:50:16 2005
> Database: /var/db/live/storedata.gdb
> Index 10 is corrupt (missing entries) in table PAYMENT (184)

That is more troubling. I'd rebuild that index, though it is possible
that the missing entries correspond to record versions that have been
partially garbage collected...
>
> host.domain.net Sat Jun 4 17:50:19 2005
> Database: /var/db/live/storedata.gdb
> Relation has 61 orphan backversions (0 in use) in table
> PAYMENT (184)

Not a problem. If the server shuts down hard while garbage collection is
in process, it can leave back versions. Careful write requires that the
pointer to the back version be cleared before the back version can be
removed. If the server crashes between those two writes, the back
version becomes an orphan.
>
> host.domain.net Sat Jun 4 17:52:01 2005
> Database: /var/db/live/storedata.gdb
> Page 670001 is an orphan

Also not a problem. When a page is allocated, it must first be removed
from the free list (actually, the state of its bit on the page inventory
page must be changed) before it can be assigned to whatever function
it's going to perform.
>
> I have never seen a wrong page type.

Good, they're very bad.
>
> Could you recommend a good source of reading (ether online or in
> paper) for understanding these better please?

Search IBPhoenix.com for "orphan". I've drizzled on about this before.
>
Regards,


Ann