Skip to main content
Since 0.7.0 Attach a tablespace to a and use it to store s. A tablespace is a directory on the filesystem that allows control over where individual tables and indexes are stored on the filesystem. A common use case is to create a tablespace for a particular storage disk, allowing tables to be stored there. To learn more, see the documentation on tablespaces. can manage a set of tablespaces for each , automatically spreading s across the set of tablespaces attached to a . If a is hash partitioned, tries to place s that belong to the same partition in the same tablespace. Changing the set of tablespaces attached to a may also change the placement behavior. A with no attached tablespaces has its s placed in the database’s default tablespace.

Samples

Attach the tablespace disk1 to the conditions:

Arguments

The syntax is:
Tablespaces need to be created before being attached to a . Once created, tablespaces can be attached to multiple s simultaneously to share the underlying disk storage. Associating a regular table with a tablespace using the TABLESPACE option to CREATE TABLE, prior to calling create_hypertable, has the same effect as calling attach_tablespace immediately following create_hypertable.

Returns

This function returns void.