pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
Дата
Msg-id E1acOFT-0001YS-Op@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
logical decoding: old/newtuple in spooled UPDATE changes was switched around.

Somehow I managed to flip the order of restoring old & new tuples when
de-spooling a change in a large transaction from disk. This happens to
only take effect when a change is spooled to disk which has old/new
versions of the tuple. That only is the case for UPDATEs where he
primary key changed or where replica identity is changed to FULL.

The tests didn't catch this because either spooled updates, or updates
that changed primary keys, were tested; not both at the same time.

Found while adding tests for the following commit.

Backpatch: 9.4, where logical decoding was added

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0bda14d54cf24dedcd2011559a53cc62702e421b

Modified Files
--------------
contrib/test_decoding/expected/ddl.out          | 15 +++++++++++++++
contrib/test_decoding/sql/ddl.sql               | 12 ++++++++++++
src/backend/replication/logical/reorderbuffer.c | 20 ++++++++++----------
3 files changed, 37 insertions(+), 10 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: logical decoding: Fix handling of large old tuples with replica