timescaledb/src/tablespace.h
Erik Nordström 6e92383592 Add function to detach tablespaces from hypertables
Tablespaces can now be detached from hypertables using
`tablespace_detach()`. This function can either detach
a tablespace from all tables or only a specific table.

Having the ability to detach tablespace allows more
advanced storage management, for instance, one can detach
tablespaces that are running low on diskspace while attaching
new ones to replace the old ones.
2017-12-09 18:27:50 +01:00

26 lines
632 B
C

#ifndef TIMESCALEDB_TABLESPACE_H
#define TIMESCALEDB_TABLESPACE_H
#include <postgres.h>
#include "catalog.h"
typedef struct Tablespace
{
FormData_tablespace fd;
Oid tablespace_oid;
} Tablespace;
typedef struct Tablespaces
{
int capacity;
int num_tablespaces;
Tablespace *tablespaces;
} Tablespaces;
extern Tablespace *tablespaces_add(Tablespaces *tablespaces, FormData_tablespace *form, Oid tspc_oid);
extern bool tablespaces_delete(Tablespaces *tspcs, Oid tspc_oid);
extern int tablespaces_clear(Tablespaces *tspcs);
extern Tablespaces *tablespace_scan(int32 hypertable_id);
#endif /* TIMESCALEDB_TABLESPACE_H */