anchor.diff:              %% outstanding txids to trigger a delete of the items.
       end;
   
  -%% generated by on(?register_TP) via msg_delay to not increase memory
  -%% footprint
  -on({tx_tm_rtm_delete_txid, TxId}, State) ->
  -    ?TRACE("tx_tm_rtm:on({delete_txid, ...}) ~n", []),
  -    %% Debug diagnostics and output:
  -    %%     {Status, Entry} = get_tx_entry(TxId, State),
  -    %%     case Status of
  -    %%         new -> ok; %% already deleted
  -    %%         uninitialized ->
  -    %%             %% @TODO inform delayed tps that they missed something?
  -    %%             %% See info in hold back queue.
  -    %%             io:format("Deleting an txid with hold back messages.~n~p~n",
  -    %%                       [tx_state_get_hold_back(Entry)]);
  -    %%         ok ->
  -    %%             io:format("Oops, this should have been cleaned normally.~n")
  -    %%     end,
  -    pdb:delete(TxId, state_get_tablename(State)),
  -    State;
  -
  -%% generated by on(learner_decide) via msg_delay to not increase memory
  -%% footprint
  -on({tx_tm_rtm_delete_itemid, TxItemId}, State) ->
  -    ?TRACE("tx_tm_rtm:on({delete_itemid, ...}) ~n", []),
  -    %% Debug diagnostics and output:
  -    %% {Status, Entry} = get_item_entry(TxItemId, State),
  -    %% case Status of
  -    %%     new -> ok; %% already deleted
  -    %%     uninitialized ->
  -    %% %%             %% @TODO inform delayed learners that they missed something?
  -    %%             %% See info in hold back queue.
  -    %%         io:format("Deleting an item with hold back massages.~n~p~n",
  -    %%                   [tx_item_get_hold_back(Entry)]);
  -    %%     ok ->
  -    %%         io:format("Oops, this should have been cleaned normally.~n")
  -    %% end,
  -    pdb:delete(TxItemId, state_get_tablename(State)),
  -    State;
  -
   %% sent by init_RTMs
   on({?tx_tm_rtm_init_RTM, TxState, ItemStates, _InRole} = _Msg, State) ->
      ?TRACE("tx_tm_rtm:on({init_RTM, ...}) ~n", []),
  
positive.code:             %% io:format("Holding back a registerTP for id ~p in ~p~n", [Tid, Role]),
              T2TxState = tx_state_hold_back(Msg, TmpTxState),
              NewTxState = tx_state_set_status(T2TxState, uninitialized),
  %%            msg_delay:send_local((config:read(tx_timeout) * 3) div 1000, self(),
   %%                                {tx_tm_rtm_delete_txid, Tid}),
              set_entry(NewTxState, State);
          false -> %% ok
              TxState = tx_state_inc_numtpsregistered(TmpTxState),
  
negative.code:     case ErrCode of
          new -> ok; %% already finished, nothing to be done
          uninitialized ->
              %% can happen when already cleaned up at tm
              ok;
          ok ->
              %% This tx is a bit slow. Start fds on the participants
              %% and then take over on crash messages.  When not enough
  