mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Fix incorrect assertion about historical snapshots.
Also fix some nearby comments. Andres Freund
This commit is contained in:
parent
890194f14d
commit
336a578b8c
@ -261,9 +261,11 @@ Snapshot
|
|||||||
GetCatalogSnapshot(Oid relid)
|
GetCatalogSnapshot(Oid relid)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Return historic snapshot if we're doing logical decoding, but
|
* Return historic snapshot while we're doing logical decoding, so we can
|
||||||
* return a non-historic, snapshot if we temporarily are doing up2date
|
* see the appropriate state of the catalog.
|
||||||
* lookups.
|
*
|
||||||
|
* This is the primary reason for needing to reset the system caches after
|
||||||
|
* finishing decoding.
|
||||||
*/
|
*/
|
||||||
if (HistoricSnapshotActive())
|
if (HistoricSnapshotActive())
|
||||||
return HistoricSnapshot;
|
return HistoricSnapshot;
|
||||||
@ -352,7 +354,7 @@ SetTransactionSnapshot(Snapshot sourcesnap, TransactionId sourcexid)
|
|||||||
|
|
||||||
Assert(RegisteredSnapshots == 0);
|
Assert(RegisteredSnapshots == 0);
|
||||||
Assert(FirstXactSnapshot == NULL);
|
Assert(FirstXactSnapshot == NULL);
|
||||||
Assert(HistoricSnapshotActive());
|
Assert(!HistoricSnapshotActive());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Even though we are not going to use the snapshot it computes, we must
|
* Even though we are not going to use the snapshot it computes, we must
|
||||||
|
Loading…
Reference in New Issue
Block a user