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

Commit6daeeb1

Browse files
Avoid special XID snapshotConflictHorizon values.
Don't allow VACUUM to WAL-log the value FrozenTransactionId as thesnapshotConflictHorizon of freezing or visibility map related WALrecords.The only special XID value that's an allowable snapshotConflictHorizonis InvalidTransactionId, which is interpreted as "record definitelydoesn't require a recovery conflict".Author: Peter Geoghegan <pg@bowt.ie>Discussion:https://postgr.es/m/CAH2-WznuNGSzF8v6OsgjaC5aYsb3cZ6HW6MLm30X0d65cmSH6A@mail.gmail.com
1 parent1fd3dd2 commit6daeeb1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,8 @@ lazy_scan_prune(LVRelState *vacrel,
16981698
}
16991699

17001700
/* Track newest xmin on page. */
1701-
if (TransactionIdFollows(xmin,prunestate->visibility_cutoff_xid))
1701+
if (TransactionIdFollows(xmin,prunestate->visibility_cutoff_xid)&&
1702+
TransactionIdIsNormal(xmin))
17021703
prunestate->visibility_cutoff_xid=xmin;
17031704
}
17041705
break;
@@ -1863,7 +1864,7 @@ lazy_scan_prune(LVRelState *vacrel,
18631864
* because visibility_cutoff_xid will be logged by our caller in a
18641865
* moment.
18651866
*/
1866-
Assert(cutoff==FrozenTransactionId||
1867+
Assert(!TransactionIdIsValid(cutoff)||
18671868
cutoff==prunestate->visibility_cutoff_xid);
18681869
}
18691870
#endif
@@ -3293,7 +3294,8 @@ heap_page_is_all_visible(LVRelState *vacrel, Buffer buf,
32933294
}
32943295

32953296
/* Track newest xmin on page. */
3296-
if (TransactionIdFollows(xmin,*visibility_cutoff_xid))
3297+
if (TransactionIdFollows(xmin,*visibility_cutoff_xid)&&
3298+
TransactionIdIsNormal(xmin))
32973299
*visibility_cutoff_xid=xmin;
32983300

32993301
/* Check whether this tuple is already frozen or not */

‎src/backend/storage/ipc/standby.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ ResolveRecoveryConflictWithSnapshot(TransactionId snapshotConflictHorizon,
493493
if (!TransactionIdIsValid(snapshotConflictHorizon))
494494
return;
495495

496+
Assert(TransactionIdIsNormal(snapshotConflictHorizon));
496497
backends=GetConflictingVirtualXIDs(snapshotConflictHorizon,
497498
locator.dbOid);
498499
ResolveRecoveryConflictWithVirtualXIDs(backends,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp