How to Set a purge policy:
- The
preferred method for purging data is to establish a policy that determines
which deleted data is eligible to be purged.
Eligible data is automatically purged when the Tuple Mover performs mergeout operations.
- Two methods
for determining when deleted data is eligible to be purged:
- Specifying the time for which
delete data is saved
- Specifying the number of epochs that are saved
- Specifying the time for which delete data is saved is the preferred method for determining which deleted data can be purged.
To change the specified time
for saving deleted data, use the HistoryRetentionTime configuration
parameter:
=> ALTER DATABASE mydb SET
HistoryRetentionTime = {seconds | -1};
In the above syntax:
- seconds is the amount of time (in seconds) for which to save deleted data.
- -1 indicates that you do not want to use the HistoryRetentionTime configuration parameter to determine which deleted data is eligible to be purged. Use this setting if you prefer to use the other method (HistoryRetentionEpochs) for determining which deleted data can be purged.
Unless you have a reason to limit the number of
epochs, HP recommends that you specify the time over which delete data is
saved.
- To specify the number of historical epoch to save through the HistoryRetentionEpochs configuration parameter:
Turn off the HistoryRetentionTime configuration
parameter:
=> ALTER DATABASE mydb SET
HistoryRetentionTime = -1;
Set the history epoch retention level through
the HistoryRetentionEpochs configuration parameter:
=> ALTER DATABASE mydb SET
HistoryRetentionEpochs = {num_epochs |
-1};
In above Syntax
- num_epochs is the number of historical epochs to save.
- -1 indicates that you do not want to use the HistoryRetentionEpochs configuration parameter to trim historical epochs from the epoch map. By default, HistoryRetentionEpochs is set to -1.
If
both HistoryRetentionTime and HistoryRetentionEpochs are
specified, HistoryRetentionTime takes
precedence.
- If you want to preserve all historical data, set the value of both historical epoch retention parameters to -1, as follows:
=> ALTER DABABASE mydb SET HistoryRetentionTime =
-1;
=> ALTER DATABASE mydb SET
HistoryRetentionEpochs = -1;
No comments:
Post a Comment