如何知道Postgresql表空间是什么?
栏目: 数据库 · PostgreSQL · 发布时间: 7年前
内容简介:我创建了一个名为indexes的新表空间,我试图删除旧的表空间indexes_old,它用来包含一些表和索引.当我尝试删除表空间时,我得到:但是,当我尝试看看那里有什么,似乎没有表生活在该表空间中:那么那个表空间是什么阻止我放弃它呢?
我创建了一个名为indexes的新表空间,我试图删除旧的表空间indexes_old,它用来包含一些表和索引.当我尝试删除表空间时,我得到:
=> drop tablespace indexes_old; ERROR: tablespace "indexes_old" is not empty
但是,当我尝试看看那里有什么,似乎没有表生活在该表空间中:
=> select * from pg_tables where tablespace = 'indexes_old'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers ------------+-----------+------------+------------+------------+----------+------------- (0 rows) => select * from pg_indexes where tablespace = 'indexes_old'; schemaname | tablename | indexname | tablespace | indexdef ------------+-----------+-----------+------------+---------- (0 rows)
那么那个表空间是什么阻止我放弃它呢?
如果重要,我刚刚使用pg_upgrade工具从Pg 8.4迁移到Pg 9.0.
表空间如下所示:
Name | Owner | Location | Access privileges | Description -------------+----------+-----------------+-------------------+------------- indexes | nobody | /data/pgindex90 | | indexes_old | nobody | /data/pgindex84 | |
并且/ data / pgindex84的内容包括所有旧的8.4索引,加上pg_upgrade自动创建的新的9.0索引
# sudo ls -al /data/pgindex84/PG_9.0_201008051/11874 total 8280 drwx------ 2 postgres postgres 4096 Feb 9 14:58 . drwx------ 3 postgres postgres 4096 Feb 11 09:28 .. -rw------- 1 postgres postgres 40960 Feb 9 14:58 10462602 -rw------- 1 postgres postgres 40960 Feb 9 14:58 10462604 -rw------- 1 postgres postgres 4644864 Feb 9 14:58 10462614 -rw------- 1 postgres postgres 3727360 Feb 9 14:58 10462616
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Python Data Structures and Algorithms
Benjamin Baka / Packt Publishing / 2017-5-30 / USD 44.99
Key Features A step by step guide, which will provide you with a thorough discussion on the analysis and design of fundamental Python data structures.Get a better understanding of advanced Python c......一起来看看 《Python Data Structures and Algorithms》 这本书的介绍吧!
Base64 编码/解码
Base64 编码/解码
HSV CMYK 转换工具
HSV CMYK互换工具