ALTER_LOCATION_LABEL
Adds a label to a storage location, or changes or removes an existing label.
Adds a label to a storage location, or changes or removes an existing label. You can change a location label if it is not specified by any storage policy.
Caution
If you label an existing storage location that already contains data, and then include the labeled location in one or more storage policies, existing data could be moved. If the Tuple Mover determines data stored on a labeled location does not comply with a storage policy, it moves the data elsewhere.This is a meta-function. You must call meta-functions in a top-level SELECT statement.
Behavior type
VolatileSyntax
ALTER_LOCATION_LABEL ( 'path' , '[node]' , '[location-label]' )
Parameters
path
- The storage location path.
node
- The node where the label change is applied. If you supply an empty string, Vertica applies the change across all cluster nodes.
location-label
- The label to assign to the specified storage location. If you supply an empty string, Vertica removes that storage location's label.
Privileges
Superuser
Restrictions
You can remove a location label only if both of these conditions are true:
-
The label is not specified in the storage policy of a database object.
-
The labeled location is not the last available storage for the objects associated with it.
Examples
The following ALTER_LOCATION_LABEL
statement applies across all cluster nodes the label SSD
to the storage location /home/dbadmin/SSD/tables
:
=> SELECT ALTER_LOCATION_LABEL('/home/dbadmin/SSD/tables','', 'SSD');
ALTER_LOCATION_LABEL
---------------------------------------
/home/dbadmin/SSD/tables label changed.
(1 row)