SET_DATA_COLLECTOR_POLICY

Sets a size restraint (memory and disk space in kilobytes) for the specified Data Collector table on all nodes. If nodes are down, the failed nodes receive the setting when they rejoin the cluster.

You can use this function to set a size restraint only, or you can include the optional interval argument to set disk capacity for both size and time in a single command.

If you specify interval, Vertica enforces the setting that is exceeded first (size or time). Before you include a time restraint, verify that the disk size capacity is sufficiently large.

If you want to specify just a time restraint, or you want to turn off a time restraint you set using this function, see SET_DATA_COLLECTOR_TIME_POLICY().

Syntax

SET_DATA_COLLECTOR_POLICY('component', 'memoryKB', 'diskKB' [,'interval']  )

Parameters

component

Configures the retention policy for the specified component.

memoryKB

Specifies the memory size to retain in kilobytes.

diskKB

Specifies the disk size in kilobytes.

interval
[Default off] Takes an optional interval argument to specify how long to retain the specified component on disk. To disable a time restraint, set interval to -1.

Any negative input turns off the time restraint

Privileges

Superuser

Notes

  • Before you change a retention policy, view its current setting by calling the GET_DATA_COLLECTOR_POLICY() function.
  • If you don't know the name of a component, query the V_MONITOR.DATA_COLLECTOR system table for a list; for example:

    => SELECT DISTINCT component, description FROM data_collector 
       ORDER BY 1 ASC; 

Examples

The following command returns the retention policy for the ResourceAcquisitions component:

=> SELECT get_data_collector_policy('ResourceAcquisitions');          
         get_data_collector_policy
----------------------------------------------
 1000KB kept in memory, 10000KB kept on disk.
(1 row)

This command changes the memory and disk setting for ResourceAcquisitions from its current setting of 1,000 KB memory and 10,000 KB disk space to 1500 KB and 25000 KB, respectively:

=> SELECT set_data_collector_policy('ResourceAcquisitions', '1500', '25000');
 set_data_collector_policy
---------------------------
 SET
(1 row)

This command sets the RequestsIssued component to 1500 KB memory and 11000 KB on disk, and includes a 3-minute time restraint:

=> SELECT set_data_collector_policy('RequestsIssued', '1500', '11000', '3 minutes'::interval);
 set_data_collector_policy
---------------------------
 SET
(1 row)

The following command disables the 3-minute retention policy for the RequestsIssued component, using SET_DATA_COLLECTOR_TIME_POLICY:

=> SELECT set_data_collector_time_policy('RequestsIssued', '-1');
 set_data_collector_time_policy
---------------------------
 SET
(1 row)