Greenplum 如何直连segment节点
直连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)
Greenplum 如何直连segment节点的更多相关文章
- GreenPlum 大数据平台--segment 失效问题排查
01,segment 检查一: 在master节点上检查失效的segment 正常情况下: :::: gpstate:greenplum01:gpadmin-[INFO]:-Starting gpst ...
- GreenPlum 大数据平台--segment 失效问题恢复《二》(全部segment宕机情况下)
01,情况描述 主Segment和它的镜像都宕掉.导致了greenplum数据库不可用状态 02,重启greenplum数据库 gpstop -r 03,恢复 gprecoverseg 04,状态检查 ...
- GreenPlum 大数据平台--segment 失效问题恢复
1,问题检查 [gpadmin@greenplum01 conf]$ psql -c "select * from gp_segment_configuration where status ...
- Greenplum 调优--查看子节点SQL运行状态
摘自<Greenplum企业应用实战> 重点: 使用gp_dist_random函数,将查询下发到每个Segement 创建查看子节点SQL运行状态视图 1)创建v_active_sql视 ...
- MPP 一、Greenplum 集群安装
Installating and Initializing a Greenplum Database System... 1 安装说明 1.1 环境说明 名称 版本 下载地址 虚拟机 Oracle V ...
- Greenplum failed segment的恢复方法
[前记] Segment检测及故障切换机制GP Master首先会检测Primary状态,如果Primary不可连通,那么将会检测Mirror状态,Primary/Mirror状态总共有4种:1. P ...
- Greenplum failed segment的恢复方法--primary与mirror都可修复
当在使用greenplum过程中有不当的操作时,可能会出现segment节点宕掉的情况(比如在greenplum运行的过程中停掉其中几台segment节点的服务器),通过下面的方法可以恢复segmen ...
- [原]Greenplum failed segment的恢复方法
当在使用greenplum过程中有不当的操作时,可能会出现segment节点宕掉的情况(比如在greenplum运行的过程中停掉其中几台segment节点的服务器),通过下面的方法可以恢复segmen ...
- Greenplum安装
最近需要安装Greenplum测试一些东西,在安装过程中出现了许多问题,所以在这里将安装过程整理一下,主要参考<Greenplum企业应用实践>和http://jxzhfei.blog.5 ...
随机推荐
- shell从简单到脱坑
1.计算1-100的和(seq 1 100 使用反引号括起来的比较坑) #!/bin/bash ` do sum=$[$i+$sum] done echo $sum 2.编写shell脚本,要求输入一 ...
- 作业练习P194,jieba应用,读取,分词,存储,生成词云,排序,保存
import jieba #第一题 txt='Python是最有意思的编程语言' words=jieba.lcut(txt) #精确分词 words_all=jieba.lcut(txt,cut_al ...
- 20191031:Python取反运算详解
20191031:Python取反运算详解 取反运算:~3 == 4 1.对于数字 3 =======>转换为二进制表示为011 2.对011取反为100 3.为什么表示-4 a.计算机用补码表 ...
- 【HC89S003F4开发板】 3串口调试
HC89S003F4开发板串口调试 使用资料自带的demo 主程序 /************************************系统初始化************************ ...
- 使用docker-compose搭建WordPress
今天博主使用typecho各种不爽,索性干掉typecho,使用WordPress 依赖 mysql nginx yml 文件 version: '3' services: nginx: image: ...
- intel ipp6.0安装过程
由于最近看到一个代码中使用了intel ipp6.0库,了解到,ipp6.0是一个很强大的图像处理库,将其与opencv联合使用,还能够加速opencv的处理,在图像处理的过程中,是一个很重要的工具. ...
- 【实战】SQL注入小脚本
1.ORACLE布尔型盲注 import urllib import urllib2 import requests payloads = '_ABCDEFGHIJKLMNOPQRSTUVWXYZ' ...
- 关于lock和synchronized的选择
这里不介绍具体用法,介绍lock和synchronized的不同从而做出选择 1.lock是一个接口,而synchronized是java中的一个关键字,synchronized是内置的语言实现. 2 ...
- zabbix server for Centos 6.3
1.安装LNMP 参照http://lnmp.org/install.html 2.安装zabbix service 2.1下载zabbix,并解压 wget http://nchc.dl.sourc ...
- Python使用xlrd、pandas包从Excel读取数据
#coding=utf-8 # pip install xlrd import xlrd def read_from_xls(filepath,index_col_list): #filepath:读 ...