From 58d2e3af0d3411d1a728cc4f2ef120d3cfa237a8 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Tue, 2 May 2017 21:05:10 -0400
Subject: [PATCH] Replace "transaction log" with "write-ahead log"

---
 doc/src/sgml/backup.sgml               |  2 +-
 doc/src/sgml/config.sgml               |  2 +-
 doc/src/sgml/func.sgml                 | 66 +++++++++++++++++-----------------
 doc/src/sgml/high-availability.sgml    |  2 +-
 doc/src/sgml/monitoring.sgml           | 26 +++++++-------
 doc/src/sgml/protocol.sgml             |  2 +-
 doc/src/sgml/recovery-config.sgml      |  2 +-
 doc/src/sgml/ref/checkpoint.sgml       |  4 +--
 doc/src/sgml/ref/initdb.sgml           |  2 +-
 doc/src/sgml/ref/pg_basebackup.sgml    | 28 +++++++--------
 doc/src/sgml/ref/pg_receivewal.sgml    | 12 +++----
 doc/src/sgml/ref/pgbench.sgml          |  2 +-
 doc/src/sgml/ref/pgtestfsync.sgml      |  2 +-
 doc/src/sgml/release-10.sgml           |  2 +-
 src/backend/access/transam/timeline.c  |  2 +-
 src/backend/access/transam/xlog.c      | 31 ++++++++--------
 src/backend/access/transam/xlogfuncs.c |  2 +-
 src/backend/access/transam/xlogutils.c |  2 +-
 src/backend/postmaster/checkpointer.c  |  5 ++-
 src/backend/postmaster/pgarch.c        |  5 ++-
 src/backend/postmaster/postmaster.c    |  2 +-
 src/bin/initdb/initdb.c                | 18 +++++-----
 src/bin/pg_basebackup/pg_basebackup.c  | 36 +++++++++----------
 src/bin/pg_basebackup/pg_receivewal.c  |  8 ++---
 src/bin/pg_basebackup/receivelog.c     | 14 ++++----
 src/bin/pg_basebackup/streamutil.c     |  2 +-
 src/bin/pg_resetwal/pg_resetwal.c      |  8 ++---
 src/bin/pg_rewind/timeline.c           |  2 +-
 src/bin/pg_waldump/pg_waldump.c        |  2 +-
 src/include/access/xlog.h              |  2 +-
 src/include/access/xlog_internal.h     |  2 +-
 src/include/access/xlogdefs.h          |  2 +-
 src/test/perl/PostgresNode.pm          |  6 ++--
 33 files changed, 151 insertions(+), 154 deletions(-)

diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 8cf63e478a..7820de931c 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1424,7 +1424,7 @@ <title>Standalone Hot Backups</title>
       As with base backups, the easiest way to produce a standalone
       hot backup is to use the <xref linkend="app-pgbasebackup">
       tool. If you include the <literal>-X</> parameter when calling
-      it, all the transaction log required to use the backup will be
+      it, all the write-ahead log required to use the backup will be
       included in the backup automatically, and no special action is
       required to restore the backup.
      </para>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 0b9e3002fb..b0414fc638 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -3310,7 +3310,7 @@ <title>Standby Servers</title>
        to the primary or upstream standby, where it can be seen using the
        <link linkend="monitoring-stats-views-table">
        <literal>pg_stat_replication</></link> view.  The standby will report
-       the last transaction log position it has written, the last position it
+       the last write-ahead log position it has written, the last position it
        has flushed to disk, and the last position it has applied.
        This parameter's
        value is the maximum interval, in seconds, between reports.  Updates are
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index f06d0a92c0..ca2dc3c274 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -18448,21 +18448,21 @@ <title>Backup Control Functions</title>
         <literal><function>pg_current_wal_flush_location()</function></literal>
         </entry>
        <entry><type>pg_lsn</type></entry>
-       <entry>Get current transaction log flush location</entry>
+       <entry>Get current write-ahead log flush location</entry>
       </row>
       <row>
        <entry>
         <literal><function>pg_current_wal_insert_location()</function></literal>
         </entry>
        <entry><type>pg_lsn</type></entry>
-       <entry>Get current transaction log insert location</entry>
+       <entry>Get current write-ahead log insert location</entry>
       </row>
       <row>
        <entry>
         <literal><function>pg_current_wal_location()</function></literal>
         </entry>
        <entry><type>pg_lsn</type></entry>
-       <entry>Get current transaction log write location</entry>
+       <entry>Get current write-ahead log write location</entry>
       </row>
       <row>
        <entry>
@@ -18504,28 +18504,28 @@ <title>Backup Control Functions</title>
         <literal><function>pg_switch_wal()</function></literal>
         </entry>
        <entry><type>pg_lsn</type></entry>
-       <entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
+       <entry>Force switch to a new write-ahead log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
       </row>
       <row>
        <entry>
         <literal><function>pg_walfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
         </entry>
        <entry><type>text</type></entry>
-       <entry>Convert transaction log location string to file name</entry>
+       <entry>Convert write-ahead log location string to file name</entry>
       </row>
       <row>
        <entry>
         <literal><function>pg_walfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
         </entry>
        <entry><type>text</>, <type>integer</></entry>
-       <entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
+       <entry>Convert write-ahead log location string to file name and decimal byte offset within file</entry>
       </row>
       <row>
        <entry>
         <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
        </entry>
        <entry><type>numeric</></entry>
-       <entry>Calculate the difference between two transaction log locations</entry>
+       <entry>Calculate the difference between two write-ahead log locations</entry>
       </row>
      </tbody>
     </tgroup>
@@ -18538,7 +18538,7 @@ <title>Backup Control Functions</title>
     backup label file (<filename>backup_label</>) and, if there are any links
     in the <filename>pg_tblspc/</> directory, a tablespace map file
     (<filename>tablespace_map</>) into the database cluster's data directory,
-    performs a checkpoint, and then returns the backup's starting transaction
+    performs a checkpoint, and then returns the backup's starting write-ahead
     log location as text.  The user can ignore this result value, but it is
     provided in case it is useful. When used in non-exclusive mode, the
     contents of these files are instead returned by the
@@ -18574,30 +18574,30 @@ <title>Backup Control Functions</title>
    </para>
 
    <para>
-    The function also creates a backup history file in the transaction log
+    The function also creates a backup history file in the write-ahead log
     archive area. The history file includes the label given to
-    <function>pg_start_backup</>, the starting and ending transaction log locations for
+    <function>pg_start_backup</>, the starting and ending write-ahead log locations for
     the backup, and the starting and ending times of the backup.  The return
-    value is the backup's ending transaction log location (which again
+    value is the backup's ending write-ahead log location (which again
     can be ignored).  After recording the ending location, the current
-    transaction log insertion
-    point is automatically advanced to the next transaction log file, so that the
-    ending transaction log file can be archived immediately to complete the backup.
+    write-ahead log insertion
+    point is automatically advanced to the next write-ahead log file, so that the
+    ending write-ahead log file can be archived immediately to complete the backup.
    </para>
 
    <para>
-    <function>pg_switch_wal</> moves to the next transaction log file, allowing the
+    <function>pg_switch_wal</> moves to the next write-ahead log file, allowing the
     current file to be archived (assuming you are using continuous archiving).
-    The return value is the ending transaction log location + 1 within the just-completed transaction log file.
-    If there has been no transaction log activity since the last transaction log switch,
+    The return value is the ending write-ahead log location + 1 within the just-completed write-ahead log file.
+    If there has been no write-ahead log activity since the last write-ahead log switch,
     <function>pg_switch_wal</> does nothing and returns the start location
-    of the transaction log file currently in use.
+    of the write-ahead log file currently in use.
    </para>
 
    <para>
-    <function>pg_create_restore_point</> creates a named transaction log
+    <function>pg_create_restore_point</> creates a named write-ahead log
     record that can be used as recovery target, and returns the corresponding
-    transaction log location.  The given name can then be used with
+    write-ahead log location.  The given name can then be used with
     <xref linkend="recovery-target-name"> to specify the point up to which
     recovery will proceed.  Avoid creating multiple restore points with the
     same name, since recovery will stop at the first one whose name matches
@@ -18605,16 +18605,16 @@ <title>Backup Control Functions</title>
    </para>
 
    <para>
-    <function>pg_current_wal_location</> displays the current transaction log write
+    <function>pg_current_wal_location</> displays the current write-ahead log write
     location in the same format used by the above functions.  Similarly,
-    <function>pg_current_wal_insert_location</> displays the current transaction log
+    <function>pg_current_wal_insert_location</> displays the current write-ahead log
     insertion point and <function>pg_current_wal_flush_location</> displays the
-    current transaction log flush point. The insertion point is the <quote>logical</>
-    end of the transaction log at any instant, while the write location is the end of
+    current write-ahead log flush point. The insertion point is the <quote>logical</>
+    end of the write-ahead log at any instant, while the write location is the end of
     what has actually been written out from the server's internal buffers and flush
     location is the location guaranteed to be written to durable storage. The write
     location is the end of what can be examined from outside the server, and is usually
-    what you want if you are interested in archiving partially-complete transaction log
+    what you want if you are interested in archiving partially-complete write-ahead log
     files.  The insertion and flush points are made available primarily for server
     debugging purposes.  These are both read-only operations and do not
     require superuser permissions.
@@ -18622,7 +18622,7 @@ <title>Backup Control Functions</title>
 
    <para>
     You can use <function>pg_walfile_name_offset</> to extract the
-    corresponding transaction log file name and byte offset from the results of any of the
+    corresponding write-ahead log file name and byte offset from the results of any of the
     above functions.  For example:
 <programlisting>
 postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
@@ -18631,17 +18631,17 @@ <title>Backup Control Functions</title>
  00000001000000000000000D |     4039624
 (1 row)
 </programlisting>
-    Similarly, <function>pg_walfile_name</> extracts just the transaction log file name.
-    When the given transaction log location is exactly at a transaction log file boundary, both
-    these functions return the name of the preceding transaction log file.
-    This is usually the desired behavior for managing transaction log archiving
+    Similarly, <function>pg_walfile_name</> extracts just the write-ahead log file name.
+    When the given write-ahead log location is exactly at a write-ahead log file boundary, both
+    these functions return the name of the preceding write-ahead log file.
+    This is usually the desired behavior for managing write-ahead log archiving
     behavior, since the preceding file is the last one that currently
     needs to be archived.
    </para>
 
    <para>
     <function>pg_wal_location_diff</> calculates the difference in bytes
-    between two transaction log locations. It can be used with
+    between two write-ahead log locations. It can be used with
     <structname>pg_stat_replication</structname> or some functions shown in
     <xref linkend="functions-admin-backup-table"> to get the replication lag.
    </para>
@@ -18698,7 +18698,7 @@ <title>Recovery Information Functions</title>
         <literal><function>pg_last_wal_receive_location()</function></literal>
         </entry>
        <entry><type>pg_lsn</type></entry>
-       <entry>Get last transaction log location received and synced to disk by
+       <entry>Get last write-ahead log location received and synced to disk by
         streaming replication. While streaming replication is in progress
         this will increase monotonically. If recovery has completed this will
         remain static at
@@ -18712,7 +18712,7 @@ <title>Recovery Information Functions</title>
         <literal><function>pg_last_wal_replay_location()</function></literal>
         </entry>
        <entry><type>pg_lsn</type></entry>
-       <entry>Get last transaction log location replayed during recovery.
+       <entry>Get last write-ahead log location replayed during recovery.
         If recovery is still in progress this will increase monotonically.
         If recovery has completed then this value will remain static at
         the value of the last WAL record applied during that recovery.
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 22ac10f428..296bb2e369 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -1036,7 +1036,7 @@ <title>Synchronous Replication</title>
    <para>
     When requesting synchronous replication, each commit of a
     write transaction will wait until confirmation is
-    received that the commit has been written to the transaction log on disk
+    received that the commit has been written to the write-ahead log on disk
     of both the primary and standby server. The only possibility that data
     can be lost is if both the primary and the standby suffer crashes at the
     same time. This can provide a much higher level of durability, though only
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 2a83671b53..e5ee66bfaa 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -1032,7 +1032,7 @@ <title><structname>wait_event</structname> Description</title>
         </row>
         <row>
          <entry><literal>CLogTruncationLock</></entry>
-         <entry>Waiting to truncate the transaction log or waiting for transaction log truncation to finish.</entry>
+         <entry>Waiting to truncate the write-ahead log or waiting for write-ahead log truncation to finish.</entry>
         </row>
         <row>
          <entry><literal>clog</></entry>
@@ -1696,24 +1696,24 @@ <title><structname>pg_stat_replication</structname> View</title>
     <row>
      <entry><structfield>sent_location</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position sent on this connection</entry>
+     <entry>Last write-ahead log position sent on this connection</entry>
     </row>
     <row>
      <entry><structfield>write_location</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position written to disk by this standby
+     <entry>Last write-ahead log position written to disk by this standby
       server</entry>
     </row>
     <row>
      <entry><structfield>flush_location</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position flushed to disk by this standby
+     <entry>Last write-ahead log position flushed to disk by this standby
       server</entry>
     </row>
     <row>
      <entry><structfield>replay_location</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position replayed into the database on this
+     <entry>Last write-ahead log position replayed into the database on this
       standby server</entry>
     </row>
     <row>
@@ -1860,7 +1860,7 @@ <title><structname>pg_stat_wal_receiver</structname> View</title>
     <row>
      <entry><structfield>receive_start_lsn</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>First transaction log position used when WAL receiver is
+     <entry>First write-ahead log position used when WAL receiver is
       started</entry>
     </row>
     <row>
@@ -1871,14 +1871,14 @@ <title><structname>pg_stat_wal_receiver</structname> View</title>
     <row>
      <entry><structfield>received_lsn</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position already received and flushed to
+     <entry>Last write-ahead log position already received and flushed to
       disk, the initial value of this field being the first log position used
       when WAL receiver is started</entry>
     </row>
     <row>
      <entry><structfield>received_tli</></entry>
      <entry><type>integer</></entry>
-     <entry>Timeline number of last transaction log position received and
+     <entry>Timeline number of last write-ahead log position received and
       flushed to disk, the initial value of this field being the timeline
       number of the first log position used when WAL receiver is started
      </entry>
@@ -1896,12 +1896,12 @@ <title><structname>pg_stat_wal_receiver</structname> View</title>
     <row>
      <entry><structfield>latest_end_lsn</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position reported to origin WAL sender</entry>
+     <entry>Last write-ahead log position reported to origin WAL sender</entry>
     </row>
     <row>
      <entry><structfield>latest_end_time</></entry>
      <entry><type>timestamp with time zone</></entry>
-     <entry>Time of last transaction log position reported to origin WAL sender</entry>
+     <entry>Time of last write-ahead log position reported to origin WAL sender</entry>
     </row>
     <row>
      <entry><structfield>slot_name</></entry>
@@ -1962,7 +1962,7 @@ <title><structname>pg_stat_subscription</structname> View</title>
     <row>
      <entry><structfield>received_lsn</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position received, the initial value of
+     <entry>Last write-ahead log position received, the initial value of
       this field being 0</entry>
     </row>
     <row>
@@ -1979,13 +1979,13 @@ <title><structname>pg_stat_subscription</structname> View</title>
     <row>
      <entry><structfield>latest_end_lsn</></entry>
      <entry><type>pg_lsn</></entry>
-     <entry>Last transaction log position reported to origin WAL sender
+     <entry>Last write-ahead log position reported to origin WAL sender
      </entry>
     </row>
     <row>
      <entry><structfield>latest_end_time</></entry>
      <entry><type>timestamp with time zone</></entry>
-     <entry>Time of last transaction log position reported to origin WAL
+     <entry>Time of last write-ahead log position reported to origin WAL
       sender</entry>
     </row>
    </tbody>
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index cb72c5d9dd..dadaa47d69 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1547,7 +1547,7 @@ <title>Streaming Replication Protocol</title>
       <listitem>
       <para>
        Current WAL flush location. Useful to get a known location in the
-       transaction log where streaming can start.
+       write-ahead log where streaming can start.
       </para>
       </listitem>
       </varlistentry>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index a91864bf62..0a5d086248 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -242,7 +242,7 @@ <title>Recovery Target Settings</title>
       </term>
       <listitem>
        <para>
-        This parameter specifies the LSN of the transaction log location up
+        This parameter specifies the LSN of the write-ahead log location up
         to which recovery will proceed. The precise stopping point is also
         influenced by <xref linkend="recovery-target-inclusive">. This
         parameter is parsed using the system data type
diff --git a/doc/src/sgml/ref/checkpoint.sgml b/doc/src/sgml/ref/checkpoint.sgml
index fa4dcc4f27..a8f3186d8c 100644
--- a/doc/src/sgml/ref/checkpoint.sgml
+++ b/doc/src/sgml/ref/checkpoint.sgml
@@ -13,7 +13,7 @@
 
  <refnamediv>
   <refname>CHECKPOINT</refname>
-  <refpurpose>force a transaction log checkpoint</refpurpose>
+  <refpurpose>force a write-ahead log checkpoint</refpurpose>
  </refnamediv>
 
  <refsynopsisdiv>
@@ -26,7 +26,7 @@
   <title>Description</title>
 
   <para>
-   A checkpoint is a point in the transaction log sequence at which
+   A checkpoint is a point in the write-ahead log sequence at which
    all data files have been updated to reflect the information in the
    log.  All data files will be flushed to disk.  Refer to
    <xref linkend="wal-configuration"> for more details about what happens
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index d9faa96021..3ce99e248b 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -320,7 +320,7 @@ <title>Options</title>
       <term><option>--waldir=<replaceable class="parameter">directory</replaceable></option></term>
       <listitem>
        <para>
-        This option specifies the directory where the transaction log
+        This option specifies the directory where the write-ahead log
         should be stored.
        </para>
       </listitem>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index e1cec9d60f..ad1c55365a 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -299,9 +299,9 @@ <title>Options</title>
       <term><option>--waldir=<replaceable class="parameter">waldir</replaceable></option></term>
       <listitem>
        <para>
-        Specifies the location for the transaction log directory.
+        Specifies the location for the write-ahead log directory.
         <replaceable>waldir</replaceable> must be an absolute path.
-        The transaction log directory can only be specified when
+        The write-ahead log directory can only be specified when
         the backup is in plain mode.
        </para>
       </listitem>
@@ -312,15 +312,15 @@ <title>Options</title>
       <term><option>--wal-method=<replaceable class="parameter">method</replaceable></option></term>
       <listitem>
        <para>
-        Includes the required transaction log files (WAL files) in the
-        backup. This will include all transaction logs generated during
+        Includes the required write-ahead log files (WAL files) in the
+        backup. This will include all write-ahead logs generated during
         the backup. Unless the method <literal>none</literal> is specified,
         it is possible to start a postmaster directly in the extracted
         directory without the need to consult the log archive, thus
         making this a completely standalone backup.
        </para>
        <para>
-        The following methods for collecting the transaction logs are
+        The following methods for collecting the write-ahead logs are
         supported:
 
         <variablelist>
@@ -329,7 +329,7 @@ <title>Options</title>
           <term><literal>none</literal></term>
           <listitem>
            <para>
-            Don't include transaction log in the backup.
+            Don't include write-ahead log in the backup.
            </para>
           </listitem>
          </varlistentry>
@@ -339,7 +339,7 @@ <title>Options</title>
           <term><literal>fetch</literal></term>
           <listitem>
            <para>
-            The transaction log files are collected at the end of the backup.
+            The write-ahead log files are collected at the end of the backup.
             Therefore, it is necessary for the
             <xref linkend="guc-wal-keep-segments"> parameter to be set high
              enough that the log is not removed before the end of the backup.
@@ -347,7 +347,7 @@ <title>Options</title>
              backup will fail and be unusable.
            </para>
            <para>
-            The transaction log files will be written to
+            The write-ahead log files will be written to
             the <filename>base.tar</filename> file.
            </para>
           </listitem>
@@ -358,16 +358,16 @@ <title>Options</title>
           <term><literal>stream</literal></term>
           <listitem>
            <para>
-            Stream the transaction log while the backup is created. This will
+            Stream the write-ahead log while the backup is created. This will
             open a second connection to the server and start streaming the
-            transaction log in parallel while running the backup. Therefore,
+            write-ahead log in parallel while running the backup. Therefore,
             it will use up two connections configured by the
             <xref linkend="guc-max-wal-senders"> parameter. As long as the
-             client can keep up with transaction log received, using this mode
-             requires no extra transaction logs to be saved on the master.
+             client can keep up with write-ahead log received, using this mode
+             requires no extra write-ahead logs to be saved on the master.
            </para>
            <para>
-            The transaction log files are written to a separate file
+            The write-ahead log files are written to a separate file
             named <filename>pg_wal.tar</filename> (if the server is a version
             earlier than 10, the file will be named <filename>pg_xlog.tar</filename>).
            </para>
@@ -443,7 +443,7 @@ <title>Options</title>
         By default, when <command>pg_basebackup</command> aborts with an
         error, it removes any directories it might have created before
         discovering that it cannot finish the job (for example, data directory
-        and transaction log directory). This option inhibits tidying-up and is
+        and write-ahead log directory). This option inhibits tidying-up and is
         thus useful for debugging.
        </para>
 
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index 0e6b636703..0179dfd4b4 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -16,7 +16,7 @@
 
  <refnamediv>
   <refname>pg_receivewal</refname>
-  <refpurpose>stream transaction logs from a <productname>PostgreSQL</productname> server</refpurpose>
+  <refpurpose>stream write-ahead logs from a <productname>PostgreSQL</productname> server</refpurpose>
  </refnamediv>
 
  <refsynopsisdiv>
@@ -31,7 +31,7 @@
    Description
   </title>
   <para>
-   <application>pg_receivewal</application> is used to stream the transaction log
+   <application>pg_receivewal</application> is used to stream the write-ahead log
    from a running <productname>PostgreSQL</productname> cluster. The transaction
    log is streamed using the streaming replication protocol, and is written
    to a local directory of files. This directory can be used as the archive
@@ -56,7 +56,7 @@
   </para>
 
   <para>
-   The transaction log is streamed over a regular
+   The write-ahead log is streamed over a regular
    <productname>PostgreSQL</productname> connection and uses the replication
    protocol. The connection must be made with a superuser or a user
    having <literal>REPLICATION</literal> permissions (see
@@ -186,7 +186,7 @@ <title>Options</title>
       <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
       <listitem>
        <para>
-        Enables gzip compression of transaction logs, and specifies the
+        Enables gzip compression of write-ahead logs, and specifies the
         compression level (0 through 9, 0 being no compression and 9 being best
         compression).  The suffix <filename>.gz</filename> will
         automatically be added to all filenames.
@@ -366,7 +366,7 @@ <title>Notes</title>
    When using <application>pg_receivewal</application> instead of
    <xref linkend="guc-archive-command"> as the main WAL backup method, it is
    strongly recommended to use replication slots.  Otherwise, the server is
-   free to recycle or remove transaction log files before they are backed up,
+   free to recycle or remove write-ahead log files before they are backed up,
    because it does not have any information, either
    from <xref linkend="guc-archive-command"> or the replication slots, about
    how far the WAL stream has been archived.  Note, however, that a
@@ -380,7 +380,7 @@ <title>Notes</title>
   <title>Examples</title>
 
   <para>
-   To stream the transaction log from the server at
+   To stream the write-ahead log from the server at
    <literal>mydbserver</literal> and store it in the local directory
    <filename>/usr/local/pgsql/archive</filename>:
 <screen>
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index 1eee8dc574..5735c48717 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -614,7 +614,7 @@ <title>Benchmarking Options</title>
       <term><option>--log-prefix=<replaceable>prefix</></option></term>
       <listitem>
        <para>
-        Set the filename prefix for the transaction log files created by
+        Set the filename prefix for the log files created by
         <option>--log</>.  The default is <literal>pgbench_log</>.
        </para>
       </listitem>
diff --git a/doc/src/sgml/ref/pgtestfsync.sgml b/doc/src/sgml/ref/pgtestfsync.sgml
index 5856356b42..467d6e647a 100644
--- a/doc/src/sgml/ref/pgtestfsync.sgml
+++ b/doc/src/sgml/ref/pgtestfsync.sgml
@@ -34,7 +34,7 @@ <title>Description</title>
   problem.  However, differences shown by
   <application>pg_test_fsync</application> might not make any significant
   difference in real database throughput, especially since many database servers
-  are not speed-limited by their transaction logs.
+  are not speed-limited by their write-ahead logs.
   <application>pg_test_fsync</application> reports average file sync operation
   time in microseconds for each <literal>wal_sync_method</literal>, which can also be used to
   inform efforts to optimize the value of <xref linkend="guc-commit-delay">.
diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml
index 241064e58e..5b6c61222a 100644
--- a/doc/src/sgml/release-10.sgml
+++ b/doc/src/sgml/release-10.sgml
@@ -2522,7 +2522,7 @@ <title><xref linkend="app-pgbasebackup"></title>
        2016-12-21 [ecbdc4c55] Forbid invalid combination of options in pg_basebackup.
        -->
        <para>
-        Allow <application>pg_basebackup</> to stream transaction log in
+        Allow <application>pg_basebackup</> to stream write-ahead log in
         tar mode (Magnus Hagander)
        </para>
 
diff --git a/src/backend/access/transam/timeline.c b/src/backend/access/transam/timeline.c
index a11f0f8526..a1f3e36d6f 100644
--- a/src/backend/access/transam/timeline.c
+++ b/src/backend/access/transam/timeline.c
@@ -151,7 +151,7 @@ readTimeLineHistory(TimeLineID targetTLI)
 		if (nfields != 3)
 			ereport(FATAL,
 					(errmsg("syntax error in history file: %s", fline),
-			   errhint("Expected a transaction log switchpoint location.")));
+			   errhint("Expected a WAL switchpoint location.")));
 
 		if (result && tli <= lasttli)
 			ereport(FATAL,
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index a89d99838a..5350555dd8 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * xlog.c
- *		PostgreSQL transaction log manager
+ *		PostgreSQL write-ahead log manager
  *
  *
  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
@@ -3532,7 +3532,7 @@ XLogFileOpen(XLogSegNo segno)
 	if (fd < 0)
 		ereport(PANIC,
 				(errcode_for_file_access(),
-			errmsg("could not open transaction log file \"%s\": %m", path)));
+			errmsg("could not open write-ahead log file \"%s\": %m", path)));
 
 	return fd;
 }
@@ -3838,7 +3838,7 @@ RemoveOldXlogFiles(XLogSegNo segno, XLogRecPtr PriorRedoPtr, XLogRecPtr endptr)
 	if (xldir == NULL)
 		ereport(ERROR,
 				(errcode_for_file_access(),
-				 errmsg("could not open transaction log directory \"%s\": %m",
+				 errmsg("could not open write-ahead log directory \"%s\": %m",
 						XLOGDIR)));
 
 	/*
@@ -3913,7 +3913,7 @@ RemoveNonParentXlogFiles(XLogRecPtr switchpoint, TimeLineID newTLI)
 	if (xldir == NULL)
 		ereport(ERROR,
 				(errcode_for_file_access(),
-				 errmsg("could not open transaction log directory \"%s\": %m",
+				 errmsg("could not open write-ahead log directory \"%s\": %m",
 						XLOGDIR)));
 
 	/*
@@ -3994,7 +3994,7 @@ RemoveXlogFile(const char *segname, XLogRecPtr PriorRedoPtr, XLogRecPtr endptr)
 							   true, recycleSegNo, true))
 	{
 		ereport(DEBUG2,
-				(errmsg("recycled transaction log file \"%s\"",
+				(errmsg("recycled write-ahead log file \"%s\"",
 						segname)));
 		CheckpointStats.ckpt_segs_recycled++;
 		/* Needn't recheck that slot on future iterations */
@@ -4006,7 +4006,7 @@ RemoveXlogFile(const char *segname, XLogRecPtr PriorRedoPtr, XLogRecPtr endptr)
 		int			rc;
 
 		ereport(DEBUG2,
-				(errmsg("removing transaction log file \"%s\"",
+				(errmsg("removing write-ahead log file \"%s\"",
 						segname)));
 
 #ifdef WIN32
@@ -4026,7 +4026,7 @@ RemoveXlogFile(const char *segname, XLogRecPtr PriorRedoPtr, XLogRecPtr endptr)
 		{
 			ereport(LOG,
 					(errcode_for_file_access(),
-			   errmsg("could not rename old transaction log file \"%s\": %m",
+			   errmsg("could not rename old write-ahead log file \"%s\": %m",
 					  path)));
 			return;
 		}
@@ -4108,7 +4108,7 @@ CleanupBackupHistory(void)
 	if (xldir == NULL)
 		ereport(ERROR,
 				(errcode_for_file_access(),
-				 errmsg("could not open transaction log directory \"%s\": %m",
+				 errmsg("could not open write-ahead log directory \"%s\": %m",
 						XLOGDIR)));
 
 	while ((xlde = ReadDir(xldir, XLOGDIR)) != NULL)
@@ -4117,9 +4117,8 @@ CleanupBackupHistory(void)
 		{
 			if (XLogArchiveCheckDone(xlde->d_name))
 			{
-				ereport(DEBUG2,
-				(errmsg("removing transaction log backup history file \"%s\"",
-						xlde->d_name)));
+				elog(DEBUG2, "removing WAL backup history file \"%s\"",
+					 xlde->d_name);
 				snprintf(path, sizeof(path), XLOGDIR "/%s", xlde->d_name);
 				unlink(path);
 				XLogArchiveCleanup(xlde->d_name);
@@ -5074,7 +5073,7 @@ BootStrapXLOG(void)
 			errno = ENOSPC;
 		ereport(PANIC,
 				(errcode_for_file_access(),
-			  errmsg("could not write bootstrap transaction log file: %m")));
+			  errmsg("could not write bootstrap write-ahead log file: %m")));
 	}
 	pgstat_report_wait_end();
 
@@ -5082,13 +5081,13 @@ BootStrapXLOG(void)
 	if (pg_fsync(openLogFile) != 0)
 		ereport(PANIC,
 				(errcode_for_file_access(),
-			  errmsg("could not fsync bootstrap transaction log file: %m")));
+			  errmsg("could not fsync bootstrap write-ahead log file: %m")));
 	pgstat_report_wait_end();
 
 	if (close(openLogFile))
 		ereport(PANIC,
 				(errcode_for_file_access(),
-			  errmsg("could not close bootstrap transaction log file: %m")));
+			  errmsg("could not close bootstrap write-ahead log file: %m")));
 
 	openLogFile = -1;
 
@@ -8426,7 +8425,7 @@ LogCheckpointEnd(bool restartpoint)
 	average_usecs = average_sync_time - (uint64) average_secs *1000000;
 
 	elog(LOG, "%s complete: wrote %d buffers (%.1f%%); "
-		 "%d transaction log file(s) added, %d removed, %d recycled; "
+		 "%d WAL file(s) added, %d removed, %d recycled; "
 		 "write=%ld.%03d s, sync=%ld.%03d s, total=%ld.%03d s; "
 		 "sync files=%d, longest=%ld.%03d s, average=%ld.%03d s; "
 		 "distance=%d kB, estimate=%d kB",
@@ -8836,7 +8835,7 @@ CreateCheckPoint(int flags)
 	 */
 	if (shutdown && checkPoint.redo != ProcLastRecPtr)
 		ereport(PANIC,
-				(errmsg("concurrent transaction log activity while database system is shutting down")));
+				(errmsg("concurrent write-ahead log activity while database system is shutting down")));
 
 	/*
 	 * Remember the prior checkpoint's redo pointer, used later to determine
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5041f0e2a9..284a532886 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -2,7 +2,7 @@
  *
  * xlogfuncs.c
  *
- * PostgreSQL transaction log manager user interface functions
+ * PostgreSQL write-ahead log manager user interface functions
  *
  * This file contains WAL control and information functions.
  *
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index fb7f2e7974..d7f2e55b09 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -2,7 +2,7 @@
  *
  * xlogutils.c
  *
- * PostgreSQL transaction log manager utility routines
+ * PostgreSQL write-ahead log manager utility routines
  *
  * This file contains support routines that are used by XLOG replay functions.
  * None of this code is used during normal system operation.
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index fe9041f748..2587ac46bb 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -625,9 +625,8 @@ CheckArchiveTimeout(void)
 			 * assume nothing happened.
 			 */
 			if ((switchpoint % XLogSegSize) != 0)
-				ereport(DEBUG1,
-						(errmsg("transaction log switch forced (archive_timeout=%d)",
-								XLogArchiveTimeout)));
+				elog(DEBUG1, "write-ahead log switch forced (archive_timeout=%d)",
+					 XLogArchiveTimeout);
 		}
 
 		/*
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c
index f3f58bd390..2dce39fdef 100644
--- a/src/backend/postmaster/pgarch.c
+++ b/src/backend/postmaster/pgarch.c
@@ -482,7 +482,7 @@ pgarch_ArchiverCopyLoop(void)
 				if (++failures >= NUM_ARCHIVE_RETRIES)
 				{
 					ereport(WARNING,
-							(errmsg("archiving transaction log file \"%s\" failed too many times, will try again later",
+							(errmsg("archiving write-ahead log file \"%s\" failed too many times, will try again later",
 									xlog)));
 					return;		/* give up archiving for now */
 				}
@@ -628,8 +628,7 @@ pgarch_archiveXlog(char *xlog)
 
 		return false;
 	}
-	ereport(DEBUG1,
-			(errmsg("archived transaction log file \"%s\"", xlog)));
+	elog(DEBUG1, "archived write-ahead log file \"%s\"", xlog);
 
 	snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog);
 	set_ps_display(activitymsg, false);
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 4a25ed8f5b..4ee9509312 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -5033,7 +5033,7 @@ sigusr1_handler(SIGNAL_ARGS)
 	{
 		/*
 		 * Send SIGUSR1 to archiver process, to wake it up and begin archiving
-		 * next transaction log file.
+		 * next WAL file.
 		 */
 		signal_child(PgArchPID, SIGUSR1);
 	}
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 95da8b7722..62aa40a583 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -563,19 +563,19 @@ exit_nicely(void)
 
 		if (made_new_xlogdir)
 		{
-			fprintf(stderr, _("%s: removing transaction log directory \"%s\"\n"),
+			fprintf(stderr, _("%s: removing WAL directory \"%s\"\n"),
 					progname, xlog_dir);
 			if (!rmtree(xlog_dir, true))
-				fprintf(stderr, _("%s: failed to remove transaction log directory\n"),
+				fprintf(stderr, _("%s: failed to remove WAL directory\n"),
 						progname);
 		}
 		else if (found_existing_xlogdir)
 		{
 			fprintf(stderr,
-			_("%s: removing contents of transaction log directory \"%s\"\n"),
+			_("%s: removing contents of WAL directory \"%s\"\n"),
 					progname, xlog_dir);
 			if (!rmtree(xlog_dir, false))
-				fprintf(stderr, _("%s: failed to remove contents of transaction log directory\n"),
+				fprintf(stderr, _("%s: failed to remove contents of WAL directory\n"),
 						progname);
 		}
 		/* otherwise died during startup, do nothing! */
@@ -589,7 +589,7 @@ exit_nicely(void)
 
 		if (made_new_xlogdir || found_existing_xlogdir)
 			fprintf(stderr,
-					_("%s: transaction log directory \"%s\" not removed at user's request\n"),
+					_("%s: WAL directory \"%s\" not removed at user's request\n"),
 					progname, xlog_dir);
 	}
 
@@ -2704,7 +2704,7 @@ create_data_directory(void)
 }
 
 
-/* Create transaction log directory, and symlink if required */
+/* Create WAL directory, and symlink if required */
 void
 create_xlog_or_symlink(void)
 {
@@ -2721,7 +2721,7 @@ create_xlog_or_symlink(void)
 		canonicalize_path(xlog_dir);
 		if (!is_absolute_path(xlog_dir))
 		{
-			fprintf(stderr, _("%s: transaction log directory location must be an absolute path\n"), progname);
+			fprintf(stderr, _("%s: WAL directory location must be an absolute path\n"), progname);
 			exit_nicely();
 		}
 
@@ -2775,8 +2775,8 @@ create_xlog_or_symlink(void)
 					warn_on_mount_point(ret);
 				else
 					fprintf(stderr,
-							_("If you want to store the transaction log there, either\n"
-							  "remove or empty the directory \"%s\".\n"),
+							_("If you want to store the WAL there, either remove or empty the directory\n"
+							  "\"%s\".\n"),
 							xlog_dir);
 				exit_nicely();
 
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index e2a2ebb30f..c7ddfcbfdf 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -174,19 +174,19 @@ cleanup_directories_atexit(void)
 
 		if (made_new_xlogdir)
 		{
-			fprintf(stderr, _("%s: removing transaction log directory \"%s\"\n"),
+			fprintf(stderr, _("%s: removing WAL directory \"%s\"\n"),
 					progname, xlog_dir);
 			if (!rmtree(xlog_dir, true))
-				fprintf(stderr, _("%s: failed to remove transaction log directory\n"),
+				fprintf(stderr, _("%s: failed to remove WAL directory\n"),
 						progname);
 		}
 		else if (found_existing_xlogdir)
 		{
 			fprintf(stderr,
-					_("%s: removing contents of transaction log directory \"%s\"\n"),
+					_("%s: removing contents of WAL directory \"%s\"\n"),
 					progname, xlog_dir);
 			if (!rmtree(xlog_dir, false))
-				fprintf(stderr, _("%s: failed to remove contents of transaction log directory\n"),
+				fprintf(stderr, _("%s: failed to remove contents of WAL directory\n"),
 						progname);
 		}
 	}
@@ -199,7 +199,7 @@ cleanup_directories_atexit(void)
 
 		if (made_new_xlogdir || found_existing_xlogdir)
 			fprintf(stderr,
-					_("%s: transaction log directory \"%s\" not removed at user's request\n"),
+					_("%s: WAL directory \"%s\" not removed at user's request\n"),
 					progname, xlog_dir);
 	}
 
@@ -341,7 +341,7 @@ usage(void)
 	  "                         relocate tablespace in OLDDIR to NEWDIR\n"));
 	printf(_("  -X, --wal-method=none|fetch|stream\n"
 			 "                         include required WAL files with specified method\n"));
-	printf(_("      --waldir=WALDIR    location for the transaction log directory\n"));
+	printf(_("      --waldir=WALDIR    location for the write-ahead log directory\n"));
 	printf(_("  -z, --gzip             compress tar output\n"));
 	printf(_("  -Z, --compress=0-9     compress tar output with given compression level\n"));
 	printf(_("\nGeneral options:\n"));
@@ -414,7 +414,7 @@ reached_end_position(XLogRecPtr segendpos, uint32 timeline,
 			if (sscanf(xlogend, "%X/%X", &hi, &lo) != 2)
 			{
 				fprintf(stderr,
-				  _("%s: could not parse transaction log location \"%s\"\n"),
+				  _("%s: could not parse write-ahead log location \"%s\"\n"),
 						progname, xlogend);
 				exit(1);
 			}
@@ -549,7 +549,7 @@ StartLogStreamer(char *startpos, uint32 timeline, char *sysidentifier)
 	if (sscanf(startpos, "%X/%X", &hi, &lo) != 2)
 	{
 		fprintf(stderr,
-				_("%s: could not parse transaction log location \"%s\"\n"),
+				_("%s: could not parse write-ahead log location \"%s\"\n"),
 				progname, startpos);
 		disconnect_and_exit(1);
 	}
@@ -1404,7 +1404,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
 						/*
 						 * When streaming WAL, pg_wal (or pg_xlog for pre-9.6
 						 * clusters) will have been created by the wal receiver
-						 * process. Also, when transaction log directory location
+						 * process. Also, when the WAL directory location
 						 * was specified, pg_wal (or pg_xlog) has already been
 						 * created as a symbolic link before starting the actual
 						 * backup. So just ignore creation failures on related
@@ -1817,7 +1817,7 @@ BaseBackup(void)
 	MemSet(xlogend, 0, sizeof(xlogend));
 
 	if (verbose && includewal != NO_WAL)
-		fprintf(stderr, _("%s: transaction log start point: %s on timeline %u\n"),
+		fprintf(stderr, _("%s: write-ahead log start point: %s on timeline %u\n"),
 				progname, xlogstart, starttli);
 
 	/*
@@ -1907,20 +1907,20 @@ BaseBackup(void)
 	if (PQresultStatus(res) != PGRES_TUPLES_OK)
 	{
 		fprintf(stderr,
-		 _("%s: could not get transaction log end position from server: %s"),
+		 _("%s: could not get write-ahead log end position from server: %s"),
 				progname, PQerrorMessage(conn));
 		disconnect_and_exit(1);
 	}
 	if (PQntuples(res) != 1)
 	{
 		fprintf(stderr,
-			 _("%s: no transaction log end position returned from server\n"),
+			 _("%s: no write-ahead log end position returned from server\n"),
 				progname);
 		disconnect_and_exit(1);
 	}
 	strlcpy(xlogend, PQgetvalue(res, 0, 0), sizeof(xlogend));
 	if (verbose && includewal != NO_WAL)
-		fprintf(stderr, _("%s: transaction log end point: %s\n"), progname, xlogend);
+		fprintf(stderr, _("%s: write-ahead log end point: %s\n"), progname, xlogend);
 	PQclear(res);
 
 	res = PQgetResult(conn);
@@ -1998,7 +1998,7 @@ BaseBackup(void)
 		if (sscanf(xlogend, "%X/%X", &hi, &lo) != 2)
 		{
 			fprintf(stderr,
-				  _("%s: could not parse transaction log location \"%s\"\n"),
+				  _("%s: could not parse write-ahead log location \"%s\"\n"),
 					progname, xlogend);
 			disconnect_and_exit(1);
 		}
@@ -2312,7 +2312,7 @@ main(int argc, char **argv)
 	if (format == 't' && includewal == STREAM_WAL && strcmp(basedir, "-") == 0)
 	{
 		fprintf(stderr,
-			_("%s: cannot stream transaction logs in tar mode to stdout\n"),
+			_("%s: cannot stream write-ahead logs in tar mode to stdout\n"),
 				progname);
 		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
 				progname);
@@ -2348,7 +2348,7 @@ main(int argc, char **argv)
 		if (format != 'p')
 		{
 			fprintf(stderr,
-					_("%s: transaction log directory location can only be specified in plain mode\n"),
+					_("%s: WAL directory location can only be specified in plain mode\n"),
 					progname);
 			fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
 					progname);
@@ -2359,7 +2359,7 @@ main(int argc, char **argv)
 		canonicalize_path(xlog_dir);
 		if (!is_absolute_path(xlog_dir))
 		{
-			fprintf(stderr, _("%s: transaction log directory location must be "
+			fprintf(stderr, _("%s: WAL directory location must be "
 							  "an absolute path\n"), progname);
 			fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
 					progname);
@@ -2393,7 +2393,7 @@ main(int argc, char **argv)
 		exit(1);
 	}
 
-	/* Create transaction log symlink, if required */
+	/* Create pg_wal symlink, if required */
 	if (strcmp(xlog_dir, "") != 0)
 	{
 		char	   *linkloc;
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index 09385c5cbf..b11984b088 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * pg_receivewal.c - receive streaming transaction log data and write it
+ * pg_receivewal.c - receive streaming WAL data and write it
  *					  to a local file.
  *
  * Author: Magnus Hagander <magnus@hagander.net>
@@ -71,18 +71,18 @@ static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
 static void
 usage(void)
 {
-	printf(_("%s receives PostgreSQL streaming transaction logs.\n\n"),
+	printf(_("%s receives PostgreSQL streaming write-ahead logs.\n\n"),
 		   progname);
 	printf(_("Usage:\n"));
 	printf(_("  %s [OPTION]...\n"), progname);
 	printf(_("\nOptions:\n"));
-	printf(_("  -D, --directory=DIR    receive transaction log files into this directory\n"));
+	printf(_("  -D, --directory=DIR    receive write-ahead log files into this directory\n"));
 	printf(_("      --if-not-exists    do not error if slot already exists when creating a slot\n"));
 	printf(_("  -n, --no-loop          do not loop on connection lost\n"));
 	printf(_("  -s, --status-interval=SECS\n"
 			 "                         time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
 	printf(_("  -S, --slot=SLOTNAME    replication slot to use\n"));
-	printf(_("      --synchronous      flush transaction log immediately after writing\n"));
+	printf(_("      --synchronous      flush write-ahead log immediately after writing\n"));
 	printf(_("  -v, --verbose          output verbose messages\n"));
 	printf(_("  -V, --version          output version information, then exit\n"));
 	printf(_("  -Z, --compress=0-9     compress logs with given compression level\n"));
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c
index c41bba28cd..0f2845bbc2 100644
--- a/src/bin/pg_basebackup/receivelog.c
+++ b/src/bin/pg_basebackup/receivelog.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * receivelog.c - receive transaction log files using the streaming
+ * receivelog.c - receive WAL files using the streaming
  *				  replication protocol.
  *
  * Author: Magnus Hagander <magnus@hagander.net>
@@ -116,7 +116,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint)
 		if (size < 0)
 		{
 			fprintf(stderr,
-			_("%s: could not get size of transaction log file \"%s\": %s\n"),
+			_("%s: could not get size of write-ahead log file \"%s\": %s\n"),
 					progname, fn, stream->walmethod->getlasterror());
 			return false;
 		}
@@ -127,7 +127,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint)
 			if (f == NULL)
 			{
 				fprintf(stderr,
-						_("%s: could not open existing transaction log file \"%s\": %s\n"),
+						_("%s: could not open existing write-ahead log file \"%s\": %s\n"),
 						progname, fn, stream->walmethod->getlasterror());
 				return false;
 			}
@@ -136,7 +136,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint)
 			if (stream->walmethod->sync(f) != 0)
 			{
 				fprintf(stderr,
-						_("%s: could not sync existing transaction log file \"%s\": %s\n"),
+						_("%s: could not sync existing write-ahead log file \"%s\": %s\n"),
 						progname, fn, stream->walmethod->getlasterror());
 				stream->walmethod->close(f, CLOSE_UNLINK);
 				return false;
@@ -151,7 +151,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint)
 			if (errno == 0)
 				errno = ENOSPC;
 			fprintf(stderr,
-					_("%s: transaction log file \"%s\" has %d bytes, should be 0 or %d\n"),
+					_("%s: write-ahead log file \"%s\" has %d bytes, should be 0 or %d\n"),
 					progname, fn, (int) size, XLogSegSize);
 			return false;
 		}
@@ -164,7 +164,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint)
 	if (f == NULL)
 	{
 		fprintf(stderr,
-				_("%s: could not open transaction log file \"%s\": %s\n"),
+				_("%s: could not open write-ahead log file \"%s\": %s\n"),
 				progname, fn, stream->walmethod->getlasterror());
 		return false;
 	}
@@ -1121,7 +1121,7 @@ ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
 		if (xlogoff != 0)
 		{
 			fprintf(stderr,
-					_("%s: received transaction log record for offset %u with no file open\n"),
+					_("%s: received write-ahead log record for offset %u with no file open\n"),
 					progname, xlogoff);
 			return false;
 		}
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index 1f2b4068d5..7ea3b0f8ee 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -282,7 +282,7 @@ RunIdentifySystem(PGconn *conn, char **sysid, TimeLineID *starttli,
 		if (sscanf(PQgetvalue(res, 0, 2), "%X/%X", &hi, &lo) != 2)
 		{
 			fprintf(stderr,
-				  _("%s: could not parse transaction log location \"%s\"\n"),
+				  _("%s: could not parse write-ahead log location \"%s\"\n"),
 					progname, PQgetvalue(res, 0, 2));
 
 			PQclear(res);
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index 73bd9fe6ec..9c3a28beb0 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -434,7 +434,7 @@ main(int argc, char *argv[])
 	if (ControlFile.state != DB_SHUTDOWNED && !force)
 	{
 		printf(_("The database server was not shut down cleanly.\n"
-			   "Resetting the transaction log might cause data to be lost.\n"
+			   "Resetting the write-ahead log might cause data to be lost.\n"
 				 "If you want to proceed anyway, use -f to force reset.\n"));
 		exit(1);
 	}
@@ -447,7 +447,7 @@ main(int argc, char *argv[])
 	KillExistingArchiveStatus();
 	WriteEmptyXLOG();
 
-	printf(_("Transaction log reset\n"));
+	printf(_("Write-ahead log reset\n"));
 	return 0;
 }
 
@@ -1159,7 +1159,7 @@ WriteEmptyXLOG(void)
 static void
 usage(void)
 {
-	printf(_("%s resets the PostgreSQL transaction log.\n\n"), progname);
+	printf(_("%s resets the PostgreSQL write-ahead log.\n\n"), progname);
 	printf(_("Usage:\n  %s [OPTION]... DATADIR\n\n"), progname);
 	printf(_("Options:\n"));
 	printf(_("  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"));
@@ -1167,7 +1167,7 @@ usage(void)
 	printf(_(" [-D] DATADIR      data directory\n"));
 	printf(_("  -e XIDEPOCH      set next transaction ID epoch\n"));
 	printf(_("  -f               force update to be done\n"));
-	printf(_("  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"));
+	printf(_("  -l WALFILE       force minimum WAL starting location for new write-ahead log\n"));
 	printf(_("  -m MXID,MXID     set next and oldest multitransaction ID\n"));
 	printf(_("  -n               no update, just show what would be done (for testing)\n"));
 	printf(_("  -o OID           set next OID\n"));
diff --git a/src/bin/pg_rewind/timeline.c b/src/bin/pg_rewind/timeline.c
index f1a792ff6b..2c33afea17 100644
--- a/src/bin/pg_rewind/timeline.c
+++ b/src/bin/pg_rewind/timeline.c
@@ -80,7 +80,7 @@ rewind_parseTimeLineHistory(char *buffer, TimeLineID targetTLI, int *nentries)
 		if (nfields != 3)
 		{
 			fprintf(stderr, _("syntax error in history file: %s\n"), fline);
-			fprintf(stderr, _("Expected a transaction log switchpoint location.\n"));
+			fprintf(stderr, _("Expected a WAL switchpoint location.\n"));
 			exit(1);
 		}
 		if (entries && tli <= lasttli)
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index 80c2c33ecb..9491ccb13b 100644
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -680,7 +680,7 @@ XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
 static void
 usage(void)
 {
-	printf(_("%s decodes and displays PostgreSQL transaction logs for debugging.\n\n"),
+	printf(_("%s decodes and displays PostgreSQL write-ahead logs for debugging.\n\n"),
 		   progname);
 	printf(_("Usage:\n"));
 	printf(_("  %s [OPTION]... [STARTSEG [ENDSEG]]\n"), progname);
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index d23aab589e..4d9773459d 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -1,7 +1,7 @@
 /*
  * xlog.h
  *
- * PostgreSQL transaction log manager
+ * PostgreSQL write-ahead log manager
  *
  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index c09c0f8e5f..6e2bfd0ad0 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -1,7 +1,7 @@
 /*
  * xlog_internal.h
  *
- * PostgreSQL transaction log internal declarations
+ * PostgreSQL write-ahead log internal declarations
  *
  * NOTE: this file is intended to contain declarations useful for
  * manipulating the XLOG files directly, but it is not supposed to be
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 53b60c1dcd..0f07bb2674 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -1,7 +1,7 @@
 /*
  * xlogdefs.h
  *
- * Postgres transaction log manager record pointer and
+ * Postgres write-ahead log manager record pointer and
  * timeline number definitions
  *
  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 51cbec8e5d..b1cbaa2eb0 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -483,7 +483,7 @@ sub append_conf
 =item $node->backup(backup_name)
 
 Create a hot backup with B<pg_basebackup> in subdirectory B<backup_name> of
-B<< $node->backup_dir >>, including the transaction logs. Transaction logs are
+B<< $node->backup_dir >>, including the WAL. WAL files
 fetched at the end of the backup, not streamed.
 
 You'll have to configure a suitable B<max_wal_senders> on the
@@ -507,7 +507,7 @@ sub backup
 =item $node->backup_fs_hot(backup_name)
 
 Create a backup with a filesystem level copy in subdirectory B<backup_name> of
-B<< $node->backup_dir >>, including transaction logs.
+B<< $node->backup_dir >>, including WAL.
 
 Archiving must be enabled, as B<pg_start_backup()> and B<pg_stop_backup()> are
 used. This is not checked or enforced.
@@ -525,7 +525,7 @@ sub backup_fs_hot
 =item $node->backup_fs_cold(backup_name)
 
 Create a backup with a filesystem level copy in subdirectory B<backup_name> of
-B<< $node->backup_dir >>, including transaction logs. The server must be
+B<< $node->backup_dir >>, including WAL. The server must be
 stopped as no attempt to handle concurrent writes is made.
 
 Use B<backup> or B<backup_fs_hot> if you want to back up a running server.
-- 
2.12.2

