mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Use the terminology "WAL file" not "log file" more consistently.
Referring to the WAL as just "log" invites confusion with the postmaster log, so avoid doing that in docs and error messages. Also shorten "WAL segment file" to just "WAL file" in various places. Bharath Rupireddy, reviewed by Nathan Bossart and Kyotaro Horiguchi Discussion: https://postgr.es/m/CALj2ACUeXa8tDPaiTLexBDMZ7hgvaN+RTb957-cn5qwv9zf-MQ@mail.gmail.com
This commit is contained in:
@@ -1229,7 +1229,7 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr,
|
||||
XLogFileName(fname, state->seg.ws_tli, segno, state->segcxt.ws_segsize);
|
||||
|
||||
report_invalid_record(state,
|
||||
"invalid magic number %04X in log segment %s, offset %u",
|
||||
"invalid magic number %04X in WAL segment %s, offset %u",
|
||||
hdr->xlp_magic,
|
||||
fname,
|
||||
offset);
|
||||
@@ -1243,7 +1243,7 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr,
|
||||
XLogFileName(fname, state->seg.ws_tli, segno, state->segcxt.ws_segsize);
|
||||
|
||||
report_invalid_record(state,
|
||||
"invalid info bits %04X in log segment %s, offset %u",
|
||||
"invalid info bits %04X in WAL segment %s, offset %u",
|
||||
hdr->xlp_info,
|
||||
fname,
|
||||
offset);
|
||||
@@ -1284,7 +1284,7 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr,
|
||||
|
||||
/* hmm, first page of file doesn't have a long header? */
|
||||
report_invalid_record(state,
|
||||
"invalid info bits %04X in log segment %s, offset %u",
|
||||
"invalid info bits %04X in WAL segment %s, offset %u",
|
||||
hdr->xlp_info,
|
||||
fname,
|
||||
offset);
|
||||
@@ -1303,7 +1303,7 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr,
|
||||
XLogFileName(fname, state->seg.ws_tli, segno, state->segcxt.ws_segsize);
|
||||
|
||||
report_invalid_record(state,
|
||||
"unexpected pageaddr %X/%X in log segment %s, offset %u",
|
||||
"unexpected pageaddr %X/%X in WAL segment %s, offset %u",
|
||||
LSN_FORMAT_ARGS(hdr->xlp_pageaddr),
|
||||
fname,
|
||||
offset);
|
||||
@@ -1328,7 +1328,7 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr,
|
||||
XLogFileName(fname, state->seg.ws_tli, segno, state->segcxt.ws_segsize);
|
||||
|
||||
report_invalid_record(state,
|
||||
"out-of-sequence timeline ID %u (after %u) in log segment %s, offset %u",
|
||||
"out-of-sequence timeline ID %u (after %u) in WAL segment %s, offset %u",
|
||||
hdr->xlp_tli,
|
||||
state->latestPageTLI,
|
||||
fname,
|
||||
|
||||
@@ -3079,7 +3079,7 @@ ReadRecord(XLogPrefetcher *xlogprefetcher, int emode,
|
||||
XLogFileName(fname, xlogreader->seg.ws_tli, segno,
|
||||
wal_segment_size);
|
||||
ereport(emode_for_corrupt_record(emode, xlogreader->EndRecPtr),
|
||||
(errmsg("unexpected timeline ID %u in log segment %s, offset %u",
|
||||
(errmsg("unexpected timeline ID %u in WAL segment %s, offset %u",
|
||||
xlogreader->latestPageTLI,
|
||||
fname,
|
||||
offset)));
|
||||
@@ -3284,13 +3284,13 @@ retry:
|
||||
errno = save_errno;
|
||||
ereport(emode_for_corrupt_record(emode, targetPagePtr + reqLen),
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not read from log segment %s, offset %u: %m",
|
||||
errmsg("could not read from WAL segment %s, offset %u: %m",
|
||||
fname, readOff)));
|
||||
}
|
||||
else
|
||||
ereport(emode_for_corrupt_record(emode, targetPagePtr + reqLen),
|
||||
(errcode(ERRCODE_DATA_CORRUPTED),
|
||||
errmsg("could not read from log segment %s, offset %u: read %d of %zu",
|
||||
errmsg("could not read from WAL segment %s, offset %u: read %d of %zu",
|
||||
fname, readOff, r, (Size) XLOG_BLCKSZ)));
|
||||
goto next_record_is_invalid;
|
||||
}
|
||||
|
||||
@@ -1051,14 +1051,14 @@ WALReadRaiseError(WALReadError *errinfo)
|
||||
errno = errinfo->wre_errno;
|
||||
ereport(ERROR,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not read from log segment %s, offset %d: %m",
|
||||
errmsg("could not read from WAL segment %s, offset %d: %m",
|
||||
fname, errinfo->wre_off)));
|
||||
}
|
||||
else if (errinfo->wre_read == 0)
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATA_CORRUPTED),
|
||||
errmsg("could not read from log segment %s, offset %d: read %d of %d",
|
||||
errmsg("could not read from WAL segment %s, offset %d: read %d of %d",
|
||||
fname, errinfo->wre_off, errinfo->wre_read,
|
||||
errinfo->wre_req)));
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ WalReceiverMain(void)
|
||||
if (close(recvFile) != 0)
|
||||
ereport(PANIC,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not close log segment %s: %m",
|
||||
errmsg("could not close WAL segment %s: %m",
|
||||
xlogfname)));
|
||||
|
||||
/*
|
||||
@@ -930,7 +930,7 @@ XLogWalRcvWrite(char *buf, Size nbytes, XLogRecPtr recptr, TimeLineID tli)
|
||||
errno = save_errno;
|
||||
ereport(PANIC,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not write to log segment %s "
|
||||
errmsg("could not write to WAL segment %s "
|
||||
"at offset %u, length %lu: %m",
|
||||
xlogfname, startoff, (unsigned long) segbytes)));
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ XLogWalRcvClose(XLogRecPtr recptr, TimeLineID tli)
|
||||
if (close(recvFile) != 0)
|
||||
ereport(PANIC,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not close log segment %s: %m",
|
||||
errmsg("could not close WAL segment %s: %m",
|
||||
xlogfname)));
|
||||
|
||||
/*
|
||||
|
||||
@@ -251,21 +251,21 @@
|
||||
|
||||
#archive_mode = off # enables archiving; off, on, or always
|
||||
# (change requires restart)
|
||||
#archive_library = '' # library to use to archive a logfile segment
|
||||
#archive_library = '' # library to use to archive a WAL file
|
||||
# (empty string indicates archive_command should
|
||||
# be used)
|
||||
#archive_command = '' # command to use to archive a logfile segment
|
||||
#archive_command = '' # command to use to archive a WAL file
|
||||
# placeholders: %p = path of file to archive
|
||||
# %f = file name only
|
||||
# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
|
||||
#archive_timeout = 0 # force a logfile segment switch after this
|
||||
#archive_timeout = 0 # force a WAL file switch after this
|
||||
# number of seconds; 0 disables
|
||||
|
||||
# - Archive Recovery -
|
||||
|
||||
# These are only used in recovery mode.
|
||||
|
||||
#restore_command = '' # command to use to restore an archived logfile segment
|
||||
#restore_command = '' # command to use to restore an archived WAL file
|
||||
# placeholders: %p = path of file to restore
|
||||
# %f = file name only
|
||||
# e.g. 'cp /mnt/server/archivedir/%f %p'
|
||||
|
||||
Reference in New Issue
Block a user