1DROP TABLESPACE(7)       PostgreSQL 11.6 Documentation      DROP TABLESPACE(7)
2
3
4

NAME

6       DROP_TABLESPACE - remove a tablespace
7

SYNOPSIS

9       DROP TABLESPACE [ IF EXISTS ] name
10

DESCRIPTION

12       DROP TABLESPACE removes a tablespace from the system.
13
14       A tablespace can only be dropped by its owner or a superuser. The
15       tablespace must be empty of all database objects before it can be
16       dropped. It is possible that objects in other databases might still
17       reside in the tablespace even if no objects in the current database are
18       using the tablespace. Also, if the tablespace is listed in the
19       temp_tablespaces setting of any active session, the DROP might fail due
20       to temporary files residing in the tablespace.
21

PARAMETERS

23       IF EXISTS
24           Do not throw an error if the tablespace does not exist. A notice is
25           issued in this case.
26
27       name
28           The name of a tablespace.
29

NOTES

31       DROP TABLESPACE cannot be executed inside a transaction block.
32

EXAMPLES

34       To remove tablespace mystuff from the system:
35
36           DROP TABLESPACE mystuff;
37

COMPATIBILITY

39       DROP TABLESPACE is a PostgreSQL extension.
40

SEE ALSO

42       CREATE TABLESPACE (CREATE_TABLESPACE(7)), ALTER TABLESPACE
43       (ALTER_TABLESPACE(7))
44
45
46
47PostgreSQL 11.6                      2019                   DROP TABLESPACE(7)
Impressum