A temporary file containing a list of tablespace mappings

The tablespace_map file is a temporary file containling a list of tablespace OID to tablespace file system path mappings.

tablespace_map is present from PostgreSQL 9.5.


If this file is present in a server's data directory, it will be read on server start and the requisite tablespace symlinks (re)created; the file will be renamed to tablespace_map.old.

A tablespace_map is returned by pg_stop_backup() (PostgreSQL 15 and later: pg_backup_stop()).

Change history


Example tablespace_map file:

16384 /var/lib/pgsql/tblspc_dir1
16385 /var/lib/pgsql/tblspc_dir2


Replication, Tablespaces

See also

tablespace, pg_basebackup