ALTER_LOCATION_SIZE

Changes the size of the depot location on one node or all of the nodes in a database running in Eon Mode. If you decrease the depot size, Vertica might evict data if necessary to make space available.

You cannot set the depot to use more than 80% of the filesystem that contains it.

Syntax

ALTER_LOCATION_SIZE( path, node‑name, new‑size)

Parameters

path

Where Vertica stores the depot. The type of file system on which the location is based determines the format of this argument.

For depot locations on the Linux file system, path must be an absolute path to the directory where Vertica writes the depot's data.

node‑name

The node on which you want to alter the depot's size.

To alter the depot size of all nodes, pass an empty string. To use this option, all of your nodes must store their depots using the same path.

new‑size

The new size of the depot:

  • integer%: Percentage of total disk space in the filesystem storing the depot.
  • integer{K|M|G|T}: Amount of disk space in kilobytes, megabytes, gigabytes, or terabytes.

Default Value: 60% of the total disk space of the filesystem storing the depot.

Privileges

Superuser

Examples

Change the depot size on all the nodes in the database to 60 gigabytes:

=> SELECT ALTER_LOCATION_SIZE('/home/dbadmin/depot/', '', '60G');
       ALTER_LOCATION_SIZE        
----------------------------------
 /home/dbadmin/depotSize changed.
(1 row)

Change the depot size of one node in the database to 80% of the total disk space of the filesystem that contains the depot:

=> SELECT node_name, location_label, location_path, max_size 
   FROM storage_locations WHERE location_usage = 'DEPOT';
      node_name       | location_label  |                   location_path                    |  max_size
----------------------+-----------------+----------------------------------------------------+-------------
 v_verticadb_node0001 | auto-data-depot | /vertica/data/verticadb/v_verticadb_node0001_depot | 25264737280
 v_verticadb_node0002 | auto-data-depot | /vertica/data/verticadb/v_verticadb_node0002_depot | 25264737280
 v_verticadb_node0003 | auto-data-depot | /vertica/data/verticadb/v_verticadb_node0003_depot | 25264737280
(3 rows)

=> SELECT alter_location_size('/vertica/data/verticadb/v_verticadb_node0001_depot',
                              'v_verticadb_node0001','80%');
                       alter_location_size
-----------------------------------------------------------------
 /vertica/data/verticadb/v_verticadb_node0001_depotSize changed.
(1 row)

=> SELECT node_name, location_label, location_path, max_size 
   FROM storage_locations where location_usage = 'DEPOT';
      node_name       | location_label  |                   location_path                    |  max_size
----------------------+-----------------+----------------------------------------------------+-------------
 v_verticadb_node0001 | auto-data-depot | /vertica/data/verticadb/v_verticadb_node0001_depot | 33686316032
 v_verticadb_node0002 | auto-data-depot | /vertica/data/verticadb/v_verticadb_node0002_depot | 25264737280
 v_verticadb_node0003 | auto-data-depot | /vertica/data/verticadb/v_verticadb_node0003_depot | 25264737280
(3 rows)