Subject Re: is Firebird the good or wrong choice ?
Author hvlad
> i don't know if it's can help you, but find below the content of the firebird.log file AFTER i run a gfix -v -f on the database.
> notice than even with the index corrupted the database seam to work (ie in FB2.5 snapshot), but in fb 2.1, if i don't fix the error it's crash again imediatly after i try to reopen the service...

There are few kind of errors in the log

> Index 2 is corrupt on page 3078003 level 1. File: ..\..\..\src\jrd\validation.cpp, line: 1667
> in table PROPERTY_PICTURE (167)

> Index 2 is corrupt on page 3078003 level 1. File: ..\..\..\src\jrd\validation.cpp, line: 1657
> in table PROPERTY_PICTURE (167)

This two errors mean that inner page of b-tree (page at level 1) have missed some pointers down to the leaf level (level 0) or have its pointers not in the same order as order of linked list of leaf pages.

I reproduced such corruption with your test and i saw that page at level 1 missed down pointer to the leaf level. It is *very* likely because engine was unexpectedly stopped during propagation of just splitted leaf page pointer to the upper level. Unexpected stop happens because of "invalid lock id" error.

I.e. i have great hope that all index corruptions as above will disapear when we fix "invalid lock id" error. And i expect to fix it in the next few days, at least i'll be able to prepare custom build for you.

Note, this is almost all index errors in log, except one below

> Index 10 is corrupt on page 2232271 level 0. File: ..\..\..\src\jrd\validation.cpp, line: 1542
> in table TRANSAC_SEARCH_VAC_1 (307)

This error is different. It mean that keys at index page is in wrong order. I reproduced one time this kind of error on your test and investigating it currently.

> Page 3560946 is an orphan

This kind of errors you should ignore. It have zero impact on database.

Right now i recommend you to remove (or disable) your monitoring code and look what happens. If you strongly need to find slow queries it is much better to use new tracing facilities of FB 2.5 for this purposes.