In today’s article, we will discuss how to change the default Tablespace in PostgreSQL. If you do not specify a different Tablespace when creating objects, PostgreSQL will, by default, create them in the pg_default Tablespace.
If you want to change this, you can use the following parameter.
After connecting to Postgresql;
SET default_tablespace= createdTableSpaceName;
Ex:
1 | SET default_tablespace =d1_t1 |