postgres 9.6 显示 default_tablespace
postgres 9.6 show default_tablespace
我的 bdd tbs1
上有一个 tablespace,但我想知道默认的 tablespace 是什么。我的问题是显示默认 table space 的命令没有 return 任何东西:
postgres=# show default_tablespace ;
default_tablespace
--------------------
(1 row)
postgres=#
当我尝试显示所有 tablespaces 时:
postgres=# \db+
List of tablespaces
Name | Owner | Location | Access privileges | Options | Size | Description
------------+----------+-----------------------------------------+-------------------+---------+----------+-------------
pg_default | postgres | | | | 326 MB |
pg_global | postgres | | | | 1241 kB |
tbs1 | fdu | ... | | | 553 MB |
(3 rows)
如果 show default_tablespace
命令没有 return 任何东西,这是否意味着默认 tablespace 是 pg_default
?
谢谢
是的,默认情况下 pg_default
是默认表空间。
您可以使用 default_tablespace
参数或通过更改您所连接的数据库的表空间来更改默认值。
请注意,在 99% 的 PostgreSQL 安装中,您不需要定义表空间。
我的 bdd tbs1
上有一个 tablespace,但我想知道默认的 tablespace 是什么。我的问题是显示默认 table space 的命令没有 return 任何东西:
postgres=# show default_tablespace ;
default_tablespace
--------------------
(1 row)
postgres=#
当我尝试显示所有 tablespaces 时:
postgres=# \db+
List of tablespaces
Name | Owner | Location | Access privileges | Options | Size | Description
------------+----------+-----------------------------------------+-------------------+---------+----------+-------------
pg_default | postgres | | | | 326 MB |
pg_global | postgres | | | | 1241 kB |
tbs1 | fdu | ... | | | 553 MB |
(3 rows)
如果 show default_tablespace
命令没有 return 任何东西,这是否意味着默认 tablespace 是 pg_default
?
谢谢
是的,默认情况下 pg_default
是默认表空间。
您可以使用 default_tablespace
参数或通过更改您所连接的数据库的表空间来更改默认值。
请注意,在 99% 的 PostgreSQL 安装中,您不需要定义表空间。