摘要:postgres=# show wal_buffers ;wal_buffers -------------4MB(1 row)postgres=# show port;port ------5432(1 row)postgres=# select name,setting,unit,current... 阅读全文
PostgreSQL 系统表
2015-08-18 09:11 by DataBases, 1188 阅读, 0 推荐, 收藏,
摘要:postgres=# \d pg_class Table "pg_catalog.pg_class" Column | Type | Modifiers ----------------+-----------+-----------relname | name | not nullrelnames... 阅读全文
PostgreSQL环境中查看SQL执行计划示例
2015-08-13 20:18 by DataBases, 1720 阅读, 0 推荐, 收藏,
摘要:explain analyze ,format,buffers,format :TEXT, XML, JSON, or YAML.EXPLAIN (ANALYZE,buffers,format yaml) SELECT first_name FROMcustomer_master WHERE fir... 阅读全文
PostgreSQL两种事务隔离级
2015-08-13 20:16 by DataBases, 1433 阅读, 0 推荐, 收藏,
摘要:PostgreSQL两种事务隔离级别: 读已提交:PostgreSQL中缺省隔离级别。当一个事务运行在这个隔离级别时,一个SELECT查询只能看到查询开始之前提交的数据而永远无法看到未提交的数据或者在查询执行时其它并行的事务提交所做的改变。如果两个事务在对同一元组进行更新,第二个更新事务将等待第一个 阅读全文
PostgreSQL中流复制pg_basebackup做了什么
2015-08-10 21:10 by DataBases, 1498 阅读, 0 推荐, 收藏,
摘要:解压PostgreSQL源代码包后可以到如下路径:postgresql-9.2.4\src\backend\replication下可以看到,basebackup.c,另外还可以看到walreceiver.c,walsender.c.basebackup做了什么一目了然:/*------------... 阅读全文
PostgreSQL 批量生成数据
2015-08-10 17:13 by DataBases, 1273 阅读, 0 推荐, 收藏,
摘要:create table user_info(userid int,name text,birthday date,crt_time timestamp without time zone,);insert into user_info (userid,name,birthday,crt_time)... 阅读全文
PostgreSQL备份与还原
2015-08-10 08:16 by DataBases, 431 阅读, 0 推荐, 收藏,
摘要:物理备份:整个数据库的数据目录及文件做备份;备份整个数据库的文件系统。物理恢复:恢复整个数据库的文静系统。物理备份方法:开启归档select pg_start_backup('backup——tag');打包数据文件(tar);select pg_stop_backup();打包这段时间生成的归档日... 阅读全文
浙公网安备 33010602011771号