Creating Postgres tablespaces v23
To create Postgres tablespaces during deployment, define their names and
cluster_vars or a particular
vars in config.yml.
If you define volumes with
volume_for: postgres_tablespace set and a
they will be added as default entries to
The example above would create two tablespaces: explicit (at /some/path) and implicit (at /opt/postgres/tablespaces/implicit/tablespace_data by default, unless you specify a different mountpoint for the volume).
postgres_tablespace volume must have
the tablespace location will be derived from the volume's mountpoint.
Every entry in
postgres_tablespaces must specify a tablespace name (as
the key) and its
location. If you are specifying tablespace locations
explicitly, do not put tablespaces inside PGDATA, and do not use any
volume mountpoint directly as a tablespace location (
confuse some tools into thinking the directory is not empty).
By default, the tablespace
postgres, but you can set it to
any valid username (the users in
will have been created by this time).
Streaming replicas must have the same
postgres_tablespace volumes and
postgres_tablespaces setting as their upstream instance
You can set the default tablespace for a database in