Subject Re: [firebird-support] Reindex database without backup/restore
Author PenWin
Thanks.

I have a number of beginner questions, if you don't mind:

> The oldest transaction is a transaction in a state other than committed.
> Can be rolled back and the engine wasn't able to undo stuff and do a
> commit or it's in limbo in case of a distributed transaction across two
> ore more databases.

I only use one database, so there shouldn't be any distributed
transaction issues.

I am not sure what you mean by "can be rolled back and the engine wasn't
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??

> Then there is also a gap of ~ 2200 between the oldest active and the
> next transaction, thus you have a transaction, which is still active
> resp. not hard committed or rolled back.

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.

> A sweep, if the oldest transaction didn't get stuck due to a failed two
> phase commit, should make the oldest transaction move forward.
>
> As you have set the sweep interval to 0, automatic sweep is disabled,
> thus you should run a scheduled sweep at low load, e.g. in the night.

I will need to study this sweeping. It's a completely new issue for me,
as I never did it before.

> Hope this helps.

I think it does. First of all I am going to read up on sweeping, to
learn what it is about. Then I'll try it on that slow database and see
what happens.

Thanks,

Pepak