diff options
Diffstat (limited to 'src/backend/access/table/tableam.c')
-rw-r--r-- | src/backend/access/table/tableam.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/access/table/tableam.c b/src/backend/access/table/tableam.c index 3afb63b1fe4..c6383197657 100644 --- a/src/backend/access/table/tableam.c +++ b/src/backend/access/table/tableam.c @@ -249,6 +249,14 @@ table_tuple_get_latest_tid(TableScanDesc scan, ItemPointer tid) const TableAmRoutine *tableam = rel->rd_tableam; /* + * We don't expect direct calls to table_tuple_get_latest_tid with valid + * CheckXidAlive for catalog or regular tables. See detailed comments in + * xact.c where these variables are declared. + */ + if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan)) + elog(ERROR, "unexpected table_tuple_get_latest_tid call during logical decoding"); + + /* * Since this can be called with user-supplied TID, don't trust the input * too much. */ |