diff options
author | Robert Haas | 2014-03-12 18:07:41 +0000 |
---|---|---|
committer | Robert Haas | 2014-03-12 18:07:41 +0000 |
commit | 336a578b8c8866490e0d9069f10c17ba14f4705a (patch) | |
tree | 8f1c050ee8857aaf90fb643fac9e9e5a82b708c2 | |
parent | 890194f14d6ff6838d79215b8ba62786185aa9a2 (diff) |
Fix incorrect assertion about historical snapshots.
Also fix some nearby comments.
Andres Freund
-rw-r--r-- | src/backend/utils/time/snapmgr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 4146527d2fd..9802fa7ded7 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -261,9 +261,11 @@ Snapshot GetCatalogSnapshot(Oid relid) { /* - * Return historic snapshot if we're doing logical decoding, but - * return a non-historic, snapshot if we temporarily are doing up2date - * lookups. + * Return historic snapshot while we're doing logical decoding, so we can + * see the appropriate state of the catalog. + * + * This is the primary reason for needing to reset the system caches after + * finishing decoding. */ if (HistoricSnapshotActive()) return HistoricSnapshot; @@ -352,7 +354,7 @@ SetTransactionSnapshot(Snapshot sourcesnap, TransactionId sourcexid) Assert(RegisteredSnapshots == 0); Assert(FirstXactSnapshot == NULL); - Assert(HistoricSnapshotActive()); + Assert(!HistoricSnapshotActive()); /* * Even though we are not going to use the snapshot it computes, we must |