暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
openGauss 2.0 企业版 HA 主备切换及启停测试.pdf
332
14页
4次
2022-11-02
5墨值下载
一、HA状态检查
1.1 状态检查
-- 查看各节点状态
[root@opengauss-node1 ~]# su - omm
Last login: Wed Nov 2 13:24:08 CST 2022 on pts/2
[omm@opengauss-node1 ~]$
[omm@opengauss-node1 ~]$ gs_om -t status --detail
[omm@opengauss-node1 ~]$ gs_om -t status -h opengauss-node1
[omm@opengauss-node1 ~]$ gs_om -t status -h opengauss-node2
1
2
3
4
5
6
7
shlei6067
1.2 信息查看
# omm 用户
-- 登陆数据库
[omm@opengauss-node1 ~]$ gsql -d postgres -p 26000
gsql ((openGauss 2.0.0 build 78689da9) compiled at 2021-03-31 21:04:03
commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-
security)
Type "help" for help.
-- 查看版本
postgres=# select version();   
-- 查看对应PG版本
postgres=# show server_version;
1
2
3
4
5
6
7
8
9
10
11
12
shlei6067
1.3 主备数据验证
-- 节点一
[omm@opengauss-node1 ~]$ gsql -d postgres -p 26000
postgres=# create table pgtb1 (id int,name text);
postgres-# \d+ pgtb1  #查看表结构
postgres=# insert into pgtb1 (id,name) values(1,'Jacky');
postgres=# select * from pgtb1;
-- 节点二
[omm@opengauss-node2 ~]$ gsql -d postgres -p 26000
postgres=# select * from pgtb1;
postgres=# insert into pgtb1 (id,name) values(2,'DBA');  # 提示备库只有只读权
1
2
3
4
5
6
7
8
9
10
11
shlei6067
of 14
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。