blob: afae3febea37b3e44042993f6f8d962459640d22 [file]
---
title: DROP FILESPACE
---
Removes a filespace.
## <a id="topic1__section2"></a>Synopsis
``` pre
DROP FILESPACE [IF EXISTS] <filespacename>
```
## <a id="topic1__section3"></a>Description
`DROP FILESPACE` removes a filespace definition and its system-generated data directories from the system.
A filespace can only be dropped by its owner or a superuser. The filespace must be empty of all tablespace objects before it can be dropped. It is possible that tablespaces in other databases may still be using a filespace even if no tablespaces in the current database are using the filespace.
## <a id="topic1__section4"></a>Parameters
<dt>IF EXISTS </dt>
<dd>Do not throw an error if the filespace does not exist. A notice is issued in this case.</dd>
<dt>\<filespacename> </dt>
<dd>The name of the filespace to remove.</dd>
## <a id="topic1__section5"></a>Examples
Remove the tablespace `myfs`:
``` pre
DROP FILESPACE myfs;
```
## <a id="topic1__section6"></a>Compatibility
There is no `DROP FILESPACE` statement in the SQL standard or in PostgreSQL.
## <a id="topic1__section7"></a>See Also
[DROP TABLESPACE](DROP-TABLESPACE.html), [hawq filespace](../cli/admin_utilities/hawqfilespace.html#topic1)