修复 truncatecsnlog cutoff_xid 过大的问题
Offering: openGaussDev More detail: 修复 truncatecsnlog cutoff_xid 过大的问题 Match-id-70294496a4db845521a52ac94f0a2b6556401c2e
This commit is contained in:
@ -11827,6 +11827,10 @@ void CreateCheckPoint(int flags)
|
||||
if (TransactionIdIsNormal(globalXmin) && TransactionIdPrecedes(globalXmin, cutoff_xid)) {
|
||||
cutoff_xid = globalXmin;
|
||||
}
|
||||
TransactionId oldestXidInUndo = pg_atomic_read_u64(&g_instance.undo_cxt.oldestXidInUndo);
|
||||
if (TransactionIdIsNormal(oldestXidInUndo) && TransactionIdPrecedes(oldestXidInUndo, cutoff_xid)) {
|
||||
cutoff_xid = oldestXidInUndo;
|
||||
}
|
||||
TruncateCSNLOG(cutoff_xid);
|
||||
t_thrd.checkpoint_cxt.last_truncate_log_time = now;
|
||||
}
|
||||
@ -12623,6 +12627,10 @@ bool CreateRestartPoint(int flags)
|
||||
if (TransactionIdIsNormal(globalXmin) && TransactionIdPrecedes(globalXmin, cutoffXid)) {
|
||||
cutoffXid = globalXmin;
|
||||
}
|
||||
TransactionId oldestXidInUndo = pg_atomic_read_u64(&g_instance.undo_cxt.oldestXidInUndo);
|
||||
if (TransactionIdIsNormal(oldestXidInUndo) && TransactionIdPrecedes(oldestXidInUndo, cutoffXid)) {
|
||||
cutoffXid = oldestXidInUndo;
|
||||
}
|
||||
TruncateCSNLOG(cutoffXid);
|
||||
t_thrd.checkpoint_cxt.last_truncate_log_time = now;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user