aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-09-14 18:40:58 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-09-14 18:40:58 -0400
commit31dcfae83c001c6cdfd1e67c11adb9149f564da0 (patch)
tree37eeed81972f3a577bd75a0ee45142cb13dba0f1 /src
parent63840526b05c5c12c92cb16be8748e4d20e6eab6 (diff)
downloadpostgresql-31dcfae83c001c6cdfd1e67c11adb9149f564da0.tar.gz
postgresql-31dcfae83c001c6cdfd1e67c11adb9149f564da0.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlogreader.c10
-rw-r--r--src/backend/access/transam/xlogrecovery.c6
-rw-r--r--src/backend/access/transam/xlogutils.c4
-rw-r--r--src/backend/replication/walreceiver.c6
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample8
-rw-r--r--src/bin/pg_resetwal/pg_resetwal.c2
-rw-r--r--src/bin/pg_upgrade/controldata.c2
-rw-r--r--src/bin/pg_waldump/pg_waldump.c4
8 files changed, 21 insertions, 21 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index c4fbc37c74b..050d2f424e4 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -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,
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index e00ff14d49b..30661bdad63 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -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;
}
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index e60951a5fcd..563cba258dd 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -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)));
}
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index 8604fd4bc2e..f6ef0ace2c4 100644
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -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)));
/*
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 90bec0502c4..2ae76e5cfb7 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -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'
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index d4772a29650..7adf79eeed6 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -788,7 +788,7 @@ PrintNewControlValues(void)
XLogFileName(fname, ControlFile.checkPointCopy.ThisTimeLineID,
newXlogSegNo, WalSegSz);
- printf(_("First log segment after reset: %s\n"), fname);
+ printf(_("First WAL segment after reset: %s\n"), fname);
if (set_mxid != 0)
{
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index 018cd310f7c..88d7e1c73de 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -348,7 +348,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
cluster->controldata.chkpnt_nxtmxoff = str2uint(p);
got_mxoff = true;
}
- else if ((p = strstr(bufin, "First log segment after reset:")) != NULL)
+ else if ((p = strstr(bufin, "First WAL segment after reset:")) != NULL)
{
/* Skip the colon and any whitespace after it */
p = strchr(p, ':');
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index 9b792695629..9993378ca58 100644
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -667,7 +667,7 @@ usage(void)
printf(_(" -F, --fork=FORK only show records that modify blocks in fork FORK;\n"
" valid names are main, fsm, vm, init\n"));
printf(_(" -n, --limit=N number of records to display\n"));
- printf(_(" -p, --path=PATH directory in which to find log segment files or a\n"
+ printf(_(" -p, --path=PATH directory in which to find WAL segment files or a\n"
" directory with a ./pg_wal that contains such files\n"
" (default: current directory, ./pg_wal, $PGDATA/pg_wal)\n"));
printf(_(" -q, --quiet do not print any output, except for errors\n"));
@@ -675,7 +675,7 @@ usage(void)
" use --rmgr=list to list valid resource manager names\n"));
printf(_(" -R, --relation=T/D/R only show records that modify blocks in relation T/D/R\n"));
printf(_(" -s, --start=RECPTR start reading at WAL location RECPTR\n"));
- printf(_(" -t, --timeline=TLI timeline from which to read log records\n"
+ printf(_(" -t, --timeline=TLI timeline from which to read WAL records\n"
" (default: 1 or the value used in STARTSEG)\n"));
printf(_(" -V, --version output version information, then exit\n"));
printf(_(" -w, --fullpage only show records with a full page write\n"));