The checkPgAutoFailoverVersion() function was defined having a bool return type, but in practice it could only return true as the error paths were using ereport() which doesn't return. No callers of the function inspected the return value for good reason. Refactor to a void function which better match reality.
While there, also make sure that that fast-exit path is taken before any memory is allocated.
The checkPgAutoFailoverVersion() function was defined having a bool return type, but in practice it could only return true as the error paths were using ereport() which doesn't return. No callers of the function inspected the return value for good reason. Refactor to a void function which better match reality.
While there, also make sure that that fast-exit path is taken before any memory is allocated.