pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Correct logical decoding restore behaviour for subtransactions. 4+ messages / 1 participants [nested] [flat]
* pgsql: Correct logical decoding restore behaviour for subtransactions. @ 2016-10-04 05:19 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-10-04 05:19 UTC (permalink / raw) To: pgsql-committers Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd subtransaction contents when they were spilled to disk. Move spilling of the remaining in-memory changes to ReorderBufferIterTXNInit(), where it can easily be applied to the top transaction and, if present, subtransactions. Since this code had too many bugs already, noticeably increase test coverage. Fixes: #14319 Reported-By: Huan Ruan Discussion: <20160909012610.20024.58169@wrigleys.postgresql.org> Backport: 9,4-, where logical decoding was added Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/61633f79048d040aefeed68dcac0e0b996a06189 Modified Files -------------- contrib/test_decoding/Makefile | 3 +- contrib/test_decoding/expected/spill.out | 256 ++++++++++++++++++++++++ contrib/test_decoding/sql/spill.sql | 179 +++++++++++++++++ src/backend/replication/logical/reorderbuffer.c | 13 +- 4 files changed, 445 insertions(+), 6 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] 4+ messages in thread
* pgsql: Correct logical decoding restore behaviour for subtransactions. @ 2016-10-04 05:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-10-04 05:20 UTC (permalink / raw) To: pgsql-committers Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd subtransaction contents when they were spilled to disk. Move spilling of the remaining in-memory changes to ReorderBufferIterTXNInit(), where it can easily be applied to the top transaction and, if present, subtransactions. Since this code had too many bugs already, noticeably increase test coverage. Fixes: #14319 Reported-By: Huan Ruan Discussion: <20160909012610.20024.58169@wrigleys.postgresql.org> Backport: 9,4-, where logical decoding was added Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/76c0b73df6c481a29cf6e45bebeafd6d71957f08 Modified Files -------------- contrib/test_decoding/Makefile | 3 +- contrib/test_decoding/expected/spill.out | 256 ++++++++++++++++++++++++ contrib/test_decoding/sql/spill.sql | 179 +++++++++++++++++ src/backend/replication/logical/reorderbuffer.c | 13 +- 4 files changed, 445 insertions(+), 6 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] 4+ messages in thread
* pgsql: Correct logical decoding restore behaviour for subtransactions. @ 2016-10-04 05:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-10-04 05:20 UTC (permalink / raw) To: pgsql-committers Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd subtransaction contents when they were spilled to disk. Move spilling of the remaining in-memory changes to ReorderBufferIterTXNInit(), where it can easily be applied to the top transaction and, if present, subtransactions. Since this code had too many bugs already, noticeably increase test coverage. Fixes: #14319 Reported-By: Huan Ruan Discussion: <20160909012610.20024.58169@wrigleys.postgresql.org> Backport: 9,4-, where logical decoding was added Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/ce603a34a4568e876c0d9c826325d9b12c9e5497 Modified Files -------------- contrib/test_decoding/Makefile | 2 +- contrib/test_decoding/expected/spill.out | 256 ++++++++++++++++++++++++ contrib/test_decoding/sql/spill.sql | 179 +++++++++++++++++ src/backend/replication/logical/reorderbuffer.c | 13 +- 4 files changed, 444 insertions(+), 6 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] 4+ messages in thread
* pgsql: Correct logical decoding restore behaviour for subtransactions. @ 2016-10-04 05:20 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2016-10-04 05:20 UTC (permalink / raw) To: pgsql-committers Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd subtransaction contents when they were spilled to disk. Move spilling of the remaining in-memory changes to ReorderBufferIterTXNInit(), where it can easily be applied to the top transaction and, if present, subtransactions. Since this code had too many bugs already, noticeably increase test coverage. Fixes: #14319 Reported-By: Huan Ruan Discussion: <20160909012610.20024.58169@wrigleys.postgresql.org> Backport: 9,4-, where logical decoding was added Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/07172b20f1a0c4e3a24b0b8f6781de4d2c4866cb Modified Files -------------- contrib/test_decoding/Makefile | 2 +- contrib/test_decoding/expected/spill.out | 256 ++++++++++++++++++++++++ contrib/test_decoding/sql/spill.sql | 179 +++++++++++++++++ src/backend/replication/logical/reorderbuffer.c | 13 +- 4 files changed, 444 insertions(+), 6 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] 4+ messages in thread
end of thread, other threads:[~2016-10-04 05:20 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-10-04 05:19 pgsql: Correct logical decoding restore behaviour for subtransactions. Andres Freund <andres@anarazel.de> 2016-10-04 05:20 pgsql: Correct logical decoding restore behaviour for subtransactions. Andres Freund <andres@anarazel.de> 2016-10-04 05:20 pgsql: Correct logical decoding restore behaviour for subtransactions. Andres Freund <andres@anarazel.de> 2016-10-04 05:20 pgsql: Correct logical decoding restore behaviour for subtransactions. 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