postgresql/src
Andres Freund 61633f7904 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
2016-10-03 22:11:36 -07:00
..
backend Correct logical decoding restore behaviour for subtransactions. 2016-10-03 22:11:36 -07:00
bin Enforce a specific order for probing library loadability in pg_upgrade. 2016-10-03 10:07:49 -04:00
common Avoid leaking FDs after an fsync failure. 2016-10-02 12:33:46 -04:00
fe_utils Teach appendShellString() to not quote strings containing "-". 2016-09-06 14:53:31 -04:00
include Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables. 2016-10-03 16:40:25 -04:00
interfaces Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Fix misplacement of submake-generated-headers prerequisites. 2016-10-01 13:35:13 -04:00
port Include <sys/select.h> where needed 2016-09-27 01:05:21 -03:00
template Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
test Fix RLS with COPY (col1, col2) FROM tab 2016-10-03 16:22:57 -04:00
timezone Add regression test coverage for non-default timezone abbreviation sets. 2016-09-04 20:02:16 -04:00
tools Convert contrib/hstore_plpython to not use direct linking to other modules. 2016-10-03 22:27:11 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
Makefile.shlib Fix misstatement in comment in Makefile.shlib. 2016-10-01 13:45:16 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00