Add version check if replication slot usage requested

Replication slots require 9.4 or greater
This commit is contained in:
Ian Barwick
2015-02-02 22:16:04 +09:00
parent 7a760c32ff
commit 49debcdf92
2 changed files with 71 additions and 21 deletions

View File

@@ -1362,10 +1362,10 @@ do_primary_failover(void)
if(local_options.use_replication_slots)
{
if(create_replication_slot(new_primary_conn, local_options.slot_name) == false)
if(create_replication_slot(new_primary_conn, node_info.slot_name) == false)
{
log_err(_("Unable to create slot '%s' on the primary node: %s\n"),
local_options.slot_name,
node_info.slot_name,
PQerrorMessage(new_primary_conn));
PQfinish(new_primary_conn);
terminate(ERR_DB_QUERY);