Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6b16532

Browse files
committed
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
1 parent e9f5a06 commit 6b16532

File tree

1 file changed

+4
-9
lines changed
  • src/backend/access/transam

1 file changed

+4
-9
lines changed

src/backend/access/transam/xlog.c

+4-9
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,6 @@ bool InArchiveRecovery = false;
271271
static bool standby_signal_file_found = false;
272272
static bool recovery_signal_file_found = false;
273273

274-
/* Was the last xlog file restored from archive, or local? */
275-
static bool restoredFromArchive = false;
276-
277274
/* Buffers dedicated to consistency checks of size BLCKSZ */
278275
static char *replay_image_masked = NULL;
279276
static char *primary_image_masked = NULL;
@@ -3737,18 +3734,16 @@ XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli,
37373734
xlogfname);
37383735
set_ps_display(activitymsg);
37393736

3740-
restoredFromArchive = RestoreArchivedFile(path, xlogfname,
3741-
"RECOVERYXLOG",
3742-
wal_segment_size,
3743-
InRedo);
3744-
if (!restoredFromArchive)
3737+
if (!RestoreArchivedFile(path, xlogfname,
3738+
"RECOVERYXLOG",
3739+
wal_segment_size,
3740+
InRedo))
37453741
return -1;
37463742
break;
37473743

37483744
case XLOG_FROM_PG_WAL:
37493745
case XLOG_FROM_STREAM:
37503746
XLogFilePath(path, tli, segno, wal_segment_size);
3751-
restoredFromArchive = false;
37523747
break;
37533748

37543749
default:

0 commit comments

Comments
 (0)