May 17, 2026, 11:40 PM

This commit is contained in:
Paweł Domański
2026-05-18 06:40:19 +00:00
commit 64944cf004
896 changed files with 310709 additions and 0 deletions
@@ -0,0 +1,36 @@
postgres=# show default_tablespace;
default_tablespace
--------------------
(1 row)
<<<< If output is blank means default is pg_default tablespace>>>>>
--To change the default tablespace at database level:
postgres=# alter system set default_tablespace=ts_postgres;
ALTER SYSTEM
postgres=# select pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
postgres=# show default_tablespace;
default_tablespace
--------------------
ts_postgres
(1 row)
postgres=# SELECT name, setting FROM pg_settings where name='default_tablespace';
name | setting
--------------------+-------------
default_tablespace | ts_postgres
(1 row)
Steps to change default tablespace at session level:
postgres=# set default_tablespace=ts_postgres;
SET