Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit93473c6

Browse files
committed
Removed unused variable, openLogOff.
Antonin HouskaDiscussion:http://postgr.es/m/30413.1551870730@localhost
1 parentbd09503 commit93473c6

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
staticintopenLogFile=-1;
779778
staticXLogSegNoopenLogSegNo=0;
780-
staticuint32openLogOff=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)

[8]ページ先頭

©2009-2025 Movatter.jp