Acquire spinlock when updating 2PC slot data during logical decoding creation
Michael Paquier <michael@paquier.xyz>
Acquire spinlock when updating 2PC slot data during logical decoding creation The creation of a logical decoding context in CreateDecodingContext() updates some data of its slot for two-phase transactions if enabled by the caller, but the code forgot to acquire a spinlock when updating these fields like any other code paths. This could lead to the read of inconsistent data. Oversight in a8fd13c. Author: Sawada Masahiko Discussion: https://postgr.es/m/CAD21AoAD8_fp47191LKuecjDd3DYhoQ4TaucFco1_TEr_jQ-Zw@mail.gmail.com Backpatch-through: 15
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/logical/logical.c | modified | +2 −0 |
Discussion
- Spinlock is missing when updating two_phase of ReplicationSlot 4 messages · 2023-01-11 → 2023-01-12