展开阅读全文
直连greenplum segment节点的方法, utility模式 :
使用这种方式,不与其他节点通讯,只操作当前节点。也没有数据分布的概念。
如果使用utility模式连接的是master节点,写入数据时,数据不会分布到segment,使用正常模式连接后,写入master的数据也查不出来。 $ PGOPTIONS='-c gp_session_role=utility' psql -p 40005
psql (8.2.15)
Type "help" for help. postgres=# \dt
List of relations
Schema | Name | Type | Owner | Storage
--------+------+-------+----------+---------
public | t | table | digoal | heap
public | test | table | digoal | heap
(2 rows) postgres=# select * from pg_locks;
locktype | database | relation | page | tuple | transactionid | classid | objid | objsubid | transaction | pid | mode | granted | mppsessionid | mppiswriter | gp_segment_id
---------------+----------+----------+------+-------+---------------+---------+-------+----------+-------------+--------+-----------------+---------+--------------+-------------+---------------
transactionid | | | | | 136604 | | | | 136604 | 130724 | ExclusiveLock | t | 6 | t | -1
relation | 10899 | 10333 | | | | | | | 136604 | 130724 | AccessShareLock | t | 6 | t | -1
(2 rows) 注意使用PGOPTIONS='-c gp_session_role=utility'后,只操作本地节点 $psql -p # master
psql (8.2.15)
Type "help" for help.
postgres=# select count(*) from test;
count
-------
0
(1 row)
postgres=# \q $psql -p 40001 # segment
psql (8.2.15)
Type "help" for help.
postgres=# select count(*) from test;
count
---------
4166801
(1 row)
 
转载自:
 

最新文章

  1. HTML实现简单计算器
  2. C# GUID转换成16位字符串或19位数字并确保唯一
  3. 一种Docker image镜像的取代方案
  4. 【Alpha阶段】第十次Scrum例会
  5. random、面向对象编程
  6. .NET中的字符串你了解多少?
  7. sysfs->sys简单介绍
  8. 119. Pascal's Triangle II
  9. ubuntu安装mysql后不能远程访问的方法
  10. Centos 6安装python3.5
  11. EAN-13 条码(又称GTIN-13 条码)
  12. TableView 多余分割线的处理
  13. Hibernate的Configuration对象的configure()方法
  14. Asp.net core 环境配置
  15. [转]java的异常处理最佳实践
  16. Linux学习笔记8
  17. 01二维矩阵中最大全为1的正方形maxSquare——经典DP问题(二维)
  18. (翻译)Angular 1.3中的验证器管道
  19. 谷歌旗下专业图片编辑Snapseed获重大更新
  20. Java中的内存处理机制和final、static、final static总结

热门文章

  1. 修改织梦DedeCMS投票漏洞
  2. k8s 证书反解
  3. Python 实例代码二
  4. js复制内容到粘贴板
  5. python多线程爬取斗图啦数据
  6. Eclipse下使用Maven创建项目出现的archetype错误,记,转
  7. 笔记 - C#从头开始构建编译器 - 1
  8. 链接标签<a>去掉下划线
  9. CSS重排和重绘
  10. Fortify漏洞之Path Manipulation(路径篡改)