pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Acquire spinlock when updating 2PC slot data during logical deco 2+ messages / 1 participants [nested] [flat]
* pgsql: Acquire spinlock when updating 2PC slot data during logical deco @ 2023-01-12 04:41 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2023-01-12 04:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5ad165d2c024ae2fdc0a5ddd17522d5c92d7aa1a Modified Files -------------- src/backend/replication/logical/logical.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Acquire spinlock when updating 2PC slot data during logical deco @ 2023-01-12 04:41 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2023-01-12 04:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6f25e48774fe9302ca08dae07420df95998d792a Modified Files -------------- src/backend/replication/logical/logical.c | 2 ++ 1 file changed, 2 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-01-12 04:41 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-01-12 04:41 pgsql: Acquire spinlock when updating 2PC slot data during logical deco Michael Paquier <michael@paquier.xyz> 2023-01-12 04:41 pgsql: Acquire spinlock when updating 2PC slot data during logical deco Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox