pgsql: Acquire spinlock when updating 2PC slot data during logical deco

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Acquire spinlock when updating 2PC slot data during logical deco
Дата
Msg-id E1pFpPH-003EMx-KO@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Revert "Get rid of the "new" and "old" entries in a view's range
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix incorrect comment in hba.h