Skip to content

Make checkPgAutoFailoverVersion void#949

Merged
DimCitus merged 1 commit intohapostgres:mainfrom
danielgustafsson:dg-check_version
Oct 12, 2022
Merged

Make checkPgAutoFailoverVersion void#949
DimCitus merged 1 commit intohapostgres:mainfrom
danielgustafsson:dg-check_version

Conversation

@danielgustafsson
Copy link
Copy Markdown
Contributor

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.
@DimCitus DimCitus merged commit de5eb89 into hapostgres:main Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants