find/change default tablespace
postgres=# show default_tablespace; default_tablespace --------------------
postgresql configurationintermediate
by PostgreSQL
12 views
postgres=# show default_tablespace; default_tablespace --------------------
1234567891011121314151617181920212223242526272829303132
postgres=#
show default_tablespace;
default_tablespace
--------------------
(1 row)
<<<< If output is blank means default is
pg_default
tablespace>>>>>
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)
postgres=#
set default_tablespace=ts_postgres;
SETPlease to add comments
No comments yet. Be the first to comment!