postgres/contrib/test_decoding
Andres Freund 6e759cefe8 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
..
expected logical decoding: Tell reorderbuffer about all xids. 2016-03-05 18:02:20 -08:00
specs Force synchronous_commit=on in test_decoding's concurrent_ddl_dml.spec. 2016-03-03 17:22:25 -08:00
sql logical decoding: Tell reorderbuffer about all xids. 2016-03-05 18:02:20 -08:00
.gitignore test_decoding: Update .gitignore 2014-03-31 14:18:35 -04:00
logical.conf Introduce logical decoding. 2014-03-03 16:32:18 -05:00
Makefile logical decoding: Tell reorderbuffer about all xids. 2016-03-05 18:02:20 -08:00
test_decoding.c Fix test_decoding's handling of nonexistant columns in old tuple versions. 2015-06-27 19:00:45 +02:00