In Greenplum Database, there must be a file system location defined for the master, each primary
segment, and each mirror segment in order for the tablespace to have a location to store its
objects across an entire Greenplum system. This collection of file system locations is
defined in a filespace object. A filespace must be defined before you can create a
tablespace. See gpfilespace in the Greenplum Database Utility Guide
for more information.

Parameters

tablespacename

The name of a tablespace to be created. The name cannot begin with pg_ or
gp_, as such names are reserved for system tablespaces.

OWNER username

The name of the user who will own the tablespace. If omitted, defaults
to the user executing the command. Only superusers may create tablespaces,
but they can assign ownership of tablespaces to non-superusers.

FILESPACE

The name of a Greenplum Database filespace that was defined using
the gpfilespace management utility.

Notes

You must first create a filespace to be used by the tablespace. See gpfilespace
in the Greenplum Database Utility Guide for more information.

Tablespaces are only supported on systems that support symbolic links.

CREATE TABLESPACE cannot be executed inside a transaction
block.

Examples

Create a new tablespace by specifying the corresponding filespace to
use: