pg_index】的更多相关文章

PG CREATEINDEX CONCURRENTLY [TOC] 官方说法 根据9.1的文档 Creating an index can interfere with regular operation of a database. Normally PostgreSQL locks the table to be indexed against writes and performs the entire index build with a single scan of the table…
最近在折腾greenplum,遇到一个蛋疼的问题,那就是获取表结构,也就是建表语句.大家都知道在MySQL里面是非常easy的,show create table table_name 就搞定了,在gpdb里面就没这么容易,在查询大量资料以后终于找到了方法.那就是自己定义一个函数去获取,函数中可以嵌套python代码,非常的方便.但是资料中的代码有大量错误,在经过几番调试以后终于可以使用了. 如果没有这个函数其实也可以获取表结构,那就是只能导出这个表的结构进行查看了.导出表结构的命令是: pg_…
pgstatspack [root@test01 soft]# wget http://pgfoundry.org/frs/download.php/3151/pgstatspack_version_2.3.1.tar.gz --2016-06-12 21:16:11--  http://pgfoundry.org/frs/download.php/3151/pgstatspack_version_2.3.1.tar.gz Resolving pgfoundry.org... 188.227.1…
The auto_explain module provides a means for logging execution plans of slow statements automatically, without having to run EXPLAIN by hand. This is especially helpful for tracking down un-optimized queries in large applications. https://www.postgre…
The System Catalogs of PostgreSQLscott=# \dS List of relations Schema | Name | Type | Owner ------------+---------------------------------+----------+---------- pg_catalog | pg_aggregate | table | postgres pg_catalog | pg_am | table | postgres pg_cat…
PostgreSQL9.1.0 upgrade to PostgreSQL9.5rc1 安装PG9.1端口为5432 [pgup@minion1 pg]$ ls postgresql-9.1.0.tar.bz2  postgresql-9.5rc1.tar.bz2 [pgup@minion1 pg]$ tar jxvf postgresql-9.1.0.tar.bz2 [pgup@minion1 pg]$ cd postgresql-9.1.0 [pgup@minion1 postgresql-…
PostgreSQL 使用客户机/服务器(C/S)的模式提供服务,一个PostgreSQL会话由下列相关的进程(程序)组成: (1)一个服务器端进程.该进程管理数据库文件,接受客户端与数据库的连接,且代表客户端对数据库进行操作.该进程的程序名叫做 postgres. (2)前端应用,即需要进行数据库操作的客户端应用.客户端应用可能本身就是多种多样的:它们可以是一个字符界  面的工具, 也可以是一个图形界面的应用,或者是一个通过访问数据库来显示网页的 web 服务器,或者是一个特殊的数据库管理工具…
The bucardo project has released its nagios plugins for PostgreSQL and we can extract from them this nice view in order to check for table and index bloatinto our PostgreSQL databases: 下面是检查表空间的使用情况的脚本: CREATE OR REPLACE VIEW bloat AS SELECT schemana…
Introduction ------------ The Heap Only Tuple (HOT) feature eliminates redundant index entries and allows the re-use of space taken by DELETEd or obsoleted UPDATEd tuples without performing a table-wide vacuum. It does this by allowing single-page va…
After loooong pause, adding next (well, second) post to the “series“. This time, I'd like to describe how logging works. And I don't mean binary logging (WAL), but the log for us, humans, to read. Before I will go to the postgresql.conf options, let…