diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml
index 339990f..a44a7f9 100644
--- a/doc/src/sgml/ref/cluster.sgml
+++ b/doc/src/sgml/ref/cluster.sgml
@@ -172,6 +172,12 @@ CLUSTER [VERBOSE]
are periodically reclustered.
+
+ The CLUSTER command also perform freezing of eligible
+ tuples during its operation, this may reduce the need for a subsequent
+ VACUUM FREEZE on the table.
+
+
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index f6a5bfe..8e867ea 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -177,7 +177,7 @@ cluster(ClusterStmt *stmt, bool isTopLevel)
heap_close(rel, NoLock);
/* Do the job */
- cluster_rel(tableOid, indexOid, false, stmt->verbose, -1, -1);
+ cluster_rel(tableOid, indexOid, false, stmt->verbose, 0, 0);
}
else
{
@@ -227,7 +227,7 @@ cluster(ClusterStmt *stmt, bool isTopLevel)
/* functions in indexes may want a snapshot set */
PushActiveSnapshot(GetTransactionSnapshot());
cluster_rel(rvtc->tableOid, rvtc->indexOid, true, stmt->verbose,
- -1, -1);
+ 0, 0);
PopActiveSnapshot();
CommitTransactionCommand();
}
@@ -852,11 +852,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
else
*pSwapToastByContent = false;
- /*
- * compute xids used to freeze and weed out dead tuples. We use -1
- * freeze_min_age to avoid having CLUSTER freeze tuples earlier than a
- * plain VACUUM would.
- */
+ /* compute xids used to freeze and weed out dead tuples. */
vacuum_set_xid_limits(freeze_min_age, freeze_table_age,
OldHeap->rd_rel->relisshared,
&OldestXmin, &FreezeXid, NULL, &MultiXactCutoff);