Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
93473c6a
Commit
93473c6a
authored
Mar 06, 2019
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused variable, openLogOff.
Antonin Houska Discussion:
http://postgr.es/m/30413.1551870730@localhost
parent
bd09503e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+3
-10
No files found.
src/backend/access/transam/xlog.c
View file @
93473c6a
...
@@ -771,13 +771,11 @@ static const char *xlogSourceNames[] = {"any", "archive", "pg_wal", "stream"};
...
@@ -771,13 +771,11 @@ static const char *xlogSourceNames[] = {"any", "archive", "pg_wal", "stream"};
/*
/*
* openLogFile is -1 or a kernel FD for an open log file segment.
* openLogFile is -1 or a kernel FD for an open log file segment.
* When it's open, openLogOff is the current seek offset in the file.
* openLogSegNo identifies the segment. These variables are only used to
* openLogSegNo identifies the segment. These variables are only
* write the XLOG, and so will normally refer to the active segment.
* used to write the XLOG, and so will normally refer to the active segment.
*/
*/
static
int
openLogFile
=
-
1
;
static
int
openLogFile
=
-
1
;
static
XLogSegNo
openLogSegNo
=
0
;
static
XLogSegNo
openLogSegNo
=
0
;
static
uint32
openLogOff
=
0
;
/*
/*
* These variables are used similarly to the ones above, but for reading
* These variables are used similarly to the ones above, but for reading
...
@@ -2447,7 +2445,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
...
@@ -2447,7 +2445,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
/* create/use new log file */
/* create/use new log file */
use_existent
=
true
;
use_existent
=
true
;
openLogFile
=
XLogFileInit
(
openLogSegNo
,
&
use_existent
,
true
);
openLogFile
=
XLogFileInit
(
openLogSegNo
,
&
use_existent
,
true
);
openLogOff
=
0
;
}
}
/* Make sure we have the current logfile open */
/* Make sure we have the current logfile open */
...
@@ -2456,7 +2453,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
...
@@ -2456,7 +2453,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
XLByteToPrevSeg
(
LogwrtResult
.
Write
,
openLogSegNo
,
XLByteToPrevSeg
(
LogwrtResult
.
Write
,
openLogSegNo
,
wal_segment_size
);
wal_segment_size
);
openLogFile
=
XLogFileOpen
(
openLogSegNo
);
openLogFile
=
XLogFileOpen
(
openLogSegNo
);
openLogOff
=
0
;
}
}
/* Add current page to the set of pending pages-to-dump */
/* Add current page to the set of pending pages-to-dump */
...
@@ -2508,15 +2504,13 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
...
@@ -2508,15 +2504,13 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
errmsg
(
"could not write to log file %s "
errmsg
(
"could not write to log file %s "
"at offset %u, length %zu: %m"
,
"at offset %u, length %zu: %m"
,
XLogFileNameP
(
ThisTimeLineID
,
openLogSegNo
),
XLogFileNameP
(
ThisTimeLineID
,
openLogSegNo
),
openLogOff
,
nbytes
)));
startoffset
,
nbytes
)));
}
}
nleft
-=
written
;
nleft
-=
written
;
from
+=
written
;
from
+=
written
;
startoffset
+=
written
;
startoffset
+=
written
;
}
while
(
nleft
>
0
);
}
while
(
nleft
>
0
);
/* Update state for write */
openLogOff
+=
nbytes
;
npages
=
0
;
npages
=
0
;
/*
/*
...
@@ -2602,7 +2596,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
...
@@ -2602,7 +2596,6 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
XLByteToPrevSeg
(
LogwrtResult
.
Write
,
openLogSegNo
,
XLByteToPrevSeg
(
LogwrtResult
.
Write
,
openLogSegNo
,
wal_segment_size
);
wal_segment_size
);
openLogFile
=
XLogFileOpen
(
openLogSegNo
);
openLogFile
=
XLogFileOpen
(
openLogSegNo
);
openLogOff
=
0
;
}
}
issue_xlog_fsync
(
openLogFile
,
openLogSegNo
);
issue_xlog_fsync
(
openLogFile
,
openLogSegNo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment