postgresql/src
Andres Freund d9e903f3cb logical decoding: Tell reorderbuffer about all xids.
Logical decoding's reorderbuffer keeps transactions in an LSN ordered
list for efficiency. To make that's efficiently possible upper-level
xids are forced to be logged before nested subtransaction xids.  That
only works though if these records are all looked at: Unfortunately we
didn't do so for e.g. row level locks, which are otherwise uninteresting
for logical decoding.

This could lead to errors like:
"ERROR: subxact logged without previous toplevel record".

It's not sufficient to just look at row locking records, the xid could
appear first due to a lot of other types of records (which will trigger
the transaction to be marked logged with MarkCurrentTransactionIdLoggedIfAny).
So invent infrastructure to tell reorderbuffer about xids seen, when
they'd otherwise not pass through reorderbuffer.c.

Reported-By: Jarred Ward
Bug: #13844
Discussion: 20160105033249.1087.66040@wrigleys.postgresql.org
Backpatch: 9.4, where logical decoding was added
2016-03-05 18:02:20 -08:00
..
backend logical decoding: Tell reorderbuffer about all xids. 2016-03-05 18:02:20 -08:00
bin Expose control file data via SQL accessible functions. 2016-03-05 11:10:19 -08:00
common Expose control file data via SQL accessible functions. 2016-03-05 11:10:19 -08:00
include logical decoding: Tell reorderbuffer about all xids. 2016-03-05 18:02:20 -08:00
interfaces Fix incorrect comment. 2016-03-01 13:31:44 -05:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Add prefix to pl/pgsql global variables and functions 2016-03-03 10:45:59 +01:00
port Add new system view, pg_config 2016-02-17 09:12:06 -08:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Make stats regression test robust in the face of parallel query. 2016-03-04 16:20:49 -05:00
timezone Update time zone data files to tzdata release 2016a. 2016-02-05 10:59:09 -05:00
tools Expose control file data via SQL accessible functions. 2016-03-05 11:10:19 -08: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 Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:26 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00