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
a6427f1f
Commit
a6427f1f
authored
Jun 25, 2012
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unbreak pg_resetxlog -l.
Fujii Masao
parent
2dfa87bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
src/bin/pg_resetxlog/pg_resetxlog.c
src/bin/pg_resetxlog/pg_resetxlog.c
+22
-3
No files found.
src/bin/pg_resetxlog/pg_resetxlog.c
View file @
a6427f1f
...
@@ -86,9 +86,13 @@ main(int argc, char *argv[])
...
@@ -86,9 +86,13 @@ main(int argc, char *argv[])
Oid
set_oid
=
0
;
Oid
set_oid
=
0
;
MultiXactId
set_mxid
=
0
;
MultiXactId
set_mxid
=
0
;
MultiXactOffset
set_mxoff
=
(
MultiXactOffset
)
-
1
;
MultiXactOffset
set_mxoff
=
(
MultiXactOffset
)
-
1
;
uint32
minXlogTli
=
0
;
uint32
minXlogTli
=
0
,
minXlogId
=
0
,
minXlogSeg
=
0
;
XLogSegNo
minXlogSegNo
=
0
;
XLogSegNo
minXlogSegNo
=
0
;
char
*
endptr
;
char
*
endptr
;
char
*
endptr2
;
char
*
endptr3
;
char
*
DataDir
;
char
*
DataDir
;
int
fd
;
int
fd
;
char
path
[
MAXPGPATH
];
char
path
[
MAXPGPATH
];
...
@@ -200,13 +204,28 @@ main(int argc, char *argv[])
...
@@ -200,13 +204,28 @@ main(int argc, char *argv[])
break
;
break
;
case
'l'
:
case
'l'
:
if
(
strspn
(
optarg
,
"01234567890ABCDEFabcdef"
)
!=
24
)
minXlogTli
=
strtoul
(
optarg
,
&
endptr
,
0
);
if
(
endptr
==
optarg
||
*
endptr
!=
','
)
{
{
fprintf
(
stderr
,
_
(
"%s: invalid argument for option -l
\n
"
),
progname
);
fprintf
(
stderr
,
_
(
"%s: invalid argument for option -l
\n
"
),
progname
);
fprintf
(
stderr
,
_
(
"Try
\"
%s --help
\"
for more information.
\n
"
),
progname
);
fprintf
(
stderr
,
_
(
"Try
\"
%s --help
\"
for more information.
\n
"
),
progname
);
exit
(
1
);
exit
(
1
);
}
}
XLogFromFileName
(
optarg
,
&
minXlogTli
,
&
minXlogSegNo
);
minXlogId
=
strtoul
(
endptr
+
1
,
&
endptr2
,
0
);
if
(
endptr2
==
endptr
+
1
||
*
endptr2
!=
','
)
{
fprintf
(
stderr
,
_
(
"%s: invalid argument for option -l
\n
"
),
progname
);
fprintf
(
stderr
,
_
(
"Try
\"
%s --help
\"
for more information.
\n
"
),
progname
);
exit
(
1
);
}
minXlogSeg
=
strtoul
(
endptr2
+
1
,
&
endptr3
,
0
);
if
(
endptr3
==
endptr2
+
1
||
*
endptr3
!=
'\0'
)
{
fprintf
(
stderr
,
_
(
"%s: invalid argument for option -l
\n
"
),
progname
);
fprintf
(
stderr
,
_
(
"Try
\"
%s --help
\"
for more information.
\n
"
),
progname
);
exit
(
1
);
}
minXlogSegNo
=
(
uint64
)
minXlogId
*
XLogSegmentsPerXLogId
+
minXlogSeg
;
break
;
break
;
default:
default:
...
...
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