aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/vacuum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/vacuum.c')
-rw-r--r--src/backend/commands/vacuum.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 6384dc7f1e8..e32e0399f89 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -23,6 +23,7 @@
#include <math.h>
#include "access/clog.h"
+#include "access/commit_ts.h"
#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup_details.h"
@@ -1071,10 +1072,12 @@ vac_truncate_clog(TransactionId frozenXID,
return;
/*
- * Truncate CLOG to the oldest computed value. Note we don't truncate
- * multixacts; that will be done by the next checkpoint.
+ * Truncate CLOG and CommitTs to the oldest computed value.
+ * Note we don't truncate multixacts; that will be done by the next
+ * checkpoint.
*/
TruncateCLOG(frozenXID);
+ TruncateCommitTs(frozenXID);
/*
* Update the wrap limit for GetNewTransactionId and creation of new
@@ -1084,6 +1087,7 @@ vac_truncate_clog(TransactionId frozenXID,
*/
SetTransactionIdLimit(frozenXID, oldestxid_datoid);
SetMultiXactIdLimit(minMulti, minmulti_datoid);
+ AdvanceOldestCommitTs(frozenXID);
}