pg_tablespace — PostgreSQL system catalog

The PostgreSQL pg_tablespace system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

The catalog pg_tablespace stores information about the available tablespaces. Tables can be placed in particular tablespaces to aid administration of disk layout.

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_tablespace system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • oid oid
    Row identifier
  • spcname name
    Tablespace name
  • spcowner oid references pg_authid.oid
    Owner of the tablespace, usually the user who created it
  • spcacl aclitem[]
    Access privileges; see ddl_priv for details
  • spcoptions text[]
    Tablespace-level options, as “keyword=value” strings

Related catalogs

This object references the following other system catalogs:

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_tablespace.