2PC blocks if the transaction manager fails, requiring human intervention to restart. 3PC algorithms (there are several such algorithms) try to fix 2PC by electing a new transaction manager when the original manager fails.
Paxos does not block as long as a majority of processes (managers) are correct. Paxos actually solves the more general problem of consensus, hence, it can be used to implement transaction commit as well. In comparison to 2PC it requires more messages, but it is resilient to manager failures. In comparison to most 3PC algorithms, Paxos renders a simpler, more efficient algorithm (minimal message delay), and has been proved to be correct.
Gray and Lamport compare 2PC and Paxos in an excellent paper titled "Consensus on Transaction Commit".
(In the answer of peter, I think he is mixing 2PC with 2PL (two-phase locking).)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…