---
name: "ALTER_TABLESPACE"
section: "7"
platform: "linux"
package: "postgresql"
version: "18.6-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ALTER_TABLESPACE"
---

# ALTER\_TABLESPACE(7)

change the definition of a tablespace

## NAME

ALTER\_TABLESPACE - change the definition of a tablespace

## SYNOPSIS

```
ALTER TABLESPACE name RENAME TO new_name
ALTER TABLESPACE name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER TABLESPACE name SET ( tablespace_option = value [, ... ] )
ALTER TABLESPACE name RESET ( tablespace_option [, ... ] )
```

## DESCRIPTION

**ALTER TABLESPACE** can be used to change the definition of a tablespace.

You must own the tablespace to change the definition of a tablespace. To alter the owner, you must also be able to SET ROLE to the new owning role. (Note that superusers have these privileges automatically.)

## PARAMETERS

*name*

The name of an existing tablespace.

*new\_name*

The new name of the tablespace. The new name cannot begin with pg\_, as such names are reserved for system tablespaces.

*new\_owner*

The new owner of the tablespace.

*tablespace\_option*

A tablespace parameter to be set or reset. Currently, the only available parameters are *seq\_page\_cost*, *random\_page\_cost*, *effective\_io\_concurrency* and *maintenance\_io\_concurrency*. Setting these values for a particular tablespace will override the planner's usual estimate of the cost of reading pages from tables in that tablespace, and how many concurrent I/Os are issued, as established by the configuration parameters of the same name (see seq\_page\_cost, random\_page\_cost, effective\_io\_concurrency, maintenance\_io\_concurrency). This may be useful if one tablespace is located on a disk which is faster or slower than the remainder of the I/O subsystem.

## EXAMPLES

Rename tablespace index\_space to fast\_raid:

```
ALTER TABLESPACE index_space RENAME TO fast_raid;
```

Change the owner of tablespace index\_space:

```
ALTER TABLESPACE index_space OWNER TO mary;
```

## COMPATIBILITY

There is no **ALTER TABLESPACE** statement in the SQL standard.

## SEE ALSO

CREATE TABLESPACE ([**CREATE\_TABLESPACE**(7)](/CREATE_TABLESPACE/7.md)), DROP TABLESPACE ([**DROP\_TABLESPACE**(7)](/DROP_TABLESPACE/7.md))
