From 2022487f3b4ff6d4e053811e5c749f5592b8b1b1 Mon Sep 17 00:00:00 2001 From: Grigory Smolkin Date: Wed, 3 Apr 2019 04:00:36 +0300 Subject: [PATCH] PGPRO-2065: cleanup --- src/backup.c | 31 +++++++++++++++---------------- src/utils/pgut.c | 7 ------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/backup.c b/src/backup.c index f40127f5..109e25d8 100644 --- a/src/backup.c +++ b/src/backup.c @@ -95,7 +95,7 @@ static bool pg_stop_backup_is_sent = false; */ static void backup_cleanup(bool fatal, void *userdata); static void backup_disconnect(bool fatal, void *userdata); -static void threads_conn_disconnect(bool fatal, void *userdata); +//static void threads_conn_disconnect(bool fatal, void *userdata); static void pgdata_basic_setup(void); @@ -2535,21 +2535,20 @@ backup_disconnect(bool fatal, void *userdata) /* * Disconnect checkdb connections created in threads during quit pg_probackup. */ -static void -threads_conn_disconnect(bool fatal, void *userdata) -{ - int i; - - backup_files_arg *arguments = (backup_files_arg *) userdata; - - elog(VERBOSE, "threads_conn_disconnect, num_threads %d", arguments->thread_num); - - if (arguments->backup_conn) - { - pgut_cancel(arguments->backup_conn); - pgut_disconnect(arguments->backup_conn); - } -} +//static void +//threads_conn_disconnect(bool fatal, void *userdata) +//{ +// +// backup_files_arg *arguments = (backup_files_arg *) userdata; +// +// elog(VERBOSE, "threads_conn_disconnect, num_threads %d", arguments->thread_num); +// +// if (arguments->backup_conn) +// { +// pgut_cancel(arguments->backup_conn); +// pgut_disconnect(arguments->backup_conn); +// } +//} static void * check_files(void *arg) diff --git a/src/utils/pgut.c b/src/utils/pgut.c index ae7c3cd6..c262f6a7 100644 --- a/src/utils/pgut.c +++ b/src/utils/pgut.c @@ -365,13 +365,6 @@ pgut_execute_parallel(PGconn* conn, bool text_result, bool ok_error, bool async) { PGresult *res; - int ret = 0; - PGconn *connections[1]; - - struct timeval timeout; - - timeout.tv_sec = 100; - timeout.tv_usec = 200; if (interrupted && !in_cleanup) elog(ERROR, "interrupted");