mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Remove unnecessary 'restoredFromArchive' global variable.
It might've been useful for debugging purposes, but meh. There's 'readSource' which does almost the same thing. Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/b3b71061-4919-e882-4857-27e370ab134a%40iki.fi
This commit is contained in:
parent
e9f5a0681c
commit
6b16532811
@ -271,9 +271,6 @@ bool InArchiveRecovery = false;
|
|||||||
static bool standby_signal_file_found = false;
|
static bool standby_signal_file_found = false;
|
||||||
static bool recovery_signal_file_found = false;
|
static bool recovery_signal_file_found = false;
|
||||||
|
|
||||||
/* Was the last xlog file restored from archive, or local? */
|
|
||||||
static bool restoredFromArchive = false;
|
|
||||||
|
|
||||||
/* Buffers dedicated to consistency checks of size BLCKSZ */
|
/* Buffers dedicated to consistency checks of size BLCKSZ */
|
||||||
static char *replay_image_masked = NULL;
|
static char *replay_image_masked = NULL;
|
||||||
static char *primary_image_masked = NULL;
|
static char *primary_image_masked = NULL;
|
||||||
@ -3737,18 +3734,16 @@ XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli,
|
|||||||
xlogfname);
|
xlogfname);
|
||||||
set_ps_display(activitymsg);
|
set_ps_display(activitymsg);
|
||||||
|
|
||||||
restoredFromArchive = RestoreArchivedFile(path, xlogfname,
|
if (!RestoreArchivedFile(path, xlogfname,
|
||||||
"RECOVERYXLOG",
|
"RECOVERYXLOG",
|
||||||
wal_segment_size,
|
wal_segment_size,
|
||||||
InRedo);
|
InRedo))
|
||||||
if (!restoredFromArchive)
|
|
||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case XLOG_FROM_PG_WAL:
|
case XLOG_FROM_PG_WAL:
|
||||||
case XLOG_FROM_STREAM:
|
case XLOG_FROM_STREAM:
|
||||||
XLogFilePath(path, tli, segno, wal_segment_size);
|
XLogFilePath(path, tli, segno, wal_segment_size);
|
||||||
restoredFromArchive = false;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user