文章目錄
- 環境
- BUG/漏洞編碼
- 癥狀
- 觸發條件
- 解決方案
環境
系統平臺:UOS (飛騰)
版本:4.5.8
BUG/漏洞編碼
3043
癥狀
BUG安裝包: hgdb-see-4.5.8-db43858.aarch64.rpm
異常:hac集群一主兩備環境,開啟hgproxy和審計功能后,進行集群主備切換操作。切換過程持續近5分鐘,主庫方可切換到備節點上,其中未參與切換(原主與新主外的備節點)的備庫無法拉起,持續restarting狀態很長時間后start failed。
[root@tianxingao ~]# hghactl switchover see_cluster
Current cluster topology
+ Cluster: see_cluster --------+--------+---------+----+-----------+
| Member | Host | Role | State | TL | Lag in MB |
+--------+---------------------+--------+---------+----+-----------+
| hg_01 | x.x.66.135:5866 |Replica | running | 12 | 0 |
| hg_02 | x.x.66.135:5866 |Leader | running | 12 | |
| hg_03 | x.x.66.135:5866 |Replica | running | 12 | 0 |
+--------+---------------------+--------+---------+----+-----------+
Primary [hg_02]:
candidate ['hg_0l', "hg_03'] []: hg_01
When should the switchover take place (e.g, 2023-09-26T18:24 ) [now]:
Are you sure you want to switchover cluster see cluster, demoting current leader hg_02? [y/N]: y
Switchover failed, details: 503,Switchover status unknown
數據庫日志報錯:
2023-09-26 20:29:32.CST,,,6512ceac,1a1f6,3."",2023-09-26 20:29:32 CST,,0,PANTC,XX000,"cannot wait without a PGPROC structure".........""
觸發條件
開啟審計功能后執行集群切換主節點操作即可復現。
解決方案
1、臨時解決方案:關閉審計功能,修改審計參數后需要重啟集群。
[root@tianxingao hghac]# psql highgo syssao
Password for user syssao: highgo=> select set_audit_param('hg_audit','off');set_audit_param
---------------------------------set configuration successfully.
(1 row)highgo=> \q[root@tianxingao hghac]# hghactl restart see_cluster
2、永久解決方案
解決此問題的安裝包:hgdb-see-4.5.8-6954d9f.aarch64.rpm
重新安裝修復此問題的新版本數據庫包可解決。