The transaction backout problem arises in the area of distributed databases. Suppose failures partition a data-redundant distributed database, and each partition continues to function as if it were the entire database. When the network is reconnected, the transactions executed by different partitions may not be serializable, and hence it may be necessary to backout some of the transactions. The transaction backout problem is to remove the smallest set of transactions that will leave the remaining ones serializable. The general problem is NP-complete, and in this paper we show that the special case of a fixed-size database and two partitions can be solved in polynomial time by dynamic programming.