-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow primary command not fixing postgresql.auto.conf #67
Comments
The sample scripts included in the Pgpool-II package don't use postgresql.auto.conf. If you are using a custom script, you will need to modify it to configure the streaming replication settings. |
I use the sample script only changing the home directory and user name and replication on the postgres level - streaming replication and wanted to do switchover with pcp_promote_node and it works but the cluster misses the wal sender and receiver which is the only thing I have to change manually and restart the standby. I have to change the postgresql.auto.conf on the new standby otherwise it has wrong ip adress in there and the replication doesn't work. But, the variables in the script get set the primary ip address of the new primary correctly. Which is why I don't understand why it ends up like that even more when it doesn't use the autoconf. Thank you |
|
Yes the follow_primary_command is set with the sample, the myrecovery.conf has set up primary_conninfo correctly but that's why I don't know why it puts wrong ip address to the postgresql.auto.conf and destroys the replication. |
Because the sample script doesn't use |
It's on test server where there is only a postgresql and pgpool for testing pgpool, nothing else. |
Pgpool-II doesn't use |
I just changed it when I created the replication by pgbasebackup. I first set up streaming replication in postgres then put pgpool above it. Couldn't the issue lay in pg_rewind ?
|
I think you mean that you created standby using
The follow_primary sample script uses pg_rewind. The problem is that the sample script doesn't use
Alternatively, you need to configure primary_conninfo in the same way as shown in the sample script when you first set up the standby server.
|
Yes. you're right with everything, the thing is, both postgresql.auto.conf are right before i do switchover, but then when I do switchover the old primary has wrong ip in there, even though the variables that you can see in log for example %d, %D are set up right and I don't understand why after the switchover it ends up with wrong one because that makes it so that the new standby(old primary) can't connect, unless i manually change it. |
Because pgpool doesn't change I suggest configuring primary_conninfo in the same way as shown in the sample script when you first set up the standby server.
|
Hello,
I use postgresql 15.6 and pgpool 4.5.2 after changin the home directory and setting up passwordless ssh with failover and followprimary it works well except for the postgresql.auto.conf it uses the wrong ip of the two node cluster when I use pcp_promote_node --switchover
follow_primary_command = '/etc/pgpool-II/follow_primary.sh %d %h %p %D %m %H %M %P %r %R'
After successfully running the node is in waiting state unless I do show pool_nodes and after that it is in pgpool but the replication doesn't work because of the postgresql.auto.conf
Also I try to use pcp.conf but it works only for one user when i try to use pcp_* (any pcp command like pcp_node_info and so on) from different users it returns that the authentication failed even though there are multiple defined in the file pcp.conf and I defined all using this one-liner: echo 'user:'
pg_md5 password
>> /etc/pgpool-II/pcp.conf. How can it work for one user and not for others ?Thank you very much for response
The text was updated successfully, but these errors were encountered: