mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Fix STANDBY FOLLOW to correctly recreate recovery.conf
This commit is contained in:
9
repmgr.c
9
repmgr.c
@@ -1114,6 +1114,13 @@ do_standby_follow(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* set the host and masterport variables with the master ones
|
||||||
|
* before closing the connection because we will need them to
|
||||||
|
* recreate the recovery.conf file
|
||||||
|
*/
|
||||||
|
host = PQhost(master_conn);
|
||||||
|
masterport = PQport(master_conn);
|
||||||
PQfinish(master_conn);
|
PQfinish(master_conn);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
@@ -1134,7 +1141,7 @@ do_standby_follow(void)
|
|||||||
PQclear(res);
|
PQclear(res);
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
|
|
||||||
/* Finally, write the recovery.conf file */
|
/* write the recovery.conf file */
|
||||||
if (!create_recovery_file(data_dir))
|
if (!create_recovery_file(data_dir))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user