Type: | string |
Context: | user |
Restart: | false |
This variable specifies the default tablespace in which to create objects (tables and indexes) when a CREATE command does not explicitly specify a tablespace. It also determines the tablespace that a partitioned relation will direct future partitions to.
The value is either the name of a tablespace, or an empty string to specify using the default tablespace of the current database. If the value does not match the name of any existing tablespace, PostgreSQL will automatically use the default tablespace of the current database. If a nondefault tablespace is specified, the user must have CREATE
privilege for it, or creation attempts will fail.
This variable is not used for temporary tables; for them, temp_tablespaces is consulted instead.
This variable is also not used when creating databases. By default, a new database inherits its tablespace setting from the template database it is copied from.
For more information on tablespaces, see manage-ag-tablespaces.
Recommendations
On StackOverflow
- postgres 9.6 show default_tablespace
- can I force usage of specific tablespace for singe pg_restore task?
- How to set up django with a postgres database in a specific tablespace?
- Create tablespace in postgresql and set is to it is the default for all newly created databases
- postgresql create table default schema