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 daa7de1cd0
commit 1460e6400a
2 changed files with 46 additions and 1 deletions

View File

@@ -1000,6 +1000,9 @@ _do_create_recovery_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)