mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-12-13 11:53:59 +02:00
PGPRO-2065: cleanup
This commit is contained in:
parent
340e694462
commit
2022487f3b
31
src/backup.c
31
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)
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user