From: Michael Paquier Date: Wed, 17 Nov 2021 02:04:18 +0000 (+0900) Subject: Remove global variable "LastRec" in xlog.c X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f975fc3a3542005ed0dd689bdb5bd9ed4e1f4d52;p=users%2Frhaas%2Fpostgres.git 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 --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 355d1737c3..1616448368 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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;