Manually Purging Data
You manually purge deleted data as follows:
- Set the cut-off date for purging deleted data. First, call one of the following functions to verify the current ancient history mark (AHM):
- Set the AHM to the desired cut-off date with one of the following functions:
SET_AHM_TIMEsets the AHM to the epoch that includes the specified TIMESTAMP value on the initiator node.
SET_AHM_EPOCHsets the AHM to the specified epoch.
MAKE_AHM_NOWsets the AHM to the greatest allowable value. This lets you purge all deleted data.
If you call
SET_AHM_TIME, keep in mind that the timestamp you specify is mapped to an epoch, which by default has a three-minute granularity. Thus, if you specify an AHM time of
2008-01-01 00:00:00.00, Vertica might purge data from the first three minutes of 2008, or retain data from last three minutes of 2007.
You cannot advance the AHM beyond a point where Vertica is unable to recover data for a down node.
Purge deleted data from the desired projections with one of the following functions:
PURGEpurges all projections in the physical schema.
PURGE_TABLEpurges all projections anchored to the specified table.
PURGE_PROJECTIONpurges the specified projection.
PURGE_PARTITIONpurges a specified partition.
The tuple mover performs a mergeout operation to purge the data. Vertica periodically invokes the tuple mover to perform mergeout operations, as configured by tuple mover parameters. You can manually invoke the tuple mover by calling the function
Manual purge operations can take a long time.
See Epochs for additional information about how Vertica uses epochs.