dav*_*100 8 postgresql tablespace postgresql-9.2
我在redhat 6上使用postgres 9.2
这应该很简单但我无法在任何地方找到它.我正在寻找存储postgres表空间位置的数据库表和列,我认为它将在PG_TABLESPACE中,但是
select * from pg_tablespace
Run Code Online (Sandbox Code Playgroud)
显示...
postgres=# select * from pg_tablespace;
spcname | spcowner | spcacl | spcoptions
-----------------+----------+--------+------------
pg_default | 10 | |
pg_global | 10 | |
C_TBL_DB91SABIR | 10 | |
(3 rows)
Run Code Online (Sandbox Code Playgroud)
但没有位置,任何保留位置的想法?
谢谢
Viv*_* S. 18
使用pg_tablespace_location(tablespace_oid)(PostgreSQL 9.2+)获取文件系统所在的路径tablespace.
你会得到oid的tablespace从pg_tablespace,所以查询应该是
select spcname
,pg_tablespace_location(oid)
from pg_tablespace;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13714 次 |
| 最近记录: |