pgsql: Have CLUSTER advance the table's relfrozenxid. - Mailing list pgsql-committers

From alvherre@postgresql.org (Alvaro Herrera)
Subject pgsql: Have CLUSTER advance the table's relfrozenxid.
Date
Msg-id 20070518231942.30A0F9FB6EA@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/commands:
        cluster.c (r1.160 -> r1.161)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/cluster.c.diff?r1=1.160&r2=1.161)
        tablecmds.c (r1.224 -> r1.225)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.224&r2=1.225)
    pgsql/src/include/commands:
        cluster.h (r1.32 -> r1.33)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/cluster.h.diff?r1=1.32&r2=1.33)

pgsql-committers by date:

Previous
From: petere@postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Mark some intermediate targets as .PRECIOUS, to replace the
Next
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Fix dumb compile error in the last patch.