Avoid bogus TwoPhaseState locking sequences
Alvaro Herrera <alvherre@alvh.no-ip.org>
Avoid bogus TwoPhaseState locking sequences The optimized code in 728bd991c3c4 contains a few invalid locking sequences. To wit, the original code would try to acquire an lwlock that it already holds. Avoid this by moving lock acquisitions to higher-level code, and install appropriate assertions in low-level that the correct mode is held. Authors: Michael Paquier, Álvaro Herrera Reported-By: chuanting wang Bug: #14680 Discussion: https://postgr.es/m/20170531033228.1487.10124@wrigleys.postgresql.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/twophase.c | modified | +47 −40 |
| src/backend/access/transam/xact.c | modified | +36 −32 |
Discussion
- BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog 30 messages · 2017-05-31 → 2017-06-14