0

I have three servers. One is running pgpool, another two in master-slave mode streaming replication. When installing pgpool, I was suggested to install the pgpool_regclass on my database servers as well. There's no problem installing it in the master node, but when I tried to do the same in the slave, I got error ERROR: cannot execute CREATE EXTENSION in a read-only transaction.

I think it's because the slave is a hot standby, and SELECT pg_is_in_recovery(); returns true. So I wonder am I supposed to install pgpool_regclass on the slave or not. It seems not, but pgpool doc says I should install it on every database pgpool is going to access.

4

1 回答 1

0

我找到了原因。删除recovery.conf从库中的文件,然后运行pgpool_regclass​​. 否则,从机处于恢复模式,无法执行写命令。

于 2016-02-10T00:16:44.577 回答