Manual and automatic pruning of the history table.