簡體   English   中英

PostgreSQL的pgpool HA + repmgr

[英]pgpool HA + repmgr for Postgresql 9.6

我正在嘗試在我的postgresql環境(2個postgresql服務器+ 1個pgpool)中配置pgpool來進行HA,而repmgr負責復制。

我在日志中收到下一條消息:

017-12-03 19:27:07: pid 19033: DEBUG:  pool_flush_it: flush size: 0
2017-12-03 19:27:07: pid 19033: DEBUG:  pool_read: read 103 bytes from     backend 1
2017-12-03 19:27:07: pid 19033: ERROR:  failed to authenticate
2017-12-03 19:27:07: pid 19033: DETAIL:  password authentication failed for user "nobody"
2017-12-03 19:27:07: pid 19033: DEBUG:  find_primary_node: no primary node found
2017-12-03 19:27:08: pid 19033: LOG:  find_primary_node: checking backend no 0
2017-12-03 19:27:08: pid 19033: DEBUG:  SSL is requested but SSL support is     not available 
2017-12-03 19:34:27: pid 22132: ERROR:  unable to read data from DB node 1
2017-12-03 19:34:27: pid 22132: DETAIL:  EOF encountered with backend
2017-12-03 19:28:27: pid 19033: DEBUG:  find_primary_node: no primary node found

pool_hba.conf:

TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         all                               trust
host    all         all      127.0.0.1/32             trust
host    all         all      ::1/128                  trust

在postgresql pg_hba.conf中,我啟用了來自pgpool服務器的連接:

####pgpool####
host   all all 172.22.13.170/32 trust

1.可能是什么問題?

2.如果repmgr負責復制,是否應將參數backend_flag設置為'DISALLOW_TO_FAILOVER'?

謝謝。

我只是跟上repmgr和pgpool的步伐,但是我認為這里存在多個問題:

1)您的pgpool.conf具有一些活動檢查的默認設置,並且該用戶的用戶名是'nobody',因此要使其正常工作,您需要創建一個具有該名稱的pgsql用戶,以便pgpool可以查詢所有主機以查找現任碩士。

2)pgpool執行腳本來更改哪個是主服務器等,並且該腳本通常僅在故障轉移時運行repmgr命令以提升新的主服務器,因此我認為不需要DISALLOW_TO_FAILOVER。

如果repmgr將進行故障轉移,那么您的問題1將使pgpool仍然找到哪個新主服務器,但是在那種情況下,我會將repmgr配置為不自動進行故障轉移(因為他們可以為誰應該做些事情而戰。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM