From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
Date: Sun, 06 Mar 2016 02:16:52 +0000
Message-ID: <E1acOFY-0001Zq-Ao@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/a50f50a652779c65607284110bf1046bbe4fb380
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(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
In-Reply-To: <E1acOFY-0001Zq-Ao@gemulon.postgresql.org>
References: <E1acOFY-0001Zq-Ao@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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