DROP_LOCATION
Removes the specified storage location. Dropping a storage location is a permanent operation and cannot be undone. Therefore, you must retire a storage location before dropping it.
Syntax
DROP_LOCATION ( 'path' , 'node' )
Parameters
path
|
Specifies where the storage location to drop is mounted. |
node
|
The Vertica node where the location is available. A value of '' (an empty string) means to perform this operation on all nodes. |
Privileges
Superuser
Retiring a Storage Location
Retiring a storage location lets you verify that you do not need the storage before dropping it. You can also restore a retired storage location if you determine it is still in use.
Dropping a Shared Location
When a storage location is created in a shared location, such as HDFS, Vertica creates subdirectories for each node to prevent conflicts. For example, suppose you create a shared storage location in /data. The location for v_vmart_node0001 is /data/v_vmart_node0001, the location for v_vmart_node0002 is /data/v_vmart_node0002, and so on. To drop a location on only one node, use the node-specific path such as /data/v_vmart_node0002. To drop a location on all nodes, use the same path that you used to create it (/data in this example).
Storage Locations with Temp and Data Files
If you use a storage location to store data and then alter it to store only temp files, the location can still contain data files. Vertica does not let you drop a storage location containing data files. You can use the function MOVE_RETIRED_LOCATION_DATA to manually merge out the data files from the storage location, or you can drop partitions. Deleting data files does not work.
Examples
The following example shows how to drop a previously retired storage location on v_vmart_node0003
:
=> SELECT DROP_LOCATION('/data', 'v_vmart_node0003');