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

Commit9b8dd7e

Browse files
committed
Fix erroneous choices of segNo variables
Commitdfda6eb (which changed segment numbers to use a single 64 bitvariable instead of log/seg) introduced a couple of bogus choices ofexactly which log segment number variable to use in each case.This is currently pretty harmless; in one place, the bogus number wasonly being used in an error message for a pretty unlikely condition(failure to fsync a WAL segment file). In the other, it was using aglobal variable instead of the local variable; but all callsites werepassing the value of the global variable anyway.No need to backpatch because that commit is not on earlier branches.
1 parent04f28bd commit9b8dd7e

File tree

1 file changed

+4
-4
lines changed
  • src/backend/access/transam

1 file changed

+4
-4
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8175,7 +8175,7 @@ assign_xlog_sync_method(int new_sync_method, void *extra)
81758175
ereport(PANIC,
81768176
(errcode_for_file_access(),
81778177
errmsg("could not fsync log segment %s: %m",
8178-
XLogFileNameP(curFileTLI,readSegNo))));
8178+
XLogFileNameP(curFileTLI,openLogSegNo))));
81798179
if (get_sync_bit(sync_method)!=get_sync_bit(new_sync_method))
81808180
XLogFileClose();
81818181
}
@@ -8199,15 +8199,15 @@ issue_xlog_fsync(int fd, XLogSegNo segno)
81998199
ereport(PANIC,
82008200
(errcode_for_file_access(),
82018201
errmsg("could not fsync log file %s: %m",
8202-
XLogFileNameP(ThisTimeLineID,openLogSegNo))));
8202+
XLogFileNameP(ThisTimeLineID,segno))));
82038203
break;
82048204
#ifdefHAVE_FSYNC_WRITETHROUGH
82058205
caseSYNC_METHOD_FSYNC_WRITETHROUGH:
82068206
if (pg_fsync_writethrough(fd)!=0)
82078207
ereport(PANIC,
82088208
(errcode_for_file_access(),
82098209
errmsg("could not fsync write-through log file %s: %m",
8210-
XLogFileNameP(ThisTimeLineID,openLogSegNo))));
8210+
XLogFileNameP(ThisTimeLineID,segno))));
82118211
break;
82128212
#endif
82138213
#ifdefHAVE_FDATASYNC
@@ -8216,7 +8216,7 @@ issue_xlog_fsync(int fd, XLogSegNo segno)
82168216
ereport(PANIC,
82178217
(errcode_for_file_access(),
82188218
errmsg("could not fdatasync log file %s: %m",
8219-
XLogFileNameP(ThisTimeLineID,openLogSegNo))));
8219+
XLogFileNameP(ThisTimeLineID,segno))));
82208220
break;
82218221
#endif
82228222
caseSYNC_METHOD_OPEN:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp