Altering Location Labels

ALTER_LOCATION_LABEL lets you change the label for a storage location in several ways:

You can perform these operations on individual nodes or cluster-wide.

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.

Adding a Location Label

You add a location label to an unlabled storage location with ALTER_LOCATION_LABEL. For example, unlabled storage location /home/dbadmin/Vertica/SSD is defined on a three-node cluster:

You can label this storage location as SSD on all nodes as follows:

=> SELECT ALTER_LOCATION_LABEL('/home/dbadmin/vertica/SSD', '', 'SSD');

Removing a Location Label

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.

The following statement removes the SSD label from the specified storage location on all nodes:

=> SELECT ALTER_LOCATION_LABEL('/home/dbadmin/SSD/tables','', '');
          ALTER_LOCATION_LABEL          
------------------------------------------
 /home/dbadmin/SSD/tables label changed.
(1 row)

Effects of Altering a Location Label  

Altering a location label has the following effects:

Changing a label from... To... Has this effect:

No name

New label

You can specify the label in a storage policy.

Existing name

New name

You can specify the label in a storage policy. If the existing name is used in a storage policy, you cannot change the label.

Existing name

No name

You cannot use an unlabeled storage in a storage policy. If the existing name is used in a storage policy, you cannot remove the label.