Remove global variable "LastRec" in xlog.c

This variable is used only by StartupXLOG() now, so let's make it local
to simplify the code.

Author: Amul Sul
Reviewed-by: Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/CAAJ_b96Qd023itERBRN9Z7P2saNDT3CYvGuMO8RXwndVNN6z7g@mail.gmail.com
This commit is contained in:
Michael Paquier 2021-11-17 11:04:18 +09:00
parent ad26ee2825
commit f975fc3a35
1 changed files with 1 additions and 2 deletions

View File

@ -191,8 +191,6 @@ const struct config_enum_entry recovery_target_action_options[] = {
*/
CheckpointStatsData CheckpointStats;
static XLogRecPtr LastRec;
/* Local copy of WalRcv->flushedUpto */
static XLogRecPtr flushedUpto = 0;
static TimeLineID receiveTLI = 0;
@ -6679,6 +6677,7 @@ StartupXLOG(void)
bool haveBackupLabel = false;
bool haveTblspcMap = false;
XLogRecPtr RecPtr,
LastRec,
checkPointLoc,
EndOfLog;
TimeLineID EndOfLogTLI;