venky
venky

Reputation: 1

pgpool failover command issue

After staring two postgres nodes (node 0 primary and node 1) and setting pgpool. Pgpool failover command by default takes node0 as primary. My question is if failover occurs and make node 1 as primary and after some time if failover occurs on node 1 (primary) failover command takes it as standby and skipping failover which causing the cluster without primary and couldn't accept write transactions. Can anyone help me the changes require to make failover command works normal.

pgpool v 4.1 and postgres v 9.6 with replication slots.

Upvotes: 0

Views: 963

Answers (1)

smbennett1974
smbennett1974

Reputation: 361

That is how it works normally:

A PostgreSQL node detached by failover or switch over will never return to the previous state (attached state) automatically in the default setting

Taken from the docs:

https://www.pgpool.net/docs/41/en/html/runtime-config-failover.html

Once you failed over to node 1, you have one node, you have no standby anymore, node 0 could be gone completely. You have work to do recreate it, setup the replication again and add it back into the pool. This might not be much if it was a short network outage, you may be able to make use of the auto_failback features. If the risk of running on only the primary is a big issue and you can't tolerate it, you need more standbys.

I would read the above pgpool documentation using the link and test, test, test.

Upvotes: 2

Related Questions