Have CLUSTER advance the table's relfrozenxid. The new frozen point is the
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 18 May 2007 23:19:42 +0000 (23:19 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 18 May 2007 23:19:42 +0000 (23:19 +0000)
commit4147ac7cc11abbe2b2215e590b2b8c0cb6dd1938
tree4829e9d62d7f86c355ccf83fff76f44db4c0d6f1
parent6dce35146adf66f05b6b8366262a9233af1609f8
Have CLUSTER advance the table's relfrozenxid.  The new frozen point is the
FreezeXid introduced in a recent commit, so there isn't any data loss in this
approach.

Doing it causes ALTER TABLE (or rather, the forms of it that cause a full table
rewrite) to be affected as well.  In this case, the frozen point is RecentXmin,
because after the rewrite all the tuples are relabeled with the rewriting
transaction's Xid.

TOAST tables are fixed automatically as well, as fallout of the way they were
already being handled in the respective code paths.

With this patch, there is no longer need to VACUUM tables for Xid wraparound
purposes that have been cleaned up via TRUNCATE or CLUSTER.
src/backend/commands/cluster.c
src/backend/commands/tablecmds.c
src/include/commands/cluster.h