切换前,一个主版本和一个备份版本: openGauss 3:
-------------------------------------------------------------------------------
[omm@db11150 ~]$ gs_om –t status –detail
[ Cluster state ]
cluster_state :Normal
redistributing :No
current_az :AZ_ALL
[ Datanode State ]
node node_ip port instance state
1 db1115 10.4.11.150 15400 6001 /my/openGauss/data/dn P Primary Normal
2 db1115 10.4.10.150 15400 6002 /my/openGauss/data/dn S Standby Normal
-------------------------------------------------------------------------------切换:在备用机器上执行:omm@dn 10150 ~$ gs_ctl切换-D /my/openGauss/data/dn/ omm@dn 10150 ~$ gs_om -t刷新,切换后检查状态,显示错误
-------------------------------------------------------------------------------
[omm@db10150 ~]$ gs_om –t status –detail
[ Cluste State ]
cluster_state :Normal
redistributing :No
current_az :AZ_ALL
[ Datanode State ]
node node_ip port instance state
1 db1115 10.4.11.150 15400 6001 /my/openGauss/data/dn S Standby Normal
2 db1115 10.4.10.150 15400 6002 /my/openGauss/data/dn P Primary Normal
-------------------------------------------------------------------------------执行the gs_checkperf命令还会报告错误:无法在只读事务中执行删除架构。
-------------------------------------------------------------------------------
[omm@db10150 ~]$ gs_checkperf –I pmk –U omm
[GAUSS-51300]:Failed to execute SQL:gsql –d postgres –p 15400 –X –c “drop schema pmk cascade;”.Error:
ERROR: cannot execute DROP SCHEMA in a read-only transaction
-------------------------------------------------------------------------------发布于 2022-09-05 08:48:51
这个显示是正常的,命令的执行报告了一个错误,但是当前的数据库处于只读状态,应该是磁盘空间已经达到阈值,看看这个。
其他: 1、gs_checkperf openGauss提供gs_checkperf工具来帮助处理openGauss级别(主机CPU使用率、高斯CPU使用率、I/O使用率等)、节点级(CPU使用、内存使用、I/O使用)、会话/处理级别(CPU使用、内存使用、I/O使用)和SSD性能(写、读性能),以便用户能够理解openGauss的负载并采取相应的改进措施。
2 openGauss先决条件:、正常运行,不以只读模式运行.在数据库之上运行的企业运行良好。
https://stackoverflow.com/questions/73439990
复制相似问题