diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index e002d0c1368..6eb29b99735 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -212,16 +212,12 @@ Snapshot GetTransactionSnapshot(void) { /* - * Return historic snapshot if doing logical decoding. We'll never need a - * non-historic transaction snapshot in this (sub-)transaction, so there's - * no need to be careful to set one up for later calls to - * GetTransactionSnapshot(). + * This should not be called while doing logical decoding. Historic + * snapshots are only usable for catalog access, not for general-purpose + * queries. */ if (HistoricSnapshotActive()) - { - Assert(!FirstSnapshotSet); - return HistoricSnapshot; - } + elog(ERROR, "cannot take query snapshot during logical decoding"); /* First call in transaction? */ if (!FirstSnapshotSet)