mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
The main change is that now check_connection requires a conninfo parameter, and the connection object has type (PGconn **) so it can be replaced by check_connection if needed. The bug was caused by the fact that the first failure resulted in *conn == NULL, so that subsequent checks of the upstream connection were failing irrespectively of the actual state of the upstream node. Now, when *conn == NULL, check_connection will use conninfo to establish a new connection and place it into *conn. We introduce a new INTERNAL_ERROR code for the case when they are both NULL. In passing, we also reworded a confusing error message, distinguishing a timeout from the actual elapsed time.
1.1 KiB
1.1 KiB