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

Commit8fdbe1e

Browse files
author
Artur Zakirov
committed
Fix message in valid_wal()
1 parenta3e5458 commit8fdbe1e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎parsexlog.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static bool getRecordTimestamp(XLogReaderState *record, TimestampTz *recordXtime
3636
staticintxlogreadfd=-1;
3737
staticXLogSegNoxlogreadsegno=-1;
3838
staticcharxlogfpath[MAXPGPATH];
39+
staticboolxlogexists= false;
3940

4041
typedefstructXLogPageReadPrivate
4142
{
@@ -98,6 +99,7 @@ extractPageMap(const char *archivedir, XLogRecPtr startpoint, TimeLineID tli,
9899
{
99100
close(xlogreadfd);
100101
xlogreadfd=-1;
102+
xlogexists= false;
101103
}
102104
}
103105

@@ -192,9 +194,9 @@ validate_wal(pgBackup *backup,
192194
if (xlogfpath[0]!=0)
193195
{
194196
/* XLOG reader couldnt read WAL segment */
195-
if (xlogreadfd<0)
197+
if (!xlogexists)
196198
elog(WARNING,"WAL segment \"%s\" is absent",xlogfpath);
197-
else
199+
elseif (xlogreadfd!=-1)
198200
elog(WARNING,"error was occured during reading WAL segment \"%s\"",
199201
xlogfpath);
200202
}
@@ -232,6 +234,7 @@ validate_wal(pgBackup *backup,
232234
{
233235
close(xlogreadfd);
234236
xlogreadfd=-1;
237+
xlogexists= false;
235238
}
236239
}
237240

@@ -256,6 +259,7 @@ SimpleXLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr,
256259
{
257260
close(xlogreadfd);
258261
xlogreadfd=-1;
262+
xlogexists= false;
259263
}
260264

261265
XLByteToSeg(targetPagePtr,xlogreadsegno);
@@ -272,11 +276,12 @@ SimpleXLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr,
272276
{
273277
elog(LOG,"opening WAL segment \"%s\"",xlogfpath);
274278

279+
xlogexists= true;
275280
xlogreadfd=open(xlogfpath,O_RDONLY |PG_BINARY,0);
276281

277282
if (xlogreadfd<0)
278283
{
279-
elog(INFO,"could not open WAL segment \"%s\": %s",
284+
elog(WARNING,"could not open WAL segment \"%s\": %s",
280285
xlogfpath,strerror(errno));
281286
return-1;
282287
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp