From: ZhangJulian <jul...@ou...> - 2014-11-14 07:02:25
|
void GTM_WriteRestorePointXid(FILE *f) { if ((MaxGlobalTransactionId - GTMTransactions.gt_nextXid) <= RestoreDuration) GTMTransactions.gt_backedUpXid = GTMTransactions.gt_nextXid + RestoreDuration; else GTMTransactions.gt_backedUpXid = FirstNormalGlobalTransactionId + (RestoreDuration - (MaxGlobalTransactionId - GTMTransactions.gt_nextXid)); elog(LOG, "Saving transaction restoration info, backed-up gxid: %u", GTMTransactions.gt_backedUpXid); fprintf(f, "%u\n", GTMTransactions.gt_backedUpXid); } It seems the operator "<=" in the "if" clause should be ">=", right? |