Hello, All. Either I don't understand something or garbage_collect_idx() doesn't do what it is supposed to do. I use following test case:
create database "g_test"; create table g_test (f integer); create index g_ind on g_test (f); insert into g_test values (1); commit; update g_test set f=2; savepoint a; update g_test set f=3; savepoint b; update g_test set f=4; savepoint c; update g_test set f=5; savepoint d; update g_test set f=6; savepoint e; update g_test set f=7; commit; select * from g_test; With current HEAD server it predictably leaves 6 nodes in G_IND because savepoints are not cleaned up on commit and garbage_collect_idx() is not called. Then I apply following patch to force them being roll forwarded: --- tra.cpp (revision 59297) +++ tra.cpp (working copy) @@ -381,7 +381,15 @@ // Flush pages if transaction logically modified data if (transaction->tra_flags & TRA_write) + { + // Get rid of all savepoints except transaction one + // to let all intermediate garbage after update_in_place in indices and BLOBs to be cleaned up + while (transaction->tra_save_point && !(transaction->tra_save_point->sav_flags & SAV_trans_level)) + { + VIO_verb_cleanup(tdbb, transaction); + } transaction_flush(tdbb, FLUSH_TRAN, transaction->tra_number); + } else if ((transaction->tra_flags & (TRA_prepare2 | TRA_reconnected)) || (sysTran->tra_flags & TRA_write)) { Now garbage_collect_idx() is called ok, but index still contain 5 (not 6 as before) nodes. And I have no idea why. Do you have one?.. -- WBR, SD. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel