mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-01-09 14:45:47 +02:00
[Issue #346] detect failure of streaming thread
This commit is contained in:
parent
fd73b9ccb6
commit
82af8f35a6
@ -1405,7 +1405,7 @@ wait_wal_lsn(XLogRecPtr target_lsn, bool is_start_lsn, TimeLineID tli,
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
if (interrupted)
|
||||
if (interrupted || thread_interrupted)
|
||||
elog(ERROR, "Interrupted during waiting for WAL %s", in_stream_dir ? "streaming" : "archiving");
|
||||
try_count++;
|
||||
|
||||
|
@ -1851,7 +1851,7 @@ get_checksum_map(const char *fullpath, uint32 checksum_version,
|
||||
if (feof(in))
|
||||
break;
|
||||
|
||||
if (interrupted)
|
||||
if (interrupted || thread_interrupted)
|
||||
elog(ERROR, "Interrupted during page reading");
|
||||
}
|
||||
|
||||
@ -1914,7 +1914,7 @@ get_lsn_map(const char *fullpath, uint32 checksum_version,
|
||||
if (feof(in))
|
||||
break;
|
||||
|
||||
if (interrupted)
|
||||
if (interrupted || thread_interrupted)
|
||||
elog(ERROR, "Interrupted during page reading");
|
||||
}
|
||||
|
||||
|
@ -781,6 +781,8 @@ dir_check_file(pgFile *file, bool backup_logs)
|
||||
* List files in parent->path directory. If "exclude" is true do not add into
|
||||
* "files" files from pgdata_exclude_files and directories from
|
||||
* pgdata_exclude_dir.
|
||||
*
|
||||
* TODO: should we check for interrupt here ?
|
||||
*/
|
||||
static void
|
||||
dir_list_file_internal(parray *files, pgFile *parent, const char *parent_dir,
|
||||
|
@ -233,7 +233,10 @@ StreamLog(void *arg)
|
||||
ctl.mark_done = false;
|
||||
|
||||
if(ReceiveXlogStream(stream_arg->conn, &ctl) == false)
|
||||
{
|
||||
interrupted = true;
|
||||
elog(ERROR, "Problem in receivexlog");
|
||||
}
|
||||
|
||||
#if PG_VERSION_NUM >= 100000
|
||||
if (!ctl.walmethod->finish())
|
||||
@ -245,7 +248,10 @@ StreamLog(void *arg)
|
||||
if(ReceiveXlogStream(stream_arg->conn, stream_arg->startpos, stream_arg->starttli,
|
||||
NULL, (char *) stream_arg->basedir, stop_streaming,
|
||||
standby_message_timeout, NULL, false, false) == false)
|
||||
{
|
||||
interrupted = true;
|
||||
elog(ERROR, "Problem in receivexlog");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* be paranoid and sort xlog_files_list,
|
||||
|
@ -169,7 +169,6 @@ exit_if_necessary(int elevel)
|
||||
{
|
||||
/* Interrupt other possible routines */
|
||||
thread_interrupted = true;
|
||||
interrupted = true;
|
||||
#ifdef WIN32
|
||||
ExitThread(elevel);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user