Skip to content

Commit f975fc3

Browse files
committed
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
1 parent ad26ee2 commit f975fc3

File tree

1 file changed

+1
-2
lines changed
  • src/backend/access/transam

1 file changed

+1
-2
lines changed

src/backend/access/transam/xlog.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ const struct config_enum_entry recovery_target_action_options[] = {
191191
*/
192192
CheckpointStatsData CheckpointStats;
193193

194-
static XLogRecPtr LastRec;
195-
196194
/* Local copy of WalRcv->flushedUpto */
197195
static XLogRecPtr flushedUpto = 0;
198196
static TimeLineID receiveTLI = 0;
@@ -6679,6 +6677,7 @@ StartupXLOG(void)
66796677
bool haveBackupLabel = false;
66806678
bool haveTblspcMap = false;
66816679
XLogRecPtr RecPtr,
6680+
LastRec,
66826681
checkPointLoc,
66836682
EndOfLog;
66846683
TimeLineID EndOfLogTLI;

0 commit comments

Comments
 (0)