@@ -49,7 +49,6 @@ const char *progname = "pg_probackup";
49
49
static parray * backup_files_list = NULL ;
50
50
static parray * index_list = NULL ;
51
51
52
-
53
52
/* We need critical section for datapagemap_add() in case of using threads */
54
53
static pthread_mutex_t backup_pagemap_mutex = PTHREAD_MUTEX_INITIALIZER ;
55
54
@@ -1102,6 +1101,7 @@ do_amcheck(void)
1102
1101
arg -> prev_start_lsn = InvalidXLogRecPtr ;
1103
1102
arg -> backup_conn = NULL ;
1104
1103
arg -> cancel_conn = NULL ;
1104
+ arg -> thread_num = j + 1 ;
1105
1105
/* By default there are some error */
1106
1106
arg -> ret = 1 ;
1107
1107
}
@@ -2659,11 +2659,13 @@ check_indexes(void *arg)
2659
2659
2660
2660
/* check for interrupt */
2661
2661
if (interrupted || thread_interrupted )
2662
- elog (ERROR ,"interrupted during checkdb --amcheck" );
2662
+ elog (ERROR ,"Thread [%d]: interrupted during checkdb --amcheck" ,
2663
+ arguments -> thread_num );
2663
2664
2664
2665
if (progress )
2665
- elog (INFO ,"Progress: (%d/%d). Processing index '%s.%s'" ,
2666
- i + 1 ,n_indexes ,ind -> amcheck_nspname ,ind -> name );
2666
+ elog (INFO ,"Thread [%d]. Progress: (%d/%d). Processing index '%s.%s'" ,
2667
+ arguments -> thread_num ,i + 1 ,n_indexes ,
2668
+ ind -> amcheck_nspname ,ind -> name );
2667
2669
2668
2670
if (arguments -> backup_conn == NULL )
2669
2671
{
@@ -3593,17 +3595,17 @@ amcheck_one_index(backup_files_arg *arguments,
3593
3595
3594
3596
if (PQresultStatus (res )!= PGRES_TUPLES_OK )
3595
3597
{
3596
- elog (WARNING ,"Amcheck failed for index: '%s.%s': %s" ,
3597
- ind -> amcheck_nspname ,
3598
+ elog (WARNING ,"Thread [%d]. Amcheck failed for index: '%s.%s': %s" ,
3599
+ arguments -> thread_num , ind -> amcheck_nspname ,
3598
3600
ind -> name ,PQresultErrorMessage (res ));
3599
3601
3600
3602
pfree (params [0 ]);
3601
3603
PQclear (res );
3602
3604
return false;
3603
3605
}
3604
3606
else
3605
- elog (LOG ,"Amcheck succeeded for index: '%s.%s'" ,
3606
- ind -> amcheck_nspname ,ind -> name );
3607
+ elog (LOG ,"Thread [%d]. Amcheck succeeded for index: '%s.%s'" ,
3608
+ arguments -> thread_num , ind -> amcheck_nspname ,ind -> name );
3607
3609
3608
3610
pfree (params [0 ]);
3609
3611
PQclear (res );