Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit336a578

Browse files
committed
Fix incorrect assertion about historical snapshots.
Also fix some nearby comments.Andres Freund
1 parent890194f commit336a578

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/utils/time/snapmgr.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,11 @@ Snapshot
261261
GetCatalogSnapshot(Oidrelid)
262262
{
263263
/*
264-
* Return historic snapshot if we're doing logical decoding, but
265-
* return a non-historic, snapshot if we temporarily are doing up2date
266-
* lookups.
264+
* Return historic snapshot while we're doing logical decoding, so we can
265+
* see the appropriate state of the catalog.
266+
*
267+
* This is the primary reason for needing to reset the system caches after
268+
* finishing decoding.
267269
*/
268270
if (HistoricSnapshotActive())
269271
returnHistoricSnapshot;
@@ -352,7 +354,7 @@ SetTransactionSnapshot(Snapshot sourcesnap, TransactionId sourcexid)
352354

353355
Assert(RegisteredSnapshots==0);
354356
Assert(FirstXactSnapshot==NULL);
355-
Assert(HistoricSnapshotActive());
357+
Assert(!HistoricSnapshotActive());
356358

357359
/*
358360
* Even though we are not going to use the snapshot it computes, we must

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp