1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-03-17 21:18:00 +02:00

minor bugfix: close ssh connection when it is not needed

This commit is contained in:
Grigory Smolkin 2019-07-02 20:02:31 +03:00
parent 569144a335
commit 3b7fb5d4ed

View File

@ -534,6 +534,9 @@ do_backup_instance(PGconn *backup_conn)
}
}
/* ssh connection to longer needed */
fio_disconnect();
/* Notify end of backup */
pg_stop_backup(&current, pg_startbackup_conn);
@ -680,6 +683,9 @@ do_backup(time_t start_time, bool no_validate)
*/
check_system_identifiers(backup_conn, instance_config.pgdata);
/* ssh connection to longer needed */
fio_disconnect();
/* below perform checks specific for backup command */
#if PG_VERSION_NUM >= 110000
if (!RetrieveWalSegSize(backup_conn))
@ -2143,6 +2149,9 @@ backup_files(void *arg)
elog(WARNING, "unexpected file type %d", buf.st_mode);
}
/* ssh connection to longer needed */
fio_disconnect();
/* Close connection */
if (arguments->conn_arg.conn)
pgut_disconnect(arguments->conn_arg.conn);