Skip to content

Commit 93473c6

Browse files
committed
Removed unused variable, openLogOff.
Antonin Houska Discussion: http://postgr.es/m/30413.1551870730@localhost
1 parent bd09503 commit 93473c6

File tree

1 file changed

+3
-10
lines changed
  • src/backend/access/transam

1 file changed

+3
-10
lines changed

src/backend/access/transam/xlog.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -771,13 +771,11 @@ static const char *xlogSourceNames[] = {"any", "archive", "pg_wal", "stream"};
771771

772772
/*
773773
* openLogFile is -1 or a kernel FD for an open log file segment.
774-
* When it's open, openLogOff is the current seek offset in the file.
775-
* openLogSegNo identifies the segment. These variables are only
776-
* used to write the XLOG, and so will normally refer to the active segment.
774+
* openLogSegNo identifies the segment. These variables are only used to
775+
* write the XLOG, and so will normally refer to the active segment.
777776
*/
778777
static int openLogFile = -1;
779778
static XLogSegNo openLogSegNo = 0;
780-
static uint32 openLogOff = 0;
781779

782780
/*
783781
* These variables are used similarly to the ones above, but for reading
@@ -2447,7 +2445,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
24472445
/* create/use new log file */
24482446
use_existent = true;
24492447
openLogFile = XLogFileInit(openLogSegNo, &use_existent, true);
2450-
openLogOff = 0;
24512448
}
24522449

24532450
/* Make sure we have the current logfile open */
@@ -2456,7 +2453,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
24562453
XLByteToPrevSeg(LogwrtResult.Write, openLogSegNo,
24572454
wal_segment_size);
24582455
openLogFile = XLogFileOpen(openLogSegNo);
2459-
openLogOff = 0;
24602456
}
24612457

24622458
/* Add current page to the set of pending pages-to-dump */
@@ -2508,15 +2504,13 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
25082504
errmsg("could not write to log file %s "
25092505
"at offset %u, length %zu: %m",
25102506
XLogFileNameP(ThisTimeLineID, openLogSegNo),
2511-
openLogOff, nbytes)));
2507+
startoffset, nbytes)));
25122508
}
25132509
nleft -= written;
25142510
from += written;
25152511
startoffset += written;
25162512
} while (nleft > 0);
25172513

2518-
/* Update state for write */
2519-
openLogOff += nbytes;
25202514
npages = 0;
25212515

25222516
/*
@@ -2602,7 +2596,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
26022596
XLByteToPrevSeg(LogwrtResult.Write, openLogSegNo,
26032597
wal_segment_size);
26042598
openLogFile = XLogFileOpen(openLogSegNo);
2605-
openLogOff = 0;
26062599
}
26072600

26082601
issue_xlog_fsync(openLogFile, openLogSegNo);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy