src/backend/replication/logical/reorderbuffer.c
void
ReorderBufferForget(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
{
	ReorderBufferTXN *txn;

	txn = ReorderBufferTXNByXid(rb, xid, false, NULL, InvalidXLogRecPtr,
								false);

	/* unknown, nothing to forget */
	if (txn == NULL)
		return;

	/* cosmetic... */
	txn->final_lsn = lsn;

	/*
	 * Process cache invalidation messages if there are any. Even if we're not
	 * interested in the transaction's contents, it could have manipulated the
	 * catalog and we need to update the caches according to that.
	 */
	if (txn->base_snapshot != NULL && txn->ninvalidations > 0)
		ReorderBufferImmediateInvalidation(rb, txn->ninvalidations,
										   txn->invalidations);
	else
		Assert(txn->ninvalidations == 0);

	/* remove potential on-disk data, and deallocate */
	ReorderBufferCleanupTXN(rb, txn);
}
/*
 * Forget the contents of a transaction if we aren't interested in it's
 * contents. Needs to be first called for subtransactions and then for the
 * toplevel xid.
 *
 * This is significantly different to ReorderBufferAbort() because
 * transactions that have committed need to be treated differenly from aborted
 * ones since they may have modified the catalog.
 *
 * Note that this is only allowed to be called in the moment a transaction
 * commit has just been read, not earlier; otherwise later records referring
 * to this xid might re-create the transaction incompletely.
 */
Forget the contents of a transaction if we aren't interested in it's
contents. Needs to be first called for subtransactions and then for the
toplevel xid.

This is significantly different to ReorderBufferAbort() because
transactions that have committed need to be treated differenly from aborted
ones since they may have modified the catalog.

Note that this is only allowed to be called in the moment a transaction
commit has just been read, not earlier; otherwise later records referring
to this xid might re-create the transaction incompletely.
Forget the contents of a transaction if we aren ' t interested in it ' s contents . Needs to be first called for subtransactions and then for the toplevel xid . This is significantly different to ReorderBufferAbort () because transactions that have committed need to be treated differenly from aborted ones since they may have modified the catalog . Note that this is only allowed to be called in the moment a transaction commit has just been read not earlier ; otherwise later records referring to this xid might re - create the transaction incompletely .
void
ReorderBufferForget(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
{
	ReorderBufferTXN *txn;
	txn = ReorderBufferTXNByXid(rb, xid, false, NULL, InvalidXLogRecPtr,
								false);
	if (txn == NULL)
		return;
	txn->final_lsn = lsn;
	if (txn->base_snapshot != NULL && txn->ninvalidations > 0)
		ReorderBufferImmediateInvalidation(rb, txn->ninvalidations,
										   txn->invalidations);
	else
		Assert(txn->ninvalidations == 0);
	ReorderBufferCleanupTXN(rb, txn);
}
void ReorderBufferForget ( ReorderBuffer * rb , TransactionId xid , XLogRecPtr lsn ) { ReorderBufferTXN * txn ; txn = ReorderBufferTXNByXid ( rb , xid , false , NULL , InvalidXLogRecPtr , false ) ; if ( txn == NULL ) return ; txn -> final_lsn = lsn ; if ( txn -> base_snapshot != NULL && txn -> ninvalidations > 0 ) ReorderBufferImmediateInvalidation ( rb , txn -> ninvalidations , txn -> invalidations ) ; else Assert ( txn -> ninvalidations == 0 ) ; ReorderBufferCleanupTXN ( rb , txn ) ; }
Forget the contents of a transaction if we aren't interested in it's
 contents.
Forget the contents of a transaction if we aren ' t interested in it ' s contents .
/* unknown, nothing to forget */ /* cosmetic... */ /*
	 * Process cache invalidation messages if there are any. Even if we're not
	 * interested in the transaction's contents, it could have manipulated the
	 * catalog and we need to update the caches according to that.
	 */ /* remove potential on-disk data, and deallocate */