pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
3+ messages / 1 participants
[nested] [flat]

* pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
@ 2016-03-06 02:16  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2016-03-06 02:16 UTC (permalink / raw)
  To: 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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
@ 2016-03-06 02:16  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2016-03-06 02:16 UTC (permalink / raw)
  To: 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
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e76e365be9e7fc30f19d21962461a0046d15ea5d

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


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi
@ 2016-03-06 02:16  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2016-03-06 02:16 UTC (permalink / raw)
  To: 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
------
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


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-03-06 02:16 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-06 02:16 pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi Andres Freund <andres@anarazel.de>
2016-03-06 02:16 pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi Andres Freund <andres@anarazel.de>
2016-03-06 02:16 pgsql: logical decoding: old/newtuple in spooled UPDATE changes was swi Andres Freund <andres@anarazel.de>

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