> On Wed, 7 May 2014 09:38:16 +0300, "Vlad Khorsun" wrote:
>>> This leads me to the questions:
>>> 1) When are prepared or rolled back transactions removed from 
>>> RDB$TRANSACTIONS? Or are they kept indefinitely?
>> 
>>     Its never removed. And i see no problem with it. 

    I was a bit wrong - when distributed transaction is *committed* by 
connection 
which started it *and* if there was provided information about all participants 
(i.e.
there is description record) - in this case engine automatically deletes record 
in 
RDB$TRANSACTION.

    In other cases (rollback by original connection, no description or 
commit\rollback 
after reconnect) - record is not deleted. I think it is necessary to allow 
transaction 
manager to handle local sub-transaction again, if necessary (if recover attempt 
failed 
at another node, for example)
 
> I assume it doesn't survive a backup/restore cycle, otherwise we have a
> problem with duplicate transaction ids ;)

    Exactly :)

 
>>> 2) Is there an alternative to removing this information?
>> 
>>     I see no big need to clean up RDB$TRANSACTIONS. If we really want,
> we
>>     can
>> make sweep to take care about it - to delete entires which is older than
>> new OIT.
>> But again, i see no real needs to do it.
> 
> I am trying to understand why Jaybird deletes the entry. It looks like it
> is doing it, because in a recovery situation it retrieves *all*
> transactions listed in RDB$TRANSACTIONS and iterates over it to match the
> Xid used on prepare to find the right transaction id. This works fine when
> the number of transactions is small, but is probably not a good idea when
> there is a large number of transactions.

    gfix lists in-limbo transactions using isc_database_info('isc_info_limbo') 
call.
It doesn't query RDB$TRANSACTIONS for the list, only for the descriptions.

Regards,
Vlad


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to