MAKE_AHM_NOW
Sets the Ancient History Mark (AHM) to the greatest allowable value. This lets you purge all deleted data.
Caution
After running this function, you cannot query historical data that precedes the current epoch. Only database administrators should use this function.MAKE_AHM_NOW
performs the following operations:
-
Advances the epoch.
-
Sets the AHM to the last good epoch (LGE) — at least to the epoch that is current when you execute
MAKE_AHM_NOW
.
This is a meta-function. You must call meta-functions in a top-level SELECT statement.
Behavior type
VolatileSyntax
MAKE_AHM_NOW ( [ true ] )
Parameters
true
- Allows AHM to advance when one of the following conditions is true:
-
One or more nodes are down.
-
One projection is being refreshed from another (retentive refresh).
In both cases , you must supply this argument to
MAKE_AHM_NOW
, otherwise Vertica returns an error. If you executeMAKE_AHM_NOW(true)
during retentive refresh, Vertica rolls back the refresh operation and advances the AHM.Caution
If the function advances AHM beyond the last good epoch of the down nodes, those nodes must recover all data from scratch. -
Privileges
Superuser
Setting AHM when nodes are down
If any node in the cluster is down, you must call MAKE_AHM_NOW
with an argument of true; otherwise, the function returns an error.
Note
This requirement applies only to Enterprise mode; in Eon mode, it is ignored.In the following example, MAKE_AHM_NOW
advances the AHM even though a node is down:
=> SELECT MAKE_AHM_NOW(true);
WARNING: Received no response from v_vmartdb_node0002 in get cluster LGE
WARNING: Received no response from v_vmartdb_node0002 in get cluster LGE
WARNING: Received no response from v_vmartdb_node0002 in set AHM
MAKE_AHM_NOW
------------------------------
AHM set (New AHM Epoch: 684)
(1 row)