标签:
Q:
I have been trying to make our database clients pro-active about not filling up the partition on which the database they are using resides.
adb=> select * from pg_tablespace; spcname | spcowner | spclocation | spcacl ------------+----------+-------------------+--------------------- pg_default | 10 | | pg_global | 10 | | adb | 2033793 | /database /adb | {adb =C/ adb}
I can‘t see how, from the client, to get the path to where the global tablespace is stored; an empty string is returned for it in the above query.
Unfortunately, we have many legacy systems in the field using a particular database created in the global tablespace, and it would be a monumental effort to get it moved into a user-created tablespace.
pg_default and pg_global locations are "hardcoded".
test=# select setting||‘/base‘ from pg_settings where name=‘data_directory‘;
test=# select setting||‘/global‘ from pg_settings where name=‘data_directory‘;
PostgreSQL: Query for location of global tablespace?
标签:
原文地址:http://www.cnblogs.com/xiaotengyi/p/4703534.html