Add optional check for unsupported future PostgreSQL releases

This is for backbranches to prevent them running against newer
PostgreSQL versions with which they are not compatible, for example
4.4.x with PostgreSQL 12 and later.
This commit is contained in:
Ian Barwick
2020-02-14 10:39:28 +09:00
parent cb7bbda021
commit b4af80fdec
2 changed files with 46 additions and 1 deletions

View File

@@ -1081,6 +1081,9 @@ _do_create_replication_conf(void)
/* check connection */
source_conn = establish_db_connection_by_params(&source_conninfo, true);
/* Verify that source is a supported server version */
(void) check_server_version(source_conn, "source node", true, NULL);
/* determine node for primary_conninfo */
if (runtime_options.upstream_node_id != UNKNOWN_NODE_ID)