diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-07-31 09:38:32 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-07-31 09:38:32 +0300 |
commit | 6b16532811f07fbb58e4b1b248775acbf9f732a2 (patch) | |
tree | d5f56a9c8ce4926de2aa846d0e1bdaea260d8086 /src/backend/access/transam/xlog.c | |
parent | e9f5a0681cb9cf74b4c1c98e10182ccce04aa08c (diff) | |
download | postgresql-6b16532811f07fbb58e4b1b248775acbf9f732a2.tar.gz postgresql-6b16532811f07fbb58e4b1b248775acbf9f732a2.zip |
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
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 8461c88b6bb..fb4186ee10d 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -271,9 +271,6 @@ bool InArchiveRecovery = false; static bool standby_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 */ static char *replay_image_masked = NULL; static char *primary_image_masked = NULL; @@ -3737,18 +3734,16 @@ XLogFileRead(XLogSegNo segno, int emode, TimeLineID tli, xlogfname); set_ps_display(activitymsg); - restoredFromArchive = RestoreArchivedFile(path, xlogfname, - "RECOVERYXLOG", - wal_segment_size, - InRedo); - if (!restoredFromArchive) + if (!RestoreArchivedFile(path, xlogfname, + "RECOVERYXLOG", + wal_segment_size, + InRedo)) return -1; break; case XLOG_FROM_PG_WAL: case XLOG_FROM_STREAM: XLogFilePath(path, tli, segno, wal_segment_size); - restoredFromArchive = false; break; default: |