Subject | Re: [firebird-support] Reindex database without backup/restore |
---|---|
Author | Thomas Steinmaurer |
Post date | 2011-05-17T12:04:15Z |
>>> I am not sure what you mean by "can be rolled back and the engine wasn'tIf you have the possibility to run your application with Firebird 2.5,
>>> able to undo stuff" - how could that possibly happen? I was under the
>>> impression that if I roll back a transaction, all of its changes return
>>> to the state at the beginning of that transaction. Do you really mean
>>> that a rollback might fail??
>>
>> No. A rollback reverts back. Period.
>>
>> What I meant is, that basically a commit is better for transaction
>> statistics, so what the engine tries with a rollback is to undo stuff
>> and then calls commit. The engine isn't able to do that e.g. when
>> working on a larger number of records, e.g. by deleteing records and
>> then calling rollback.
>
> That might be exactly what happened, actually: There is a part of my
> program which involves deletes AND at the same time can cause the server
> to fail due to insufficient memory (on a 32bit system).
>
>>> That is quite possible. While I try to properly close all transactions,
>>> there are simply too many places where they occur (and too many
>>> connections to the same database file, using different access objects)
>>> to be sure that I caught them all.
>>
>> By "close all transaction" I get the impression that you are starting a
>> client transaction explicitely?
>
> Yes. And I have a "rollback on quit" in all my applications.
>
>> Also, watch out AutoCommit transactions, which basically do a commit
>> retaining behind the scene when commiting. Although a commit retain
>> makes changes to concurrent connections/transactions visible, the
>> transaction is still active in sense of the oldest active transaction,
>> thus this value can't move forward.
>
> I don't use autocommit, but I may be using commit retaining. Will check.
you really should try the TraceAPI. Of course - shameless plug - with
our FB TraceManager product.
http://www.upscene.com/products.misc.fbtm.php
This allows you to spot such scenarios VERY easily.
Sorry for the plug.
--
With regards,
Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/
Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!