CLEAN_COMMUNAL_STORAGE

Marks for deletion invalid data in communal storage, often data that leaked due to an event where Vertica cleanup mechanisms failed.

Eon Mode only

Marks for deletion invalid data in communal storage, often data that leaked due to an event where Vertica cleanup mechanisms failed. Events that require calling this function include:

  • Node failure

  • Interrupted migration of an Enterprise database to Eon

  • Restoring objects from backup

If your database has multiple communal storage locations, the function scans all the communal locations for invalid data.

This is a meta-function. You must call meta-functions in a top-level SELECT statement.

Behavior type

Volatile

Syntax

CLEAN_COMMUNAL_STORAGE ( ['actually-delete'] )

Parameters

actually-delete
BOOLEAN, specifies whether to queue data files for deletion:
  • true: Add files to the reaper queue and return immediately. The queued files are removed automatically by the reaper service, or can be removed manually by calling FLUSH_REAPER_QUEUE.

  • false (default): Report information about extra files but do not queue them for deletion.

Privileges

Superuser

Examples

The invalid data files are queued for deletion.

=> SELECT CLEAN_COMMUNAL_STORAGE('true');
CLEAN_COMMUNAL_STORAGE
------------------------------------------------------------------
CLEAN COMMUNAL STORAGE
Total leaked files: 9265
Files have been queued for deletion.
Check communal_cleanup_records for more information.
(1 row)

The information of the invalid data files is listed but are not queued for deletion.

=> SELECT CLEAN_COMMUNAL_STORAGE();
CLEAN_COMMUNAL_STORAGE
------------------------------------------------------------------
CLEAN COMMUNAL STORAGE
Total leaked files: 726313
Files have not been queued for deletion.
Run clean_communal_storage('true') to queue files for deletion.
Check communal_cleanup_records for more information.
(1 row)