mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Refactor server version detection
Most of the time we can simply get the version number directly from the connection handle. Previously it was held in a global variable, which was an icky way of doing things. In a few special cases we also need the actual version string, which is obtained directly from the database.
This commit is contained in:
@@ -372,12 +372,6 @@ main(int argc, char **argv)
|
||||
/* abort if local node not available at startup */
|
||||
local_conn = establish_db_connection(config_file_options.conninfo, true);
|
||||
|
||||
/*
|
||||
* store the server version number - we'll need this to generate
|
||||
* version-dependent queries etc.
|
||||
*/
|
||||
server_version_num = get_server_version(local_conn, NULL);
|
||||
|
||||
/*
|
||||
* sanity checks
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user