]> git.ipfire.org Git - thirdparty/postgresql.git/commit
logical decoding: old/newtuple in spooled UPDATE changes was switched around.
authorAndres Freund <andres@anarazel.de>
Sun, 6 Mar 2016 02:02:20 +0000 (18:02 -0800)
committerAndres Freund <andres@anarazel.de>
Sun, 6 Mar 2016 02:02:20 +0000 (18:02 -0800)
commita50f50a652779c65607284110bf1046bbe4fb380
tree3fefd3f8c35b32c21a360d90bf731c2526679c02
parent465dd92d98e42233df8bce6fbe8c90a65853536b
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
contrib/test_decoding/expected/ddl.out
contrib/test_decoding/sql/ddl.sql
src/backend/replication/logical/reorderbuffer.c