From 73782518331f83279bbea950b6bd4a5cd44ec610 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 26 Jan 2017 11:24:46 -0500
Subject: [PATCH 2/4] Rename user-facing tools with "xlog" in the name to say
 "wal".

This means pg_receivexlog because pg_receivewal, pg_resetxlog
becomes pg_resetwal, and pg_xlogdump becomes pg_waldump.
---
 doc/src/sgml/protocol.sgml                    |    2 +-
 doc/src/sgml/ref/allfiles.sgml                |    6 +-
 doc/src/sgml/ref/pg_receivewal.sgml           |  399 +++++++++
 doc/src/sgml/ref/pg_receivexlog.sgml          |  399 ---------
 doc/src/sgml/ref/pg_recvlogical.sgml          |    6 +-
 doc/src/sgml/ref/pg_resetwal.sgml             |  293 ++++++
 doc/src/sgml/ref/pg_resetxlog.sgml            |  293 ------
 doc/src/sgml/ref/pg_waldump.sgml              |  237 +++++
 doc/src/sgml/ref/pg_xlogdump.sgml             |  237 -----
 doc/src/sgml/reference.sgml                   |    6 +-
 doc/src/sgml/release-9.2.sgml                 |    4 +-
 doc/src/sgml/release-9.3.sgml                 |    8 +-
 doc/src/sgml/release-9.4.sgml                 |   10 +-
 doc/src/sgml/release-9.5.sgml                 |    8 +-
 src/backend/access/rmgrdesc/xactdesc.c        |    2 +-
 src/backend/access/transam/varsup.c           |    2 +-
 src/backend/access/transam/xlogutils.c        |    2 +-
 src/backend/replication/logical/snapbuild.c   |    2 +-
 src/backend/replication/walsender.c           |    2 +-
 src/backend/utils/misc/guc.c                  |    2 +-
 src/bin/Makefile                              |    4 +-
 src/bin/pg_basebackup/.gitignore              |    2 +-
 src/bin/pg_basebackup/Makefile                |   16 +-
 src/bin/pg_basebackup/nls.mk                  |    2 +-
 src/bin/pg_basebackup/pg_receivewal.c         |  738 +++++++++++++++
 src/bin/pg_basebackup/pg_receivexlog.c        |  738 ---------------
 src/bin/pg_basebackup/t/020_pg_receivewal.pl  |    8 +
 src/bin/pg_basebackup/t/020_pg_receivexlog.pl |    8 -
 src/bin/pg_basebackup/walmethods.h            |    2 +-
 src/bin/pg_resetwal/.gitignore                |    1 +
 src/bin/pg_resetwal/Makefile                  |   35 +
 src/bin/pg_resetwal/nls.mk                    |    4 +
 src/bin/pg_resetwal/pg_resetwal.c             | 1184 +++++++++++++++++++++++++
 src/bin/pg_resetwal/po/cs.po                  |  498 +++++++++++
 src/bin/pg_resetwal/po/de.po                  |  605 +++++++++++++
 src/bin/pg_resetwal/po/es.po                  |  611 +++++++++++++
 src/bin/pg_resetwal/po/fr.po                  |  644 ++++++++++++++
 src/bin/pg_resetwal/po/it.po                  |  620 +++++++++++++
 src/bin/pg_resetwal/po/ja.po                  |  490 ++++++++++
 src/bin/pg_resetwal/po/ko.po                  |  616 +++++++++++++
 src/bin/pg_resetwal/po/pl.po                  |  626 +++++++++++++
 src/bin/pg_resetwal/po/pt_BR.po               |  603 +++++++++++++
 src/bin/pg_resetwal/po/ru.po                  |  677 ++++++++++++++
 src/bin/pg_resetwal/po/sv.po                  |  550 ++++++++++++
 src/bin/pg_resetwal/po/zh_CN.po               |  661 ++++++++++++++
 src/bin/pg_resetxlog/.gitignore               |    1 -
 src/bin/pg_resetxlog/Makefile                 |   35 -
 src/bin/pg_resetxlog/nls.mk                   |    4 -
 src/bin/pg_resetxlog/pg_resetxlog.c           | 1184 -------------------------
 src/bin/pg_resetxlog/po/cs.po                 |  498 -----------
 src/bin/pg_resetxlog/po/de.po                 |  605 -------------
 src/bin/pg_resetxlog/po/es.po                 |  611 -------------
 src/bin/pg_resetxlog/po/fr.po                 |  644 --------------
 src/bin/pg_resetxlog/po/it.po                 |  620 -------------
 src/bin/pg_resetxlog/po/ja.po                 |  490 ----------
 src/bin/pg_resetxlog/po/ko.po                 |  616 -------------
 src/bin/pg_resetxlog/po/pl.po                 |  626 -------------
 src/bin/pg_resetxlog/po/pt_BR.po              |  603 -------------
 src/bin/pg_resetxlog/po/ru.po                 |  677 --------------
 src/bin/pg_resetxlog/po/sv.po                 |  550 ------------
 src/bin/pg_resetxlog/po/zh_CN.po              |  661 --------------
 src/bin/pg_upgrade/controldata.c              |   16 +-
 src/bin/pg_upgrade/exec.c                     |    2 +-
 src/bin/pg_upgrade/pg_upgrade.c               |   14 +-
 src/bin/pg_waldump/.gitignore                 |    4 +
 src/bin/pg_waldump/Makefile                   |   40 +
 src/bin/pg_waldump/compat.c                   |   99 +++
 src/bin/pg_waldump/nls.mk                     |    6 +
 src/bin/pg_waldump/pg_waldump.c               | 1064 ++++++++++++++++++++++
 src/bin/pg_waldump/rmgrdesc.c                 |   40 +
 src/bin/pg_waldump/rmgrdesc.h                 |   22 +
 src/bin/pg_xlogdump/.gitignore                |    4 -
 src/bin/pg_xlogdump/Makefile                  |   40 -
 src/bin/pg_xlogdump/compat.c                  |   99 ---
 src/bin/pg_xlogdump/nls.mk                    |    6 -
 src/bin/pg_xlogdump/pg_xlogdump.c             | 1064 ----------------------
 src/bin/pg_xlogdump/rmgrdesc.c                |   40 -
 src/bin/pg_xlogdump/rmgrdesc.h                |   22 -
 src/include/access/xlog_internal.h            |    4 +-
 src/include/storage/bufmgr.h                  |    2 +-
 src/tools/msvc/Install.pm                     |    2 +-
 src/tools/msvc/Mkvcbuild.pm                   |   24 +-
 82 files changed, 11452 insertions(+), 11450 deletions(-)
 create mode 100644 doc/src/sgml/ref/pg_receivewal.sgml
 delete mode 100644 doc/src/sgml/ref/pg_receivexlog.sgml
 create mode 100644 doc/src/sgml/ref/pg_resetwal.sgml
 delete mode 100644 doc/src/sgml/ref/pg_resetxlog.sgml
 create mode 100644 doc/src/sgml/ref/pg_waldump.sgml
 delete mode 100644 doc/src/sgml/ref/pg_xlogdump.sgml
 create mode 100644 src/bin/pg_basebackup/pg_receivewal.c
 delete mode 100644 src/bin/pg_basebackup/pg_receivexlog.c
 create mode 100644 src/bin/pg_basebackup/t/020_pg_receivewal.pl
 delete mode 100644 src/bin/pg_basebackup/t/020_pg_receivexlog.pl
 create mode 100644 src/bin/pg_resetwal/.gitignore
 create mode 100644 src/bin/pg_resetwal/Makefile
 create mode 100644 src/bin/pg_resetwal/nls.mk
 create mode 100644 src/bin/pg_resetwal/pg_resetwal.c
 create mode 100644 src/bin/pg_resetwal/po/cs.po
 create mode 100644 src/bin/pg_resetwal/po/de.po
 create mode 100644 src/bin/pg_resetwal/po/es.po
 create mode 100644 src/bin/pg_resetwal/po/fr.po
 create mode 100644 src/bin/pg_resetwal/po/it.po
 create mode 100644 src/bin/pg_resetwal/po/ja.po
 create mode 100644 src/bin/pg_resetwal/po/ko.po
 create mode 100644 src/bin/pg_resetwal/po/pl.po
 create mode 100644 src/bin/pg_resetwal/po/pt_BR.po
 create mode 100644 src/bin/pg_resetwal/po/ru.po
 create mode 100644 src/bin/pg_resetwal/po/sv.po
 create mode 100644 src/bin/pg_resetwal/po/zh_CN.po
 delete mode 100644 src/bin/pg_resetxlog/.gitignore
 delete mode 100644 src/bin/pg_resetxlog/Makefile
 delete mode 100644 src/bin/pg_resetxlog/nls.mk
 delete mode 100644 src/bin/pg_resetxlog/pg_resetxlog.c
 delete mode 100644 src/bin/pg_resetxlog/po/cs.po
 delete mode 100644 src/bin/pg_resetxlog/po/de.po
 delete mode 100644 src/bin/pg_resetxlog/po/es.po
 delete mode 100644 src/bin/pg_resetxlog/po/fr.po
 delete mode 100644 src/bin/pg_resetxlog/po/it.po
 delete mode 100644 src/bin/pg_resetxlog/po/ja.po
 delete mode 100644 src/bin/pg_resetxlog/po/ko.po
 delete mode 100644 src/bin/pg_resetxlog/po/pl.po
 delete mode 100644 src/bin/pg_resetxlog/po/pt_BR.po
 delete mode 100644 src/bin/pg_resetxlog/po/ru.po
 delete mode 100644 src/bin/pg_resetxlog/po/sv.po
 delete mode 100644 src/bin/pg_resetxlog/po/zh_CN.po
 create mode 100644 src/bin/pg_waldump/.gitignore
 create mode 100644 src/bin/pg_waldump/Makefile
 create mode 100644 src/bin/pg_waldump/compat.c
 create mode 100644 src/bin/pg_waldump/nls.mk
 create mode 100644 src/bin/pg_waldump/pg_waldump.c
 create mode 100644 src/bin/pg_waldump/rmgrdesc.c
 create mode 100644 src/bin/pg_waldump/rmgrdesc.h
 delete mode 100644 src/bin/pg_xlogdump/.gitignore
 delete mode 100644 src/bin/pg_xlogdump/Makefile
 delete mode 100644 src/bin/pg_xlogdump/compat.c
 delete mode 100644 src/bin/pg_xlogdump/nls.mk
 delete mode 100644 src/bin/pg_xlogdump/pg_xlogdump.c
 delete mode 100644 src/bin/pg_xlogdump/rmgrdesc.c
 delete mode 100644 src/bin/pg_xlogdump/rmgrdesc.h

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 9f054ad..3f06016 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1321,7 +1321,7 @@ the connection to be used for logical replication from that database.
 psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
 </programlisting>
  However, it is often more useful to use
- <xref linkend="app-pgreceivexlog"> (for physical replication) or
+ <xref linkend="app-pgreceivewal"> (for physical replication) or
  <xref linkend="app-pgrecvlogical"> (for logical replication).
 </para>
 
diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml
index 0d09f81..2bc4d9f 100644
--- a/doc/src/sgml/ref/allfiles.sgml
+++ b/doc/src/sgml/ref/allfiles.sgml
@@ -198,15 +198,15 @@ Complete list of usable sgml source files in this directory.
 <!ENTITY pgDump             SYSTEM "pg_dump.sgml">
 <!ENTITY pgDumpall          SYSTEM "pg_dumpall.sgml">
 <!ENTITY pgIsready          SYSTEM "pg_isready.sgml">
-<!ENTITY pgReceivexlog      SYSTEM "pg_receivexlog.sgml">
+<!ENTITY pgReceivewal       SYSTEM "pg_receivewal.sgml">
 <!ENTITY pgRecvlogical      SYSTEM "pg_recvlogical.sgml">
-<!ENTITY pgResetxlog        SYSTEM "pg_resetxlog.sgml">
+<!ENTITY pgResetwal         SYSTEM "pg_resetwal.sgml">
 <!ENTITY pgRestore          SYSTEM "pg_restore.sgml">
 <!ENTITY pgRewind           SYSTEM "pg_rewind.sgml">
 <!ENTITY pgtestfsync        SYSTEM "pgtestfsync.sgml">
 <!ENTITY pgtesttiming       SYSTEM "pgtesttiming.sgml">
 <!ENTITY pgupgrade          SYSTEM "pgupgrade.sgml">
-<!ENTITY pgxlogdump         SYSTEM "pg_xlogdump.sgml">
+<!ENTITY pgwaldump         SYSTEM "pg_waldump.sgml">
 <!ENTITY postgres           SYSTEM "postgres-ref.sgml">
 <!ENTITY postmaster         SYSTEM "postmaster.sgml">
 <!ENTITY psqlRef            SYSTEM "psql-ref.sgml">
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
new file mode 100644
index 0000000..0e6b636
--- /dev/null
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -0,0 +1,399 @@
+<!--
+doc/src/sgml/ref/pg_receivewal.sgml
+PostgreSQL documentation
+-->
+
+<refentry id="app-pgreceivewal">
+ <indexterm zone="app-pgreceivewal">
+  <primary>pg_receivewal</primary>
+ </indexterm>
+
+ <refmeta>
+  <refentrytitle>pg_receivewal</refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+  <refname>pg_receivewal</refname>
+  <refpurpose>stream transaction logs from a <productname>PostgreSQL</productname> server</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+  <cmdsynopsis>
+   <command>pg_receivewal</command>
+   <arg rep="repeat"><replaceable>option</></arg>
+  </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+  <title>
+   Description
+  </title>
+  <para>
+   <application>pg_receivewal</application> is used to stream the transaction 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
+   location for doing a restore using point-in-time recovery (see
+   <xref linkend="continuous-archiving">).
+  </para>
+
+  <para>
+   <application>pg_receivewal</application> streams the transaction
+   log in real time as it's being generated on the server, and does not wait
+   for segments to complete like <xref linkend="guc-archive-command"> does.
+   For this reason, it is not necessary to set
+   <xref linkend="guc-archive-timeout"> when using
+    <application>pg_receivewal</application>.
+  </para>
+
+  <para>
+   Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivewal</>
+   by default flushes WAL data only when a WAL file is closed.
+   The option <option>--synchronous</> must be specified to flush WAL data
+   in real time.
+  </para>
+
+  <para>
+   The transaction 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
+   <xref linkend="role-attributes">), and <filename>pg_hba.conf</filename>
+   must permit the replication connection. The server must also be
+   configured with <xref linkend="guc-max-wal-senders"> set high enough to
+   leave at least one session available for the stream.
+  </para>
+
+  <para>
+   If the connection is lost, or if it cannot be initially established,
+   with a non-fatal error, <application>pg_receivewal</application> will
+   retry the connection indefinitely, and reestablish streaming as soon
+   as possible. To avoid this behavior, use the <literal>-n</literal>
+   parameter.
+  </para>
+ </refsect1>
+
+ <refsect1>
+  <title>Options</title>
+
+    <variablelist>
+     <varlistentry>
+      <term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
+      <term><option>--directory=<replaceable class="parameter">directory</replaceable></option></term>
+      <listitem>
+       <para>
+        Directory to write the output to.
+       </para>
+       <para>
+        This parameter is required.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>--if-not-exists</option></term>
+      <listitem>
+       <para>
+        Do not error out when <option>--create-slot</option> is specified
+        and a slot with the specified name already exists.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-n</option></term>
+      <term><option>--no-loop</option></term>
+      <listitem>
+       <para>
+        Don't loop on connection errors. Instead, exit right away with
+        an error.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
+      <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
+      <listitem>
+       <para>
+        Specifies the number of seconds between status packets sent back to the
+        server. This allows for easier monitoring of the progress from server.
+        A value of zero disables the periodic status updates completely,
+        although an update will still be sent when requested by the server, to
+        avoid timeout disconnect. The default value is 10 seconds.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-S <replaceable>slotname</replaceable></option></term>
+      <term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
+      <listitem>
+        <para>
+         Require <application>pg_receivewal</application> to use an existing
+         replication slot (see <xref linkend="streaming-replication-slots">).
+         When this option is used, <application>pg_receivewal</> will report
+         a flush position to the server, indicating when each segment has been
+         synchronized to disk so that the server can remove that segment if it
+         is not otherwise needed.
+        </para>
+
+        <para>
+         When the replication client
+         of <application>pg_receivewal</application> is configured on the
+         server as a synchronous standby, then using a replication slot will
+         report the flush position to the server, but only when a WAL file is
+         closed.  Therefore, that configuration will cause transactions on the
+         primary to wait for a long time and effectively not work
+         satisfactorily.  The option <literal>--synchronous</literal> (see
+         below) must be specified in addition to make this work correctly.
+        </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>--synchronous</option></term>
+      <listitem>
+       <para>
+        Flush the WAL data to disk immediately after it has been received. Also
+        send a status packet back to the server immediately after flushing,
+        regardless of <literal>--status-interval</>.
+       </para>
+
+       <para>
+        This option should be specified if the replication client
+        of <application>pg_receivewal</application> is configured on the
+        server as a synchronous standby, to ensure that timely feedback is
+        sent to the server.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-v</option></term>
+      <term><option>--verbose</option></term>
+      <listitem>
+       <para>
+        Enables verbose mode.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-Z <replaceable class="parameter">level</replaceable></option></term>
+      <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
+      <listitem>
+       <para>
+        Enables gzip compression of transaction 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.
+       </para>
+      </listitem>
+     </varlistentry>
+    </variablelist>
+
+   <para>
+    The following command-line options control the database connection parameters.
+
+    <variablelist>
+     <varlistentry>
+      <term><option>-d <replaceable class="parameter">connstr</replaceable></option></term>
+      <term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
+      <listitem>
+       <para>
+        Specifies parameters used to connect to the server, as a connection
+        string. See <xref linkend="libpq-connstring"> for more information.
+       </para>
+       <para>
+        The option is called <literal>--dbname</> for consistency with other
+        client applications, but because <application>pg_receivewal</application>
+        doesn't connect to any particular database in the cluster, database
+        name in the connection string will be ignored.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
+      <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
+      <listitem>
+       <para>
+        Specifies the host name of the machine on which the server is
+        running.  If the value begins with a slash, it is used as the
+        directory for the Unix domain socket. The default is taken
+        from the <envar>PGHOST</envar> environment variable, if set,
+        else a Unix domain socket connection is attempted.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
+      <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
+      <listitem>
+       <para>
+        Specifies the TCP port or local Unix domain socket file
+        extension on which the server is listening for connections.
+        Defaults to the <envar>PGPORT</envar> environment variable, if
+        set, or a compiled-in default.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-U <replaceable>username</replaceable></option></term>
+      <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
+      <listitem>
+       <para>
+        User name to connect as.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-w</></term>
+      <term><option>--no-password</></term>
+      <listitem>
+       <para>
+        Never issue a password prompt.  If the server requires
+        password authentication and a password is not available by
+        other means such as a <filename>.pgpass</filename> file, the
+        connection attempt will fail.  This option can be useful in
+        batch jobs and scripts where no user is present to enter a
+        password.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-W</option></term>
+      <term><option>--password</option></term>
+      <listitem>
+       <para>
+        Force <application>pg_receivewal</application> to prompt for a
+        password before connecting to a database.
+       </para>
+
+       <para>
+        This option is never essential, since
+        <application>pg_receivewal</application> will automatically prompt
+        for a password if the server demands password authentication.
+        However, <application>pg_receivewal</application> will waste a
+        connection attempt finding out that the server wants a password.
+        In some cases it is worth typing <option>-W</> to avoid the extra
+        connection attempt.
+       </para>
+      </listitem>
+     </varlistentry>
+    </variablelist>
+   </para>
+
+   <para>
+    <application>pg_receivewal</application> can perform one of the two
+    following actions in order to control physical replication slots:
+
+    <variablelist>
+     <varlistentry>
+      <term><option>--create-slot</option></term>
+      <listitem>
+       <para>
+        Create a new physical replication slot with the name specified in
+        <option>--slot</option>, then exit.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>--drop-slot</option></term>
+      <listitem>
+       <para>
+        Drop the replication slot with the name specified in
+        <option>--slot</option>, then exit.
+       </para>
+      </listitem>
+     </varlistentry>
+    </variablelist>
+   </para>
+
+   <para>
+    Other options are also available:
+
+    <variablelist>
+     <varlistentry>
+       <term><option>-V</></term>
+       <term><option>--version</></term>
+       <listitem>
+       <para>
+       Print the <application>pg_receivewal</application> version and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
+     <varlistentry>
+       <term><option>-?</></term>
+       <term><option>--help</></term>
+       <listitem>
+       <para>
+       Show help about <application>pg_receivewal</application> command line
+       arguments, and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
+    </variablelist>
+   </para>
+
+ </refsect1>
+
+ <refsect1>
+  <title>Environment</title>
+
+  <para>
+   This utility, like most other <productname>PostgreSQL</> utilities,
+   uses the environment variables supported by <application>libpq</>
+   (see <xref linkend="libpq-envars">).
+  </para>
+
+ </refsect1>
+
+ <refsect1>
+  <title>Notes</title>
+
+  <para>
+   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,
+   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
+   replication slot will fill up the server's disk space if the receiver does
+   not keep up with fetching the WAL data.
+  </para>
+
+ </refsect1>
+
+ <refsect1>
+  <title>Examples</title>
+
+  <para>
+   To stream the transaction log from the server at
+   <literal>mydbserver</literal> and store it in the local directory
+   <filename>/usr/local/pgsql/archive</filename>:
+<screen>
+<prompt>$</prompt> <userinput>pg_receivewal -h mydbserver -D /usr/local/pgsql/archive</userinput>
+</screen></para>
+ </refsect1>
+
+ <refsect1>
+  <title>See Also</title>
+
+  <simplelist type="inline">
+   <member><xref linkend="APP-PGBASEBACKUP"></member>
+  </simplelist>
+ </refsect1>
+
+</refentry>
diff --git a/doc/src/sgml/ref/pg_receivexlog.sgml b/doc/src/sgml/ref/pg_receivexlog.sgml
deleted file mode 100644
index 8c1ea9a..0000000
--- a/doc/src/sgml/ref/pg_receivexlog.sgml
+++ /dev/null
@@ -1,399 +0,0 @@
-<!--
-doc/src/sgml/ref/pg_receivexlog.sgml
-PostgreSQL documentation
--->
-
-<refentry id="app-pgreceivexlog">
- <indexterm zone="app-pgreceivexlog">
-  <primary>pg_receivexlog</primary>
- </indexterm>
-
- <refmeta>
-  <refentrytitle>pg_receivexlog</refentrytitle>
-  <manvolnum>1</manvolnum>
-  <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
-  <refname>pg_receivexlog</refname>
-  <refpurpose>stream transaction logs from a <productname>PostgreSQL</productname> server</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-  <cmdsynopsis>
-   <command>pg_receivexlog</command>
-   <arg rep="repeat"><replaceable>option</></arg>
-  </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1>
-  <title>
-   Description
-  </title>
-  <para>
-   <application>pg_receivexlog</application> is used to stream the transaction 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
-   location for doing a restore using point-in-time recovery (see
-   <xref linkend="continuous-archiving">).
-  </para>
-
-  <para>
-   <application>pg_receivexlog</application> streams the transaction
-   log in real time as it's being generated on the server, and does not wait
-   for segments to complete like <xref linkend="guc-archive-command"> does.
-   For this reason, it is not necessary to set
-   <xref linkend="guc-archive-timeout"> when using
-    <application>pg_receivexlog</application>.
-  </para>
-
-  <para>
-   Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivexlog</>
-   by default flushes WAL data only when a WAL file is closed.
-   The option <option>--synchronous</> must be specified to flush WAL data
-   in real time.
-  </para>
-
-  <para>
-   The transaction 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
-   <xref linkend="role-attributes">), and <filename>pg_hba.conf</filename>
-   must permit the replication connection. The server must also be
-   configured with <xref linkend="guc-max-wal-senders"> set high enough to
-   leave at least one session available for the stream.
-  </para>
-
-  <para>
-   If the connection is lost, or if it cannot be initially established,
-   with a non-fatal error, <application>pg_receivexlog</application> will
-   retry the connection indefinitely, and reestablish streaming as soon
-   as possible. To avoid this behavior, use the <literal>-n</literal>
-   parameter.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>Options</title>
-
-    <variablelist>
-     <varlistentry>
-      <term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
-      <term><option>--directory=<replaceable class="parameter">directory</replaceable></option></term>
-      <listitem>
-       <para>
-        Directory to write the output to.
-       </para>
-       <para>
-        This parameter is required.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>--if-not-exists</option></term>
-      <listitem>
-       <para>
-        Do not error out when <option>--create-slot</option> is specified
-        and a slot with the specified name already exists.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-n</option></term>
-      <term><option>--no-loop</option></term>
-      <listitem>
-       <para>
-        Don't loop on connection errors. Instead, exit right away with
-        an error.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
-      <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
-      <listitem>
-       <para>
-        Specifies the number of seconds between status packets sent back to the
-        server. This allows for easier monitoring of the progress from server.
-        A value of zero disables the periodic status updates completely,
-        although an update will still be sent when requested by the server, to
-        avoid timeout disconnect. The default value is 10 seconds.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-S <replaceable>slotname</replaceable></option></term>
-      <term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
-      <listitem>
-        <para>
-         Require <application>pg_receivexlog</application> to use an existing
-         replication slot (see <xref linkend="streaming-replication-slots">).
-         When this option is used, <application>pg_receivexlog</> will report
-         a flush position to the server, indicating when each segment has been
-         synchronized to disk so that the server can remove that segment if it
-         is not otherwise needed.
-        </para>
-
-        <para>
-         When the replication client
-         of <application>pg_receivexlog</application> is configured on the
-         server as a synchronous standby, then using a replication slot will
-         report the flush position to the server, but only when a WAL file is
-         closed.  Therefore, that configuration will cause transactions on the
-         primary to wait for a long time and effectively not work
-         satisfactorily.  The option <literal>--synchronous</literal> (see
-         below) must be specified in addition to make this work correctly.
-        </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>--synchronous</option></term>
-      <listitem>
-       <para>
-        Flush the WAL data to disk immediately after it has been received. Also
-        send a status packet back to the server immediately after flushing,
-        regardless of <literal>--status-interval</>.
-       </para>
-
-       <para>
-        This option should be specified if the replication client
-        of <application>pg_receivexlog</application> is configured on the
-        server as a synchronous standby, to ensure that timely feedback is
-        sent to the server.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-v</option></term>
-      <term><option>--verbose</option></term>
-      <listitem>
-       <para>
-        Enables verbose mode.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-Z <replaceable class="parameter">level</replaceable></option></term>
-      <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
-      <listitem>
-       <para>
-        Enables gzip compression of transaction 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.
-       </para>
-      </listitem>
-     </varlistentry>
-    </variablelist>
-
-   <para>
-    The following command-line options control the database connection parameters.
-
-    <variablelist>
-     <varlistentry>
-      <term><option>-d <replaceable class="parameter">connstr</replaceable></option></term>
-      <term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
-      <listitem>
-       <para>
-        Specifies parameters used to connect to the server, as a connection
-        string. See <xref linkend="libpq-connstring"> for more information.
-       </para>
-       <para>
-        The option is called <literal>--dbname</> for consistency with other
-        client applications, but because <application>pg_receivexlog</application>
-        doesn't connect to any particular database in the cluster, database
-        name in the connection string will be ignored.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
-      <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
-      <listitem>
-       <para>
-        Specifies the host name of the machine on which the server is
-        running.  If the value begins with a slash, it is used as the
-        directory for the Unix domain socket. The default is taken
-        from the <envar>PGHOST</envar> environment variable, if set,
-        else a Unix domain socket connection is attempted.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
-      <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
-      <listitem>
-       <para>
-        Specifies the TCP port or local Unix domain socket file
-        extension on which the server is listening for connections.
-        Defaults to the <envar>PGPORT</envar> environment variable, if
-        set, or a compiled-in default.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-U <replaceable>username</replaceable></option></term>
-      <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
-      <listitem>
-       <para>
-        User name to connect as.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-w</></term>
-      <term><option>--no-password</></term>
-      <listitem>
-       <para>
-        Never issue a password prompt.  If the server requires
-        password authentication and a password is not available by
-        other means such as a <filename>.pgpass</filename> file, the
-        connection attempt will fail.  This option can be useful in
-        batch jobs and scripts where no user is present to enter a
-        password.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-W</option></term>
-      <term><option>--password</option></term>
-      <listitem>
-       <para>
-        Force <application>pg_receivexlog</application> to prompt for a
-        password before connecting to a database.
-       </para>
-
-       <para>
-        This option is never essential, since
-        <application>pg_receivexlog</application> will automatically prompt
-        for a password if the server demands password authentication.
-        However, <application>pg_receivexlog</application> will waste a
-        connection attempt finding out that the server wants a password.
-        In some cases it is worth typing <option>-W</> to avoid the extra
-        connection attempt.
-       </para>
-      </listitem>
-     </varlistentry>
-    </variablelist>
-   </para>
-
-   <para>
-    <application>pg_receivexlog</application> can perform one of the two
-    following actions in order to control physical replication slots:
-
-    <variablelist>
-     <varlistentry>
-      <term><option>--create-slot</option></term>
-      <listitem>
-       <para>
-        Create a new physical replication slot with the name specified in
-        <option>--slot</option>, then exit.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>--drop-slot</option></term>
-      <listitem>
-       <para>
-        Drop the replication slot with the name specified in
-        <option>--slot</option>, then exit.
-       </para>
-      </listitem>
-     </varlistentry>
-    </variablelist>
-   </para>
-
-   <para>
-    Other options are also available:
-
-    <variablelist>
-     <varlistentry>
-       <term><option>-V</></term>
-       <term><option>--version</></term>
-       <listitem>
-       <para>
-       Print the <application>pg_receivexlog</application> version and exit.
-       </para>
-       </listitem>
-     </varlistentry>
-
-     <varlistentry>
-       <term><option>-?</></term>
-       <term><option>--help</></term>
-       <listitem>
-       <para>
-       Show help about <application>pg_receivexlog</application> command line
-       arguments, and exit.
-       </para>
-       </listitem>
-     </varlistentry>
-
-    </variablelist>
-   </para>
-
- </refsect1>
-
- <refsect1>
-  <title>Environment</title>
-
-  <para>
-   This utility, like most other <productname>PostgreSQL</> utilities,
-   uses the environment variables supported by <application>libpq</>
-   (see <xref linkend="libpq-envars">).
-  </para>
-
- </refsect1>
-
- <refsect1>
-  <title>Notes</title>
-
-  <para>
-   When using <application>pg_receivexlog</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,
-   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
-   replication slot will fill up the server's disk space if the receiver does
-   not keep up with fetching the WAL data.
-  </para>
-
- </refsect1>
-
- <refsect1>
-  <title>Examples</title>
-
-  <para>
-   To stream the transaction log from the server at
-   <literal>mydbserver</literal> and store it in the local directory
-   <filename>/usr/local/pgsql/archive</filename>:
-<screen>
-<prompt>$</prompt> <userinput>pg_receivexlog -h mydbserver -D /usr/local/pgsql/archive</userinput>
-</screen></para>
- </refsect1>
-
- <refsect1>
-  <title>See Also</title>
-
-  <simplelist type="inline">
-   <member><xref linkend="APP-PGBASEBACKUP"></member>
-  </simplelist>
- </refsect1>
-
-</refentry>
diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml
index d066ce8..eaea94d 100644
--- a/doc/src/sgml/ref/pg_recvlogical.sgml
+++ b/doc/src/sgml/ref/pg_recvlogical.sgml
@@ -35,7 +35,7 @@ PostgreSQL documentation
 
   <para>
    It creates a replication-mode connection, so it is subject to the same
-   constraints as <xref linkend="app-pgreceivexlog">, plus those for logical
+   constraints as <xref linkend="app-pgreceivewal">, plus those for logical
    replication (see <xref linkend="logicaldecoding">).
   </para>
 
@@ -238,7 +238,7 @@ PostgreSQL documentation
       <listitem>
        <para>
         This option has the same effect as the option of the same name
-        in <xref linkend="app-pgreceivexlog">.  See the description there.
+        in <xref linkend="app-pgreceivewal">.  See the description there.
        </para>
       </listitem>
      </varlistentry>
@@ -411,7 +411,7 @@ PostgreSQL documentation
   <title>See Also</title>
 
   <simplelist type="inline">
-   <member><xref linkend="app-pgreceivexlog"></member>
+   <member><xref linkend="app-pgreceivewal"></member>
   </simplelist>
  </refsect1>
 </refentry>
diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml
new file mode 100644
index 0000000..0cc6fb4
--- /dev/null
+++ b/doc/src/sgml/ref/pg_resetwal.sgml
@@ -0,0 +1,293 @@
+<!--
+doc/src/sgml/ref/pg_resetwal.sgml
+PostgreSQL documentation
+-->
+
+<refentry id="APP-PGRESETWAL">
+ <indexterm zone="app-pgresetwal">
+  <primary>pg_resetwal</primary>
+ </indexterm>
+
+ <refmeta>
+  <refentrytitle><application>pg_resetwal</application></refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+  <refname>pg_resetwal</refname>
+  <refpurpose>reset the write-ahead log and other control information of a <productname>PostgreSQL</productname> database cluster</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+  <cmdsynopsis>
+   <command>pg_resetwal</command>
+   <arg choice="opt"><option>-f</option></arg>
+   <arg choice="opt"><option>-n</option></arg>
+   <arg rep="repeat"><replaceable>option</replaceable></arg>
+   <arg choice="req"><arg choice="opt"><option>-D</option></arg> <replaceable class="parameter">datadir</replaceable></arg>
+  </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="R1-APP-PGRESETWAL-1">
+  <title>Description</title>
+  <para>
+   <command>pg_resetwal</command> clears the write-ahead log (WAL) and
+   optionally resets some other control information stored in the
+   <filename>pg_control</> file.  This function is sometimes needed
+   if these files have become corrupted.  It should be used only as a
+   last resort, when the server will not start due to such corruption.
+  </para>
+
+  <para>
+   After running this command, it should be possible to start the server,
+   but bear in mind that the database might contain inconsistent data due to
+   partially-committed transactions.  You should immediately dump your data,
+   run <command>initdb</>, and reload.  After reload, check for
+   inconsistencies and repair as needed.
+  </para>
+
+  <para>
+   This utility can only be run by the user who installed the server, because
+   it requires read/write access to the data directory.
+   For safety reasons, you must specify the data directory on the command line.
+   <command>pg_resetwal</command> does not use the environment variable
+   <envar>PGDATA</>.
+  </para>
+
+  <para>
+   If <command>pg_resetwal</command> complains that it cannot determine
+   valid data for <filename>pg_control</>, you can force it to proceed anyway
+   by specifying the <option>-f</> (force) option.  In this case plausible
+   values will be substituted for the missing data.  Most of the fields can be
+   expected to match, but manual assistance might be needed for the next OID,
+   next transaction ID and epoch, next multitransaction ID and offset, and
+   WAL starting address fields. These fields can be set using the options
+   discussed below. If you are not able to determine correct values for all
+   these fields, <option>-f</> can still be used, but
+   the recovered database must be treated with even more suspicion than
+   usual: an immediate dump and reload is imperative.  <emphasis>Do not</>
+   execute any data-modifying operations in the database before you dump,
+   as any such action is likely to make the corruption worse.
+  </para>
+ </refsect1>
+
+ <refsect1>
+  <title>Options</title>
+
+  <variablelist>
+   <varlistentry>
+    <term><option>-f</option></term>
+    <listitem>
+     <para>
+      Force <command>pg_resetwal</command> to proceed even if it cannot determine
+      valid data for <filename>pg_control</>, as explained above.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-n</option></term>
+    <listitem>
+     <para>
+      The <option>-n</> (no operation) option instructs
+      <command>pg_resetwal</command> to print the values reconstructed from
+      <filename>pg_control</> and values about to be changed, and then exit
+      without modifying anything. This is mainly a debugging tool, but can be
+      useful as a sanity check before allowing <command>pg_resetwal</command>
+      to proceed for real.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-V</option></term>
+    <term><option>--version</option></term>
+    <listitem><para>Display version information, then exit.</para></listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-?</option></term>
+    <term><option>--help</option></term>
+    <listitem><para>Show help, then exit.</para></listitem>
+   </varlistentry>
+  </variablelist>
+
+  <para>
+   The following options are only needed when
+   <command>pg_resetwal</command> is unable to determine appropriate values
+   by reading <filename>pg_control</>.  Safe values can be determined as
+   described below.  For values that take numeric arguments, hexadecimal
+   values can be specified by using the prefix <literal>0x</literal>.
+  </para>
+
+  <variablelist>
+   <varlistentry>
+    <term><option>-c</option> <replaceable class="parameter">xid</replaceable>,<replaceable class="parameter">xid</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the oldest and newest transaction IDs for which the commit
+      time can be retrieved.
+     </para>
+
+     <para>
+      A safe value for the oldest transaction ID for which the commit time can
+      be retrieved (first part) can be determined by looking
+      for the numerically smallest file name in the directory
+      <filename>pg_commit_ts</> under the data directory.  Conversely, a safe
+      value for the newest transaction ID for which the commit time can be
+      retrieved (second part) can be determined by looking for the numerically
+      greatest file name in the same directory.  The file names are in
+      hexadecimal.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-e</option> <replaceable class="parameter">xid_epoch</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the next transaction ID's epoch.
+     </para>
+
+     <para>
+      The transaction ID epoch is not actually stored anywhere in the database
+      except in the field that is set by <command>pg_resetwal</command>,
+      so any value will work so far as the database itself is concerned.
+      You might need to adjust this value to ensure that replication
+      systems such as <application>Slony-I</> and
+      <application>Skytools</> work correctly &mdash;
+      if so, an appropriate value should be obtainable from the state of
+      the downstream replicated database.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-l</option> <replaceable class="parameter">walfile</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the WAL starting address.
+     </para>
+
+     <para>
+      The WAL starting address should be
+      larger than any WAL segment file name currently existing in
+      the directory <filename>pg_wal</> under the data directory.
+      These names are also in hexadecimal and have three parts.  The first
+      part is the <quote>timeline ID</> and should usually be kept the same.
+      For example, if <filename>00000001000000320000004A</> is the
+      largest entry in <filename>pg_wal</>, use <literal>-l 00000001000000320000004B</> or higher.
+     </para>
+
+     <note>
+      <para>
+       <command>pg_resetwal</command> itself looks at the files in
+       <filename>pg_wal</> and chooses a default <option>-l</> setting
+       beyond the last existing file name.  Therefore, manual adjustment of
+       <option>-l</> should only be needed if you are aware of WAL segment
+       files that are not currently present in <filename>pg_wal</>, such as
+       entries in an offline archive; or if the contents of
+       <filename>pg_wal</> have been lost entirely.
+      </para>
+     </note>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-m</option> <replaceable class="parameter">mxid</replaceable>,<replaceable class="parameter">mxid</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the next and oldest multitransaction ID.
+     </para>
+
+     <para>
+      A safe value for the next multitransaction ID (first part) can be
+      determined by looking for the numerically largest file name in the
+      directory <filename>pg_multixact/offsets</> under the data directory,
+      adding one, and then multiplying by 65536 (0x10000).  Conversely, a safe
+      value for the oldest multitransaction ID (second part of
+      <option>-m</>) can be determined by looking for the numerically smallest
+      file name in the same directory and multiplying by 65536.  The file
+      names are in hexadecimal, so the easiest way to do this is to specify
+      the option value in hexadecimal and append four zeroes.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-o</option> <replaceable class="parameter">oid</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the next OID.
+     </para>
+
+     <para>
+      There is no comparably easy way to determine a next OID that's beyond
+      the largest one in the database, but fortunately it is not critical to
+      get the next-OID setting right.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-O</option> <replaceable class="parameter">mxoff</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the next multitransaction offset.
+     </para>
+
+     <para>
+      A safe value can be determined by looking for the numerically largest
+      file name in the directory <filename>pg_multixact/members</> under the
+      data directory, adding one, and then multiplying by 52352 (0xCC80).
+      The file names are in hexadecimal.  There is no simple recipe such as
+      the ones for other options of appending zeroes.
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
+    <term><option>-x</option> <replaceable class="parameter">xid</replaceable></term>
+    <listitem>
+     <para>
+      Manually set the next transaction ID.
+     </para>
+
+     <para>
+      A safe value can be determined by looking for the numerically largest
+      file name in the directory <filename>pg_clog</> under the data directory,
+      adding one,
+      and then multiplying by 1048576 (0x100000).  Note that the file names are in
+      hexadecimal.  It is usually easiest to specify the option value in
+      hexadecimal too. For example, if <filename>0011</> is the largest entry
+      in <filename>pg_clog</>, <literal>-x 0x1200000</> will work (five
+      trailing zeroes provide the proper multiplier).
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </refsect1>
+
+ <refsect1>
+  <title>Notes</title>
+
+  <para>
+   This command must not be used when the server is
+   running.  <command>pg_resetwal</command> will refuse to start up if
+   it finds a server lock file in the data directory.  If the
+   server crashed then a lock file might have been left
+   behind; in that case you can remove the lock file to allow
+   <command>pg_resetwal</command> to run.  But before you do
+   so, make doubly certain that there is no server process still alive.
+  </para>
+ </refsect1>
+
+ <refsect1>
+  <title>See Also</title>
+
+  <simplelist type="inline">
+   <member><xref linkend="app-pgcontroldata"></member>
+  </simplelist>
+ </refsect1>
+</refentry>
diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml
deleted file mode 100644
index c949c5e..0000000
--- a/doc/src/sgml/ref/pg_resetxlog.sgml
+++ /dev/null
@@ -1,293 +0,0 @@
-<!--
-doc/src/sgml/ref/pg_resetxlog.sgml
-PostgreSQL documentation
--->
-
-<refentry id="APP-PGRESETXLOG">
- <indexterm zone="app-pgresetxlog">
-  <primary>pg_resetxlog</primary>
- </indexterm>
-
- <refmeta>
-  <refentrytitle><application>pg_resetxlog</application></refentrytitle>
-  <manvolnum>1</manvolnum>
-  <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
-  <refname>pg_resetxlog</refname>
-  <refpurpose>reset the write-ahead log and other control information of a <productname>PostgreSQL</productname> database cluster</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-  <cmdsynopsis>
-   <command>pg_resetxlog</command>
-   <arg choice="opt"><option>-f</option></arg>
-   <arg choice="opt"><option>-n</option></arg>
-   <arg rep="repeat"><replaceable>option</replaceable></arg>
-   <arg choice="req"><arg choice="opt"><option>-D</option></arg> <replaceable class="parameter">datadir</replaceable></arg>
-  </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="R1-APP-PGRESETXLOG-1">
-  <title>Description</title>
-  <para>
-   <command>pg_resetxlog</command> clears the write-ahead log (WAL) and
-   optionally resets some other control information stored in the
-   <filename>pg_control</> file.  This function is sometimes needed
-   if these files have become corrupted.  It should be used only as a
-   last resort, when the server will not start due to such corruption.
-  </para>
-
-  <para>
-   After running this command, it should be possible to start the server,
-   but bear in mind that the database might contain inconsistent data due to
-   partially-committed transactions.  You should immediately dump your data,
-   run <command>initdb</>, and reload.  After reload, check for
-   inconsistencies and repair as needed.
-  </para>
-
-  <para>
-   This utility can only be run by the user who installed the server, because
-   it requires read/write access to the data directory.
-   For safety reasons, you must specify the data directory on the command line.
-   <command>pg_resetxlog</command> does not use the environment variable
-   <envar>PGDATA</>.
-  </para>
-
-  <para>
-   If <command>pg_resetxlog</command> complains that it cannot determine
-   valid data for <filename>pg_control</>, you can force it to proceed anyway
-   by specifying the <option>-f</> (force) option.  In this case plausible
-   values will be substituted for the missing data.  Most of the fields can be
-   expected to match, but manual assistance might be needed for the next OID,
-   next transaction ID and epoch, next multitransaction ID and offset, and
-   WAL starting address fields. These fields can be set using the options
-   discussed below. If you are not able to determine correct values for all
-   these fields, <option>-f</> can still be used, but
-   the recovered database must be treated with even more suspicion than
-   usual: an immediate dump and reload is imperative.  <emphasis>Do not</>
-   execute any data-modifying operations in the database before you dump,
-   as any such action is likely to make the corruption worse.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>Options</title>
-
-  <variablelist>
-   <varlistentry>
-    <term><option>-f</option></term>
-    <listitem>
-     <para>
-      Force <command>pg_resetxlog</command> to proceed even if it cannot determine
-      valid data for <filename>pg_control</>, as explained above.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-n</option></term>
-    <listitem>
-     <para>
-      The <option>-n</> (no operation) option instructs
-      <command>pg_resetxlog</command> to print the values reconstructed from
-      <filename>pg_control</> and values about to be changed, and then exit
-      without modifying anything. This is mainly a debugging tool, but can be
-      useful as a sanity check before allowing <command>pg_resetxlog</command>
-      to proceed for real.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-V</option></term>
-    <term><option>--version</option></term>
-    <listitem><para>Display version information, then exit.</para></listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-?</option></term>
-    <term><option>--help</option></term>
-    <listitem><para>Show help, then exit.</para></listitem>
-   </varlistentry>
-  </variablelist>
-
-  <para>
-   The following options are only needed when
-   <command>pg_resetxlog</command> is unable to determine appropriate values
-   by reading <filename>pg_control</>.  Safe values can be determined as
-   described below.  For values that take numeric arguments, hexadecimal
-   values can be specified by using the prefix <literal>0x</literal>.
-  </para>
-
-  <variablelist>
-   <varlistentry>
-    <term><option>-c</option> <replaceable class="parameter">xid</replaceable>,<replaceable class="parameter">xid</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the oldest and newest transaction IDs for which the commit
-      time can be retrieved.
-     </para>
-
-     <para>
-      A safe value for the oldest transaction ID for which the commit time can
-      be retrieved (first part) can be determined by looking
-      for the numerically smallest file name in the directory
-      <filename>pg_commit_ts</> under the data directory.  Conversely, a safe
-      value for the newest transaction ID for which the commit time can be
-      retrieved (second part) can be determined by looking for the numerically
-      greatest file name in the same directory.  The file names are in
-      hexadecimal.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-e</option> <replaceable class="parameter">xid_epoch</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the next transaction ID's epoch.
-     </para>
-
-     <para>
-      The transaction ID epoch is not actually stored anywhere in the database
-      except in the field that is set by <command>pg_resetxlog</command>,
-      so any value will work so far as the database itself is concerned.
-      You might need to adjust this value to ensure that replication
-      systems such as <application>Slony-I</> and
-      <application>Skytools</> work correctly &mdash;
-      if so, an appropriate value should be obtainable from the state of
-      the downstream replicated database.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-l</option> <replaceable class="parameter">xlogfile</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the WAL starting address.
-     </para>
-
-     <para>
-      The WAL starting address should be
-      larger than any WAL segment file name currently existing in
-      the directory <filename>pg_wal</> under the data directory.
-      These names are also in hexadecimal and have three parts.  The first
-      part is the <quote>timeline ID</> and should usually be kept the same.
-      For example, if <filename>00000001000000320000004A</> is the
-      largest entry in <filename>pg_wal</>, use <literal>-l 00000001000000320000004B</> or higher.
-     </para>
-
-     <note>
-      <para>
-       <command>pg_resetxlog</command> itself looks at the files in
-       <filename>pg_wal</> and chooses a default <option>-l</> setting
-       beyond the last existing file name.  Therefore, manual adjustment of
-       <option>-l</> should only be needed if you are aware of WAL segment
-       files that are not currently present in <filename>pg_wal</>, such as
-       entries in an offline archive; or if the contents of
-       <filename>pg_wal</> have been lost entirely.
-      </para>
-     </note>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-m</option> <replaceable class="parameter">mxid</replaceable>,<replaceable class="parameter">mxid</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the next and oldest multitransaction ID.
-     </para>
-
-     <para>
-      A safe value for the next multitransaction ID (first part) can be
-      determined by looking for the numerically largest file name in the
-      directory <filename>pg_multixact/offsets</> under the data directory,
-      adding one, and then multiplying by 65536 (0x10000).  Conversely, a safe
-      value for the oldest multitransaction ID (second part of
-      <option>-m</>) can be determined by looking for the numerically smallest
-      file name in the same directory and multiplying by 65536.  The file
-      names are in hexadecimal, so the easiest way to do this is to specify
-      the option value in hexadecimal and append four zeroes.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-o</option> <replaceable class="parameter">oid</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the next OID.
-     </para>
-
-     <para>
-      There is no comparably easy way to determine a next OID that's beyond
-      the largest one in the database, but fortunately it is not critical to
-      get the next-OID setting right.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-O</option> <replaceable class="parameter">mxoff</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the next multitransaction offset.
-     </para>
-
-     <para>
-      A safe value can be determined by looking for the numerically largest
-      file name in the directory <filename>pg_multixact/members</> under the
-      data directory, adding one, and then multiplying by 52352 (0xCC80).
-      The file names are in hexadecimal.  There is no simple recipe such as
-      the ones for other options of appending zeroes.
-     </para>
-    </listitem>
-   </varlistentry>
-
-   <varlistentry>
-    <term><option>-x</option> <replaceable class="parameter">xid</replaceable></term>
-    <listitem>
-     <para>
-      Manually set the next transaction ID.
-     </para>
-
-     <para>
-      A safe value can be determined by looking for the numerically largest
-      file name in the directory <filename>pg_clog</> under the data directory,
-      adding one,
-      and then multiplying by 1048576 (0x100000).  Note that the file names are in
-      hexadecimal.  It is usually easiest to specify the option value in
-      hexadecimal too. For example, if <filename>0011</> is the largest entry
-      in <filename>pg_clog</>, <literal>-x 0x1200000</> will work (five
-      trailing zeroes provide the proper multiplier).
-     </para>
-    </listitem>
-   </varlistentry>
-  </variablelist>
- </refsect1>
-
- <refsect1>
-  <title>Notes</title>
-
-  <para>
-   This command must not be used when the server is
-   running.  <command>pg_resetxlog</command> will refuse to start up if
-   it finds a server lock file in the data directory.  If the
-   server crashed then a lock file might have been left
-   behind; in that case you can remove the lock file to allow
-   <command>pg_resetxlog</command> to run.  But before you do
-   so, make doubly certain that there is no server process still alive.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>See Also</title>
-
-  <simplelist type="inline">
-   <member><xref linkend="app-pgcontroldata"></member>
-  </simplelist>
- </refsect1>
-</refentry>
diff --git a/doc/src/sgml/ref/pg_waldump.sgml b/doc/src/sgml/ref/pg_waldump.sgml
new file mode 100644
index 0000000..4c92eee
--- /dev/null
+++ b/doc/src/sgml/ref/pg_waldump.sgml
@@ -0,0 +1,237 @@
+<!--
+doc/src/sgml/ref/pg_waldump.sgml
+PostgreSQL documentation
+-->
+
+<refentry id="pgwaldump">
+ <indexterm zone="pgwaldump">
+  <primary>pg_waldump</primary>
+ </indexterm>
+
+ <refmeta>
+  <refentrytitle><application>pg_waldump</application></refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+  <refname>pg_waldump</refname>
+  <refpurpose>display a human-readable rendering of the write-ahead log of a <productname>PostgreSQL</productname> database cluster</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+  <cmdsynopsis>
+   <command>pg_waldump</command>
+   <arg rep="repeat" choice="opt"><option>option</option></arg>
+   <arg choice="opt"><option>startseg</option>
+    <arg choice="opt"><option>endseg</option></arg>
+   </arg>
+  </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="R1-APP-PGWALDUMP-1">
+  <title>Description</title>
+  <para>
+   <command>pg_waldump</command> displays the write-ahead log (WAL) and is mainly
+   useful for debugging or educational purposes.
+  </para>
+
+  <para>
+   This utility can only be run by the user who installed the server, because
+   it requires read-only access to the data directory.
+  </para>
+ </refsect1>
+
+ <refsect1>
+  <title>Options</title>
+
+   <para>
+    The following command-line options control the location and format of the
+    output:
+
+    <variablelist>
+
+     <varlistentry>
+      <term><replaceable class="parameter">startseg</replaceable></term>
+      <listitem>
+       <para>
+        Start reading at the specified log segment file.  This implicitly determines
+        the path in which files will be searched for, and the timeline to use.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><replaceable class="parameter">endseg</replaceable></term>
+      <listitem>
+       <para>
+        Stop after reading the specified log segment file.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-b</option></term>
+      <term><option>--bkp-details</option></term>
+      <listitem>
+       <para>
+        Output detailed information about backup blocks.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-e <replaceable>end</replaceable></option></term>
+      <term><option>--end=<replaceable>end</replaceable></option></term>
+      <listitem>
+       <para>
+        Stop reading at the specified log position, instead of reading to the
+        end of the log stream.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-f</option></term>
+      <term><option>--follow</option></term>
+      <listitem>
+       <para>
+        After reaching the end of valid WAL, keep polling once per second for
+        new WAL to appear.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-n <replaceable>limit</replaceable></option></term>
+      <term><option>--limit=<replaceable>limit</replaceable></option></term>
+      <listitem>
+       <para>
+        Display the specified number of records, then stop.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-p <replaceable>path</replaceable></option></term>
+      <term><option>--path=<replaceable>path</replaceable></option></term>
+      <listitem>
+       <para>
+        Specifies a directory to search for log segment files or a
+        directory with a <literal>pg_wal</literal> subdirectory that
+        contains such files.  The default is to search in the current
+        directory, the <literal>pg_wal</literal> subdirectory of the
+        current directory, and the <literal>pg_wal</literal> subdirectory
+        of <envar>PGDATA</envar>.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-r <replaceable>rmgr</replaceable></option></term>
+      <term><option>--rmgr=<replaceable>rmgr</replaceable></option></term>
+      <listitem>
+       <para>
+        Only display records generated by the specified resource manager.
+        If <literal>list</> is passed as name, print a list of valid resource manager
+        names, and exit.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-s <replaceable>start</replaceable></option></term>
+      <term><option>--start=<replaceable>start</replaceable></option></term>
+      <listitem>
+       <para>
+        Log position at which to start reading. The default is to start reading
+        the first valid log record found in the earliest file found.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-t <replaceable>timeline</replaceable></option></term>
+      <term><option>--timeline=<replaceable>timeline</replaceable></option></term>
+      <listitem>
+       <para>
+        Timeline from which to read log records. The default is to use the
+        value in <replaceable>startseg</>, if that is specified; otherwise, the
+        default is 1.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+       <term><option>-V</></term>
+       <term><option>--version</></term>
+       <listitem>
+       <para>
+       Print the <application>pg_waldump</application> version and exit.
+       </para>
+       </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-x <replaceable>xid</replaceable></option></term>
+      <term><option>--xid=<replaceable>xid</replaceable></option></term>
+      <listitem>
+       <para>
+        Only display records marked with the given transaction ID.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-z</option></term>
+      <term><option>--stats[=record]</option></term>
+      <listitem>
+       <para>
+        Display summary statistics (number and size of records and
+        full-page images) instead of individual records. Optionally
+        generate statistics per-record instead of per-rmgr.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term><option>-?</></term>
+      <term><option>--help</></term>
+       <listitem>
+        <para>
+         Show help about <application>pg_waldump</application> command line
+         arguments, and exit.
+        </para>
+       </listitem>
+      </varlistentry>
+    </variablelist>
+   </para>
+ </refsect1>
+
+ <refsect1>
+  <title>Notes</title>
+  <para>
+    Can give wrong results when the server is running.
+  </para>
+
+  <para>
+    Only the specified timeline is displayed (or the default, if none is
+    specified). Records in other timelines are ignored.
+  </para>
+
+  <para>
+    <application>pg_waldump</> cannot read WAL files with suffix
+    <literal>.partial</>. If those files need to be read, <literal>.partial</>
+    suffix needs to be removed from the file name.
+  </para>
+ </refsect1>
+
+ <refsect1>
+  <title>See Also</title>
+
+  <simplelist type="inline">
+   <member><xref linkend="wal-internals"></member>
+  </simplelist>
+ </refsect1>
+
+</refentry>
diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml
deleted file mode 100644
index 078b08e..0000000
--- a/doc/src/sgml/ref/pg_xlogdump.sgml
+++ /dev/null
@@ -1,237 +0,0 @@
-<!--
-doc/src/sgml/ref/pg_xlogdump.sgml
-PostgreSQL documentation
--->
-
-<refentry id="pgxlogdump">
- <indexterm zone="pgxlogdump">
-  <primary>pg_xlogdump</primary>
- </indexterm>
-
- <refmeta>
-  <refentrytitle><application>pg_xlogdump</application></refentrytitle>
-  <manvolnum>1</manvolnum>
-  <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
-  <refname>pg_xlogdump</refname>
-  <refpurpose>display a human-readable rendering of the write-ahead log of a <productname>PostgreSQL</productname> database cluster</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
-  <cmdsynopsis>
-   <command>pg_xlogdump</command>
-   <arg rep="repeat" choice="opt"><option>option</option></arg>
-   <arg choice="opt"><option>startseg</option>
-    <arg choice="opt"><option>endseg</option></arg>
-   </arg>
-  </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="R1-APP-PGXLOGDUMP-1">
-  <title>Description</title>
-  <para>
-   <command>pg_xlogdump</command> displays the write-ahead log (WAL) and is mainly
-   useful for debugging or educational purposes.
-  </para>
-
-  <para>
-   This utility can only be run by the user who installed the server, because
-   it requires read-only access to the data directory.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>Options</title>
-
-   <para>
-    The following command-line options control the location and format of the
-    output:
-
-    <variablelist>
-
-     <varlistentry>
-      <term><replaceable class="parameter">startseg</replaceable></term>
-      <listitem>
-       <para>
-        Start reading at the specified log segment file.  This implicitly determines
-        the path in which files will be searched for, and the timeline to use.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><replaceable class="parameter">endseg</replaceable></term>
-      <listitem>
-       <para>
-        Stop after reading the specified log segment file.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-b</option></term>
-      <term><option>--bkp-details</option></term>
-      <listitem>
-       <para>
-        Output detailed information about backup blocks.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-e <replaceable>end</replaceable></option></term>
-      <term><option>--end=<replaceable>end</replaceable></option></term>
-      <listitem>
-       <para>
-        Stop reading at the specified log position, instead of reading to the
-        end of the log stream.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-f</option></term>
-      <term><option>--follow</option></term>
-      <listitem>
-       <para>
-        After reaching the end of valid WAL, keep polling once per second for
-        new WAL to appear.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-n <replaceable>limit</replaceable></option></term>
-      <term><option>--limit=<replaceable>limit</replaceable></option></term>
-      <listitem>
-       <para>
-        Display the specified number of records, then stop.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-p <replaceable>path</replaceable></option></term>
-      <term><option>--path=<replaceable>path</replaceable></option></term>
-      <listitem>
-       <para>
-        Specifies a directory to search for log segment files or a
-        directory with a <literal>pg_wal</literal> subdirectory that
-        contains such files.  The default is to search in the current
-        directory, the <literal>pg_wal</literal> subdirectory of the
-        current directory, and the <literal>pg_wal</literal> subdirectory
-        of <envar>PGDATA</envar>.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-r <replaceable>rmgr</replaceable></option></term>
-      <term><option>--rmgr=<replaceable>rmgr</replaceable></option></term>
-      <listitem>
-       <para>
-        Only display records generated by the specified resource manager.
-        If <literal>list</> is passed as name, print a list of valid resource manager
-        names, and exit.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-s <replaceable>start</replaceable></option></term>
-      <term><option>--start=<replaceable>start</replaceable></option></term>
-      <listitem>
-       <para>
-        Log position at which to start reading. The default is to start reading
-        the first valid log record found in the earliest file found.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-t <replaceable>timeline</replaceable></option></term>
-      <term><option>--timeline=<replaceable>timeline</replaceable></option></term>
-      <listitem>
-       <para>
-        Timeline from which to read log records. The default is to use the
-        value in <replaceable>startseg</>, if that is specified; otherwise, the
-        default is 1.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-       <term><option>-V</></term>
-       <term><option>--version</></term>
-       <listitem>
-       <para>
-       Print the <application>pg_xlogdump</application> version and exit.
-       </para>
-       </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-x <replaceable>xid</replaceable></option></term>
-      <term><option>--xid=<replaceable>xid</replaceable></option></term>
-      <listitem>
-       <para>
-        Only display records marked with the given transaction ID.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-z</option></term>
-      <term><option>--stats[=record]</option></term>
-      <listitem>
-       <para>
-        Display summary statistics (number and size of records and
-        full-page images) instead of individual records. Optionally
-        generate statistics per-record instead of per-rmgr.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry>
-      <term><option>-?</></term>
-      <term><option>--help</></term>
-       <listitem>
-        <para>
-         Show help about <application>pg_xlogdump</application> command line
-         arguments, and exit.
-        </para>
-       </listitem>
-      </varlistentry>
-    </variablelist>
-   </para>
- </refsect1>
-
- <refsect1>
-  <title>Notes</title>
-  <para>
-    Can give wrong results when the server is running.
-  </para>
-
-  <para>
-    Only the specified timeline is displayed (or the default, if none is
-    specified). Records in other timelines are ignored.
-  </para>
-
-  <para>
-    <application>pg_xlogdump</> cannot read WAL files with suffix
-    <literal>.partial</>. If those files need to be read, <literal>.partial</>
-    suffix needs to be removed from the file name.
-  </para>
- </refsect1>
-
- <refsect1>
-  <title>See Also</title>
-
-  <simplelist type="inline">
-   <member><xref linkend="wal-internals"></member>
-  </simplelist>
- </refsect1>
-
-</refentry>
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index 34007d3..c8191de 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -245,7 +245,7 @@
    &pgDump;
    &pgDumpall;
    &pgIsready;
-   &pgReceivexlog;
+   &pgReceivewal;
    &pgRecvlogical;
    &pgRestore;
    &psqlRef;
@@ -271,12 +271,12 @@
    &pgarchivecleanup;
    &pgControldata;
    &pgCtl;
-   &pgResetxlog;
+   &pgResetwal;
    &pgRewind;
    &pgtestfsync;
    &pgtesttiming;
    &pgupgrade;
-   &pgxlogdump;
+   &pgwaldump;
    &postgres;
    &postmaster;
 
diff --git a/doc/src/sgml/release-9.2.sgml b/doc/src/sgml/release-9.2.sgml
index 4943038..b26e1b4 100644
--- a/doc/src/sgml/release-9.2.sgml
+++ b/doc/src/sgml/release-9.2.sgml
@@ -7657,7 +7657,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100
       <listitem>
        <para>
         Add a <link
-        linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+        linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
         tool to archive WAL file changes as they are written
        </para>
       </listitem>
@@ -8819,7 +8819,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100
       <listitem>
        <para>
         Add a <link
-        linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+        linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
         tool to archive WAL file changes as they are written, rather
         than waiting for completed WAL files (Magnus Hagander)
        </para>
diff --git a/doc/src/sgml/release-9.3.sgml b/doc/src/sgml/release-9.3.sgml
index 81205a4..7c236ca 100644
--- a/doc/src/sgml/release-9.3.sgml
+++ b/doc/src/sgml/release-9.3.sgml
@@ -9632,7 +9632,7 @@ ALTER EXTENSION hstore UPDATE;
       <listitem>
        <para>
         Allow tools like <link
-        linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+        linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
         to run on computers with different architectures (Heikki
         Linnakangas)
        </para>
@@ -9662,7 +9662,7 @@ ALTER EXTENSION hstore UPDATE;
       <listitem>
        <para>
         Allow <link
-        linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+        linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
         and <link
         linkend="app-pgbasebackup"><application>pg_basebackup</></link>
         <option>--xlog-method</> to handle streaming timeline switches
@@ -10265,7 +10265,7 @@ ALTER EXTENSION hstore UPDATE;
         linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, <link
         linkend="app-pgbasebackup"><application>pg_basebackup</></link>, and
         <link
-        linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+        linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
         to allow specifying a connection string (Amit Kapila)
        </para>
       </listitem>
@@ -10802,7 +10802,7 @@ ALTER EXTENSION hstore UPDATE;
 
       <listitem>
        <para>
-        Add <link linkend="pgxlogdump"><application>pg_xlogdump</></link>
+        Add <link linkend="pgwaldump"><application>pg_xlogdump</></link>
         contrib program (Andres Freund)
        </para>
       </listitem>
diff --git a/doc/src/sgml/release-9.4.sgml b/doc/src/sgml/release-9.4.sgml
index 94b028a..92605f7 100644
--- a/doc/src/sgml/release-9.4.sgml
+++ b/doc/src/sgml/release-9.4.sgml
@@ -8384,8 +8384,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500
 
       <listitem>
        <para>
-        Make <xref linkend="APP-PGRESETXLOG"> with option <option>-n</>
-        output current and potentially changed values (Rajeev Rastogi)
+        Make <link linkend="app-pgresetwal"><application>pg_resetxlog</></>
+        with option <option>-n</> output current and potentially changed
+        values (Rajeev Rastogi)
        </para>
       </listitem>
 
@@ -8985,8 +8986,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500
 
       <listitem>
        <para>
-        Allow <xref linkend="pgxlogdump"> to report a live log stream
-        with <option>--follow</> (Heikki Linnakangas)
+        Allow <link linkend="pgwaldump"><application>pg_xlogdump</></>
+        to report a live log stream with <option>--follow</>
+        (Heikki Linnakangas)
        </para>
       </listitem>
 
diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml
index abc0337..73469af 100644
--- a/doc/src/sgml/release-9.5.sgml
+++ b/doc/src/sgml/release-9.5.sgml
@@ -5603,7 +5603,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
        linkend="pgarchivecleanup"><application>pg_archivecleanup</></>,
        <link linkend="pgtestfsync"><application>pg_test_fsync</></>,
        <link linkend="pgtesttiming"><application>pg_test_timing</></>,
-       and <link linkend="pgxlogdump"><application>pg_xlogdump</></>
+       and <link linkend="pgwaldump"><application>pg_xlogdump</></>
        from <filename>contrib</> to <filename>src/bin</> (Peter Eisentraut)
       </para>
 
@@ -5630,7 +5630,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
 -->
       <para>
        Allow <link
-       linkend="app-pgreceivexlog"><application>pg_receivexlog</></>
+       linkend="app-pgreceivewal"><application>pg_receivexlog</></>
        to manage physical replication slots (Michael Paquier)
       </para>
 
@@ -5646,7 +5646,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
 -->
       <para>
        Allow <link
-       linkend="app-pgreceivexlog"><application>pg_receivexlog</></>
+       linkend="app-pgreceivewal"><application>pg_receivexlog</></>
        to synchronously flush <acronym>WAL</> to storage using new
        <option>--synchronous</> option (Furuya Osamu, Fujii Masao)
       </para>
@@ -5706,7 +5706,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
 2014-09-19 [bdd5726] Andres..: Add the capability to display summary statistic..
 -->
       <para>
-       Add <link linkend="pgxlogdump"><application>pg_xlogdump</></> option
+       Add <link linkend="pgwaldump"><application>pg_xlogdump</></> option
        <option>--stats</> to display summary statistics (Abhijit Menon-Sen)
       </para>
      </listitem>
diff --git a/src/backend/access/rmgrdesc/xactdesc.c b/src/backend/access/rmgrdesc/xactdesc.c
index c91ca03..735f8c5 100644
--- a/src/backend/access/rmgrdesc/xactdesc.c
+++ b/src/backend/access/rmgrdesc/xactdesc.c
@@ -26,7 +26,7 @@
  * understand format.
  *
  * This routines are in xactdesc.c because they're accessed in backend (when
- * replaying WAL) and frontend (pg_xlogdump) code. This file is the only xact
+ * replaying WAL) and frontend (pg_waldump) code. This file is the only xact
  * specific one shared between both. They're complicated enough that
  * duplication would be bothersome.
  */
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index fc084c5..42fc351 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -399,7 +399,7 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
  *
  * We primarily check whether oldestXidDB is valid.  The cases we have in
  * mind are that that database was dropped, or the field was reset to zero
- * by pg_resetxlog.  In either case we should force recalculation of the
+ * by pg_resetwal.  In either case we should force recalculation of the
  * wrap limit.  Also do it if oldestXid is old enough to be forcing
  * autovacuums or other actions; this ensures we update our state as soon
  * as possible once extra overhead is being incurred.
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index 0de2419..672d7d1 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -646,7 +646,7 @@ XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum,
  * always be one descriptor left open until the process ends, but never
  * more than one.
  *
- * XXX This is very similar to pg_xlogdump's XLogDumpXLogRead and to XLogRead
+ * XXX This is very similar to pg_waldump's XLogDumpXLogRead and to XLogRead
  * in walsender.c but for small differences (such as lack of elog() in
  * frontend).  Probably these should be merged at some point.
  */
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 1e02aa9..11966ea 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1473,7 +1473,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
 	/*
 	 * We identify snapshots by the LSN they are valid for. We don't need to
 	 * include timelines in the name as each LSN maps to exactly one timeline
-	 * unless the user used pg_resetxlog or similar. If a user did so, there's
+	 * unless the user used pg_resetwal or similar. If a user did so, there's
 	 * no hope continuing to decode anyway.
 	 */
 	sprintf(path, "pg_logical/snapshots/%X-%X.snap",
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 5909b7d..1d3b351 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2512,7 +2512,7 @@ WalSndDone(WalSndSendDataCallback send_data)
 
 	/*
 	 * To figure out whether all WAL has successfully been replicated, check
-	 * flush location if valid, write otherwise. Tools like pg_receivexlog
+	 * flush location if valid, write otherwise. Tools like pg_receivewal
 	 * will usually (unless in synchronous mode) return an invalid flush
 	 * location.
 	 */
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 74ca4e7..f7da90f 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2633,7 +2633,7 @@ static struct config_int ConfigureNamesInt[] =
 			NULL
 		},
 		&autovacuum_freeze_max_age,
-		/* see pg_resetxlog if you change the upper-limit value */
+		/* see pg_resetwal if you change the upper-limit value */
 		200000000, 100000, 2000000000,
 		NULL, NULL, NULL
 	},
diff --git a/src/bin/Makefile b/src/bin/Makefile
index e0a5d92..bc96f37 100644
--- a/src/bin/Makefile
+++ b/src/bin/Makefile
@@ -21,12 +21,12 @@ SUBDIRS = \
 	pg_controldata \
 	pg_ctl \
 	pg_dump \
-	pg_resetxlog \
+	pg_resetwal \
 	pg_rewind \
 	pg_test_fsync \
 	pg_test_timing \
 	pg_upgrade \
-	pg_xlogdump \
+	pg_waldump \
 	pgbench \
 	psql \
 	scripts
diff --git a/src/bin/pg_basebackup/.gitignore b/src/bin/pg_basebackup/.gitignore
index 36a2f12..26048bd 100644
--- a/src/bin/pg_basebackup/.gitignore
+++ b/src/bin/pg_basebackup/.gitignore
@@ -1,5 +1,5 @@
 /pg_basebackup
-/pg_receivexlog
+/pg_receivewal
 /pg_recvlogical
 
 /tmp_check/
diff --git a/src/bin/pg_basebackup/Makefile b/src/bin/pg_basebackup/Makefile
index a6c3074..f0c3be8 100644
--- a/src/bin/pg_basebackup/Makefile
+++ b/src/bin/pg_basebackup/Makefile
@@ -9,7 +9,7 @@
 #
 #-------------------------------------------------------------------------
 
-PGFILEDESC = "pg_basebackup/pg_receivexlog/pg_recvlogical - streaming WAL and backup receivers"
+PGFILEDESC = "pg_basebackup/pg_receivewal/pg_recvlogical - streaming WAL and backup receivers"
 PGAPPICON=win32
 
 EXTRA_INSTALL=contrib/test_decoding
@@ -23,20 +23,20 @@ LDFLAGS += -L$(top_builddir)/src/fe_utils -lpgfeutils -lpq
 
 OBJS=receivelog.o streamutil.o walmethods.o $(WIN32RES)
 
-all: pg_basebackup pg_receivexlog pg_recvlogical
+all: pg_basebackup pg_receivewal pg_recvlogical
 
 pg_basebackup: pg_basebackup.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
 	$(CC) $(CFLAGS) pg_basebackup.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
 
-pg_receivexlog: pg_receivexlog.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
-	$(CC) $(CFLAGS) pg_receivexlog.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+pg_receivewal: pg_receivewal.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+	$(CC) $(CFLAGS) pg_receivewal.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
 
 pg_recvlogical: pg_recvlogical.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
 	$(CC) $(CFLAGS) pg_recvlogical.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
 
 install: all installdirs
 	$(INSTALL_PROGRAM) pg_basebackup$(X) '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
-	$(INSTALL_PROGRAM) pg_receivexlog$(X) '$(DESTDIR)$(bindir)/pg_receivexlog$(X)'
+	$(INSTALL_PROGRAM) pg_receivewal$(X) '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
 	$(INSTALL_PROGRAM) pg_recvlogical$(X) '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
 
 installdirs:
@@ -44,12 +44,12 @@ installdirs:
 
 uninstall:
 	rm -f '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
-	rm -f '$(DESTDIR)$(bindir)/pg_receivexlog$(X)'
+	rm -f '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
 	rm -f '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
 
 clean distclean maintainer-clean:
-	rm -f pg_basebackup$(X) pg_receivexlog$(X) pg_recvlogical$(X) \
-		pg_basebackup.o pg_receivexlog.o pg_recvlogical.o \
+	rm -f pg_basebackup$(X) pg_receivewal$(X) pg_recvlogical$(X) \
+		pg_basebackup.o pg_receivewal.o pg_recvlogical.o \
 		$(OBJS)
 	rm -rf tmp_check
 
diff --git a/src/bin/pg_basebackup/nls.mk b/src/bin/pg_basebackup/nls.mk
index dba43b8..2a6de08 100644
--- a/src/bin/pg_basebackup/nls.mk
+++ b/src/bin/pg_basebackup/nls.mk
@@ -1,5 +1,5 @@
 # src/bin/pg_basebackup/nls.mk
 CATALOG_NAME     = pg_basebackup
 AVAIL_LANGUAGES  = de es fr it ko pl pt_BR ru zh_CN
-GETTEXT_FILES    = pg_basebackup.c pg_receivexlog.c pg_recvlogical.c receivelog.c streamutil.c ../../common/fe_memutils.c ../../common/file_utils.c
+GETTEXT_FILES    = pg_basebackup.c pg_receivewal.c pg_recvlogical.c receivelog.c streamutil.c ../../common/fe_memutils.c ../../common/file_utils.c
 GETTEXT_TRIGGERS = simple_prompt
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
new file mode 100644
index 0000000..e8d0e89
--- /dev/null
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -0,0 +1,738 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_receivewal.c - receive streaming transaction log data and write it
+ *					  to a local file.
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_basebackup/pg_receivewal.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <dirent.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "libpq-fe.h"
+#include "access/xlog_internal.h"
+#include "getopt_long.h"
+
+#include "receivelog.h"
+#include "streamutil.h"
+
+
+/* Time to sleep between reconnection attempts */
+#define RECONNECT_SLEEP_TIME 5
+
+/* Global options */
+static char *basedir = NULL;
+static int	verbose = 0;
+static int	compresslevel = 0;
+static int	noloop = 0;
+static int	standby_message_timeout = 10 * 1000;		/* 10 sec = default */
+static volatile bool time_to_abort = false;
+static bool do_create_slot = false;
+static bool slot_exists_ok = false;
+static bool do_drop_slot = false;
+static bool synchronous = false;
+static char *replication_slot = NULL;
+
+
+static void usage(void);
+static DIR *get_destination_dir(char *dest_folder);
+static void close_destination_dir(DIR *dest_dir, char *dest_folder);
+static XLogRecPtr FindStreamingStart(uint32 *tli);
+static void StreamLog(void);
+static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
+			   bool segment_finished);
+
+#define disconnect_and_exit(code)				\
+	{											\
+	if (conn != NULL) PQfinish(conn);			\
+	exit(code);									\
+	}
+
+/* Routines to evaluate segment file format */
+#define IsCompressXLogFileName(fname)    \
+	(strlen(fname) == XLOG_FNAME_LEN + strlen(".gz") &&	\
+	 strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN &&		\
+	 strcmp((fname) + XLOG_FNAME_LEN, ".gz") == 0)
+#define IsPartialCompressXLogFileName(fname)    \
+	(strlen(fname) == XLOG_FNAME_LEN + strlen(".gz.partial") &&	\
+	 strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN &&		\
+	 strcmp((fname) + XLOG_FNAME_LEN, ".gz.partial") == 0)
+
+static void
+usage(void)
+{
+	printf(_("%s receives PostgreSQL streaming transaction 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(_("      --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(_("  -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"));
+	printf(_("  -?, --help             show this help, then exit\n"));
+	printf(_("\nConnection options:\n"));
+	printf(_("  -d, --dbname=CONNSTR   connection string\n"));
+	printf(_("  -h, --host=HOSTNAME    database server host or socket directory\n"));
+	printf(_("  -p, --port=PORT        database server port number\n"));
+	printf(_("  -U, --username=NAME    connect as specified database user\n"));
+	printf(_("  -w, --no-password      never prompt for password\n"));
+	printf(_("  -W, --password         force password prompt (should happen automatically)\n"));
+	printf(_("\nOptional actions:\n"));
+	printf(_("      --create-slot      create a new replication slot (for the slot's name see --slot)\n"));
+	printf(_("      --drop-slot        drop the replication slot (for the slot's name see --slot)\n"));
+	printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
+}
+
+static bool
+stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
+{
+	static uint32 prevtimeline = 0;
+	static XLogRecPtr prevpos = InvalidXLogRecPtr;
+
+	/* we assume that we get called once at the end of each segment */
+	if (verbose && segment_finished)
+		fprintf(stderr, _("%s: finished segment at %X/%X (timeline %u)\n"),
+				progname, (uint32) (xlogpos >> 32), (uint32) xlogpos,
+				timeline);
+
+	/*
+	 * Note that we report the previous, not current, position here. After a
+	 * timeline switch, xlogpos points to the beginning of the segment because
+	 * that's where we always begin streaming. Reporting the end of previous
+	 * timeline isn't totally accurate, because the next timeline can begin
+	 * slightly before the end of the WAL that we received on the previous
+	 * timeline, but it's close enough for reporting purposes.
+	 */
+	if (prevtimeline != 0 && prevtimeline != timeline)
+		fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"),
+				progname, timeline,
+				(uint32) (prevpos >> 32), (uint32) prevpos);
+
+	prevtimeline = timeline;
+	prevpos = xlogpos;
+
+	if (time_to_abort)
+	{
+		fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
+				progname);
+		return true;
+	}
+	return false;
+}
+
+
+/*
+ * Get destination directory.
+ */
+static DIR *
+get_destination_dir(char *dest_folder)
+{
+	DIR		   *dir;
+
+	Assert(dest_folder != NULL);
+	dir = opendir(dest_folder);
+	if (dir == NULL)
+	{
+		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+				progname, basedir, strerror(errno));
+		disconnect_and_exit(1);
+	}
+
+	return dir;
+}
+
+
+/*
+ * Close existing directory.
+ */
+static void
+close_destination_dir(DIR *dest_dir, char *dest_folder)
+{
+	Assert(dest_dir != NULL && dest_folder != NULL);
+	if (closedir(dest_dir))
+	{
+		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+				progname, dest_folder, strerror(errno));
+		disconnect_and_exit(1);
+	}
+}
+
+
+/*
+ * Determine starting location for streaming, based on any existing xlog
+ * segments in the directory. We start at the end of the last one that is
+ * complete (size matches XLogSegSize), on the timeline with highest ID.
+ *
+ * If there are no WAL files in the directory, returns InvalidXLogRecPtr.
+ */
+static XLogRecPtr
+FindStreamingStart(uint32 *tli)
+{
+	DIR		   *dir;
+	struct dirent *dirent;
+	XLogSegNo	high_segno = 0;
+	uint32		high_tli = 0;
+	bool		high_ispartial = false;
+
+	dir = get_destination_dir(basedir);
+
+	while (errno = 0, (dirent = readdir(dir)) != NULL)
+	{
+		uint32		tli;
+		XLogSegNo	segno;
+		bool		ispartial;
+		bool		iscompress;
+
+		/*
+		 * Check if the filename looks like an xlog file, or a .partial file.
+		 */
+		if (IsXLogFileName(dirent->d_name))
+		{
+			ispartial = false;
+			iscompress = false;
+		}
+		else if (IsPartialXLogFileName(dirent->d_name))
+		{
+			ispartial = true;
+			iscompress = false;
+		}
+		else if (IsCompressXLogFileName(dirent->d_name))
+		{
+			ispartial = false;
+			iscompress = true;
+		}
+		else if (IsPartialCompressXLogFileName(dirent->d_name))
+		{
+			ispartial = true;
+			iscompress = true;
+		}
+		else
+			continue;
+
+		/*
+		 * Looks like an xlog file. Parse its position.
+		 */
+		XLogFromFileName(dirent->d_name, &tli, &segno);
+
+		/*
+		 * Check that the segment has the right size, if it's supposed to be
+		 * completed.  For non-compressed segments just check the on-disk size
+		 * and see if it matches a completed segment.
+		 * For compressed segments, look at the last 4 bytes of the compressed
+		 * file, which is where the uncompressed size is located for gz files
+		 * with a size lower than 4GB, and then compare it to the size of a
+		 * completed segment. The 4 last bytes correspond to the ISIZE member
+		 * according to http://www.zlib.org/rfc-gzip.html.
+		 */
+		if (!ispartial && !iscompress)
+		{
+			struct stat statbuf;
+			char		fullpath[MAXPGPATH];
+
+			snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
+			if (stat(fullpath, &statbuf) != 0)
+			{
+				fprintf(stderr, _("%s: could not stat file \"%s\": %s\n"),
+						progname, fullpath, strerror(errno));
+				disconnect_and_exit(1);
+			}
+
+			if (statbuf.st_size != XLOG_SEG_SIZE)
+			{
+				fprintf(stderr,
+						_("%s: segment file \"%s\" has incorrect size %d, skipping\n"),
+						progname, dirent->d_name, (int) statbuf.st_size);
+				continue;
+			}
+		}
+		else if (!ispartial && iscompress)
+		{
+			int		fd;
+			char	buf[4];
+			int		bytes_out;
+			char	fullpath[MAXPGPATH];
+
+			snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
+
+			fd = open(fullpath, O_RDONLY | PG_BINARY);
+			if (fd < 0)
+			{
+				fprintf(stderr, _("%s: could not open compressed file \"%s\": %s\n"),
+						progname, fullpath, strerror(errno));
+				disconnect_and_exit(1);
+			}
+			if (lseek(fd, (off_t)(-4), SEEK_END) < 0)
+			{
+				fprintf(stderr, _("%s: could not seek compressed file \"%s\": %s\n"),
+						progname, fullpath, strerror(errno));
+				disconnect_and_exit(1);
+			}
+			if (read(fd, (char *) buf, sizeof(buf)) != sizeof(buf))
+			{
+				fprintf(stderr, _("%s: could not read compressed file \"%s\": %s\n"),
+						progname, fullpath, strerror(errno));
+				disconnect_and_exit(1);
+			}
+
+			close(fd);
+			bytes_out = (buf[3] << 24) | (buf[2] << 16) |
+						(buf[1] << 8) | buf[0];
+
+			if (bytes_out != XLOG_SEG_SIZE)
+			{
+				fprintf(stderr,
+						_("%s: compressed segment file \"%s\" has incorrect uncompressed size %d, skipping\n"),
+						progname, dirent->d_name, bytes_out);
+				continue;
+			}
+		}
+
+		/* Looks like a valid segment. Remember that we saw it. */
+		if ((segno > high_segno) ||
+			(segno == high_segno && tli > high_tli) ||
+			(segno == high_segno && tli == high_tli && high_ispartial && !ispartial))
+		{
+			high_segno = segno;
+			high_tli = tli;
+			high_ispartial = ispartial;
+		}
+	}
+
+	if (errno)
+	{
+		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+				progname, basedir, strerror(errno));
+		disconnect_and_exit(1);
+	}
+
+	close_destination_dir(dir, basedir);
+
+	if (high_segno > 0)
+	{
+		XLogRecPtr	high_ptr;
+
+		/*
+		 * Move the starting pointer to the start of the next segment, if the
+		 * highest one we saw was completed. Otherwise start streaming from
+		 * the beginning of the .partial segment.
+		 */
+		if (!high_ispartial)
+			high_segno++;
+
+		XLogSegNoOffsetToRecPtr(high_segno, 0, high_ptr);
+
+		*tli = high_tli;
+		return high_ptr;
+	}
+	else
+		return InvalidXLogRecPtr;
+}
+
+/*
+ * Start the log streaming
+ */
+static void
+StreamLog(void)
+{
+	XLogRecPtr	serverpos;
+	TimeLineID	servertli;
+	StreamCtl	stream;
+
+	MemSet(&stream, 0, sizeof(stream));
+
+	/*
+	 * Connect in replication mode to the server
+	 */
+	if (conn == NULL)
+		conn = GetConnection();
+	if (!conn)
+		/* Error message already written in GetConnection() */
+		return;
+
+	if (!CheckServerVersionForStreaming(conn))
+	{
+		/*
+		 * Error message already written in CheckServerVersionForStreaming().
+		 * There's no hope of recovering from a version mismatch, so don't
+		 * retry.
+		 */
+		disconnect_and_exit(1);
+	}
+
+	/*
+	 * Identify server, obtaining start LSN position and current timeline ID
+	 * at the same time, necessary if not valid data can be found in the
+	 * existing output directory.
+	 */
+	if (!RunIdentifySystem(conn, NULL, &servertli, &serverpos, NULL))
+		disconnect_and_exit(1);
+
+	/*
+	 * Figure out where to start streaming.
+	 */
+	stream.startpos = FindStreamingStart(&stream.timeline);
+	if (stream.startpos == InvalidXLogRecPtr)
+	{
+		stream.startpos = serverpos;
+		stream.timeline = servertli;
+	}
+
+	/*
+	 * Always start streaming at the beginning of a segment
+	 */
+	stream.startpos -= stream.startpos % XLOG_SEG_SIZE;
+
+	/*
+	 * Start the replication
+	 */
+	if (verbose)
+		fprintf(stderr,
+				_("%s: starting log streaming at %X/%X (timeline %u)\n"),
+		progname, (uint32) (stream.startpos >> 32), (uint32) stream.startpos,
+				stream.timeline);
+
+	stream.stream_stop = stop_streaming;
+	stream.standby_message_timeout = standby_message_timeout;
+	stream.synchronous = synchronous;
+	stream.do_sync = true;
+	stream.mark_done = false;
+	stream.walmethod = CreateWalDirectoryMethod(basedir, compresslevel,
+												stream.do_sync);
+	stream.partial_suffix = ".partial";
+	stream.replication_slot = replication_slot;
+	stream.temp_slot = false;
+
+	ReceiveXlogStream(conn, &stream);
+
+	if (!stream.walmethod->finish())
+	{
+		fprintf(stderr,
+				_("%s: could not finish writing WAL files: %s\n"),
+				progname, strerror(errno));
+		return;
+	}
+
+	PQfinish(conn);
+
+	FreeWalDirectoryMethod();
+	pg_free(stream.walmethod);
+
+	conn = NULL;
+}
+
+/*
+ * When sigint is called, just tell the system to exit at the next possible
+ * moment.
+ */
+#ifndef WIN32
+
+static void
+sigint_handler(int signum)
+{
+	time_to_abort = true;
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+	static struct option long_options[] = {
+		{"help", no_argument, NULL, '?'},
+		{"version", no_argument, NULL, 'V'},
+		{"directory", required_argument, NULL, 'D'},
+		{"dbname", required_argument, NULL, 'd'},
+		{"host", required_argument, NULL, 'h'},
+		{"port", required_argument, NULL, 'p'},
+		{"username", required_argument, NULL, 'U'},
+		{"no-loop", no_argument, NULL, 'n'},
+		{"no-password", no_argument, NULL, 'w'},
+		{"password", no_argument, NULL, 'W'},
+		{"status-interval", required_argument, NULL, 's'},
+		{"slot", required_argument, NULL, 'S'},
+		{"verbose", no_argument, NULL, 'v'},
+		{"compress", required_argument, NULL, 'Z'},
+/* action */
+		{"create-slot", no_argument, NULL, 1},
+		{"drop-slot", no_argument, NULL, 2},
+		{"if-not-exists", no_argument, NULL, 3},
+		{"synchronous", no_argument, NULL, 4},
+		{NULL, 0, NULL, 0}
+	};
+
+	int			c;
+	int			option_index;
+	char	   *db_name;
+
+	progname = get_progname(argv[0]);
+	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
+
+	if (argc > 1)
+	{
+		if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+		{
+			usage();
+			exit(0);
+		}
+		else if (strcmp(argv[1], "-V") == 0 ||
+				 strcmp(argv[1], "--version") == 0)
+		{
+			puts("pg_receivewal (PostgreSQL) " PG_VERSION);
+			exit(0);
+		}
+	}
+
+	while ((c = getopt_long(argc, argv, "D:d:h:p:U:s:S:nwWvZ:",
+							long_options, &option_index)) != -1)
+	{
+		switch (c)
+		{
+			case 'D':
+				basedir = pg_strdup(optarg);
+				break;
+			case 'd':
+				connection_string = pg_strdup(optarg);
+				break;
+			case 'h':
+				dbhost = pg_strdup(optarg);
+				break;
+			case 'p':
+				if (atoi(optarg) <= 0)
+				{
+					fprintf(stderr, _("%s: invalid port number \"%s\"\n"),
+							progname, optarg);
+					exit(1);
+				}
+				dbport = pg_strdup(optarg);
+				break;
+			case 'U':
+				dbuser = pg_strdup(optarg);
+				break;
+			case 'w':
+				dbgetpassword = -1;
+				break;
+			case 'W':
+				dbgetpassword = 1;
+				break;
+			case 's':
+				standby_message_timeout = atoi(optarg) * 1000;
+				if (standby_message_timeout < 0)
+				{
+					fprintf(stderr, _("%s: invalid status interval \"%s\"\n"),
+							progname, optarg);
+					exit(1);
+				}
+				break;
+			case 'S':
+				replication_slot = pg_strdup(optarg);
+				break;
+			case 'n':
+				noloop = 1;
+				break;
+			case 'v':
+				verbose++;
+				break;
+			case 'Z':
+				compresslevel = atoi(optarg);
+				if (compresslevel < 0 || compresslevel > 9)
+				{
+					fprintf(stderr, _("%s: invalid compression level \"%s\"\n"),
+							progname, optarg);
+					exit(1);
+				}
+				break;
+/* action */
+			case 1:
+				do_create_slot = true;
+				break;
+			case 2:
+				do_drop_slot = true;
+				break;
+			case 3:
+				slot_exists_ok = true;
+				break;
+			case 4:
+				synchronous = true;
+				break;
+			default:
+
+				/*
+				 * getopt_long already emitted a complaint
+				 */
+				fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+						progname);
+				exit(1);
+		}
+	}
+
+	/*
+	 * Any non-option arguments?
+	 */
+	if (optind < argc)
+	{
+		fprintf(stderr,
+				_("%s: too many command-line arguments (first is \"%s\")\n"),
+				progname, argv[optind]);
+		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+				progname);
+		exit(1);
+	}
+
+	if (do_drop_slot && do_create_slot)
+	{
+		fprintf(stderr, _("%s: cannot use --create-slot together with --drop-slot\n"), progname);
+		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+				progname);
+		exit(1);
+	}
+
+	if (replication_slot == NULL && (do_drop_slot || do_create_slot))
+	{
+		/* translator: second %s is an option name */
+		fprintf(stderr, _("%s: %s needs a slot to be specified using --slot\n"), progname,
+				do_drop_slot ? "--drop-slot" : "--create-slot");
+		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+				progname);
+		exit(1);
+	}
+
+	/*
+	 * Required arguments
+	 */
+	if (basedir == NULL && !do_drop_slot && !do_create_slot)
+	{
+		fprintf(stderr, _("%s: no target directory specified\n"), progname);
+		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+				progname);
+		exit(1);
+	}
+
+#ifndef HAVE_LIBZ
+	if (compresslevel != 0)
+	{
+		fprintf(stderr,
+				_("%s: this build does not support compression\n"),
+				progname);
+		exit(1);
+	}
+#endif
+
+	/*
+	 * Check existence of destination folder.
+	 */
+	if (!do_drop_slot && !do_create_slot)
+	{
+		DIR		   *dir = get_destination_dir(basedir);
+
+		close_destination_dir(dir, basedir);
+	}
+
+#ifndef WIN32
+	pqsignal(SIGINT, sigint_handler);
+#endif
+
+	/*
+	 * Obtain a connection before doing anything.
+	 */
+	conn = GetConnection();
+	if (!conn)
+		/* error message already written in GetConnection() */
+		exit(1);
+
+	/*
+	 * Run IDENTIFY_SYSTEM to make sure we've successfully have established a
+	 * replication connection and haven't connected using a database specific
+	 * connection.
+	 */
+	if (!RunIdentifySystem(conn, NULL, NULL, NULL, &db_name))
+		disconnect_and_exit(1);
+
+	/*
+	 * Check that there is a database associated with connection, none should
+	 * be defined in this context.
+	 */
+	if (db_name)
+	{
+		fprintf(stderr,
+				_("%s: replication connection using slot \"%s\" is unexpectedly database specific\n"),
+				progname, replication_slot);
+		disconnect_and_exit(1);
+	}
+
+	/*
+	 * Drop a replication slot.
+	 */
+	if (do_drop_slot)
+	{
+		if (verbose)
+			fprintf(stderr,
+					_("%s: dropping replication slot \"%s\"\n"),
+					progname, replication_slot);
+
+		if (!DropReplicationSlot(conn, replication_slot))
+			disconnect_and_exit(1);
+		disconnect_and_exit(0);
+	}
+
+	/* Create a replication slot */
+	if (do_create_slot)
+	{
+		if (verbose)
+			fprintf(stderr,
+					_("%s: creating replication slot \"%s\"\n"),
+					progname, replication_slot);
+
+		if (!CreateReplicationSlot(conn, replication_slot, NULL, true,
+								   slot_exists_ok))
+			disconnect_and_exit(1);
+		disconnect_and_exit(0);
+	}
+
+	/*
+	 * Don't close the connection here so that subsequent StreamLog() can
+	 * reuse it.
+	 */
+
+	while (true)
+	{
+		StreamLog();
+		if (time_to_abort)
+		{
+			/*
+			 * We've been Ctrl-C'ed. That's not an error, so exit without an
+			 * errorcode.
+			 */
+			exit(0);
+		}
+		else if (noloop)
+		{
+			fprintf(stderr, _("%s: disconnected\n"), progname);
+			exit(1);
+		}
+		else
+		{
+			fprintf(stderr,
+			/* translator: check source for value for %d */
+					_("%s: disconnected; waiting %d seconds to try again\n"),
+					progname, RECONNECT_SLEEP_TIME);
+			pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
+		}
+	}
+}
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
deleted file mode 100644
index 135e207..0000000
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ /dev/null
@@ -1,738 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_receivexlog.c - receive streaming transaction log data and write it
- *					  to a local file.
- *
- * Author: Magnus Hagander <magnus@hagander.net>
- *
- * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		  src/bin/pg_basebackup/pg_receivexlog.c
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <dirent.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "libpq-fe.h"
-#include "access/xlog_internal.h"
-#include "getopt_long.h"
-
-#include "receivelog.h"
-#include "streamutil.h"
-
-
-/* Time to sleep between reconnection attempts */
-#define RECONNECT_SLEEP_TIME 5
-
-/* Global options */
-static char *basedir = NULL;
-static int	verbose = 0;
-static int	compresslevel = 0;
-static int	noloop = 0;
-static int	standby_message_timeout = 10 * 1000;		/* 10 sec = default */
-static volatile bool time_to_abort = false;
-static bool do_create_slot = false;
-static bool slot_exists_ok = false;
-static bool do_drop_slot = false;
-static bool synchronous = false;
-static char *replication_slot = NULL;
-
-
-static void usage(void);
-static DIR *get_destination_dir(char *dest_folder);
-static void close_destination_dir(DIR *dest_dir, char *dest_folder);
-static XLogRecPtr FindStreamingStart(uint32 *tli);
-static void StreamLog(void);
-static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
-			   bool segment_finished);
-
-#define disconnect_and_exit(code)				\
-	{											\
-	if (conn != NULL) PQfinish(conn);			\
-	exit(code);									\
-	}
-
-/* Routines to evaluate segment file format */
-#define IsCompressXLogFileName(fname)    \
-	(strlen(fname) == XLOG_FNAME_LEN + strlen(".gz") &&	\
-	 strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN &&		\
-	 strcmp((fname) + XLOG_FNAME_LEN, ".gz") == 0)
-#define IsPartialCompressXLogFileName(fname)    \
-	(strlen(fname) == XLOG_FNAME_LEN + strlen(".gz.partial") &&	\
-	 strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN &&		\
-	 strcmp((fname) + XLOG_FNAME_LEN, ".gz.partial") == 0)
-
-static void
-usage(void)
-{
-	printf(_("%s receives PostgreSQL streaming transaction 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(_("      --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(_("  -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"));
-	printf(_("  -?, --help             show this help, then exit\n"));
-	printf(_("\nConnection options:\n"));
-	printf(_("  -d, --dbname=CONNSTR   connection string\n"));
-	printf(_("  -h, --host=HOSTNAME    database server host or socket directory\n"));
-	printf(_("  -p, --port=PORT        database server port number\n"));
-	printf(_("  -U, --username=NAME    connect as specified database user\n"));
-	printf(_("  -w, --no-password      never prompt for password\n"));
-	printf(_("  -W, --password         force password prompt (should happen automatically)\n"));
-	printf(_("\nOptional actions:\n"));
-	printf(_("      --create-slot      create a new replication slot (for the slot's name see --slot)\n"));
-	printf(_("      --drop-slot        drop the replication slot (for the slot's name see --slot)\n"));
-	printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
-}
-
-static bool
-stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
-{
-	static uint32 prevtimeline = 0;
-	static XLogRecPtr prevpos = InvalidXLogRecPtr;
-
-	/* we assume that we get called once at the end of each segment */
-	if (verbose && segment_finished)
-		fprintf(stderr, _("%s: finished segment at %X/%X (timeline %u)\n"),
-				progname, (uint32) (xlogpos >> 32), (uint32) xlogpos,
-				timeline);
-
-	/*
-	 * Note that we report the previous, not current, position here. After a
-	 * timeline switch, xlogpos points to the beginning of the segment because
-	 * that's where we always begin streaming. Reporting the end of previous
-	 * timeline isn't totally accurate, because the next timeline can begin
-	 * slightly before the end of the WAL that we received on the previous
-	 * timeline, but it's close enough for reporting purposes.
-	 */
-	if (prevtimeline != 0 && prevtimeline != timeline)
-		fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"),
-				progname, timeline,
-				(uint32) (prevpos >> 32), (uint32) prevpos);
-
-	prevtimeline = timeline;
-	prevpos = xlogpos;
-
-	if (time_to_abort)
-	{
-		fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
-				progname);
-		return true;
-	}
-	return false;
-}
-
-
-/*
- * Get destination directory.
- */
-static DIR *
-get_destination_dir(char *dest_folder)
-{
-	DIR		   *dir;
-
-	Assert(dest_folder != NULL);
-	dir = opendir(dest_folder);
-	if (dir == NULL)
-	{
-		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
-				progname, basedir, strerror(errno));
-		disconnect_and_exit(1);
-	}
-
-	return dir;
-}
-
-
-/*
- * Close existing directory.
- */
-static void
-close_destination_dir(DIR *dest_dir, char *dest_folder)
-{
-	Assert(dest_dir != NULL && dest_folder != NULL);
-	if (closedir(dest_dir))
-	{
-		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
-				progname, dest_folder, strerror(errno));
-		disconnect_and_exit(1);
-	}
-}
-
-
-/*
- * Determine starting location for streaming, based on any existing xlog
- * segments in the directory. We start at the end of the last one that is
- * complete (size matches XLogSegSize), on the timeline with highest ID.
- *
- * If there are no WAL files in the directory, returns InvalidXLogRecPtr.
- */
-static XLogRecPtr
-FindStreamingStart(uint32 *tli)
-{
-	DIR		   *dir;
-	struct dirent *dirent;
-	XLogSegNo	high_segno = 0;
-	uint32		high_tli = 0;
-	bool		high_ispartial = false;
-
-	dir = get_destination_dir(basedir);
-
-	while (errno = 0, (dirent = readdir(dir)) != NULL)
-	{
-		uint32		tli;
-		XLogSegNo	segno;
-		bool		ispartial;
-		bool		iscompress;
-
-		/*
-		 * Check if the filename looks like an xlog file, or a .partial file.
-		 */
-		if (IsXLogFileName(dirent->d_name))
-		{
-			ispartial = false;
-			iscompress = false;
-		}
-		else if (IsPartialXLogFileName(dirent->d_name))
-		{
-			ispartial = true;
-			iscompress = false;
-		}
-		else if (IsCompressXLogFileName(dirent->d_name))
-		{
-			ispartial = false;
-			iscompress = true;
-		}
-		else if (IsPartialCompressXLogFileName(dirent->d_name))
-		{
-			ispartial = true;
-			iscompress = true;
-		}
-		else
-			continue;
-
-		/*
-		 * Looks like an xlog file. Parse its position.
-		 */
-		XLogFromFileName(dirent->d_name, &tli, &segno);
-
-		/*
-		 * Check that the segment has the right size, if it's supposed to be
-		 * completed.  For non-compressed segments just check the on-disk size
-		 * and see if it matches a completed segment.
-		 * For compressed segments, look at the last 4 bytes of the compressed
-		 * file, which is where the uncompressed size is located for gz files
-		 * with a size lower than 4GB, and then compare it to the size of a
-		 * completed segment. The 4 last bytes correspond to the ISIZE member
-		 * according to http://www.zlib.org/rfc-gzip.html.
-		 */
-		if (!ispartial && !iscompress)
-		{
-			struct stat statbuf;
-			char		fullpath[MAXPGPATH];
-
-			snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
-			if (stat(fullpath, &statbuf) != 0)
-			{
-				fprintf(stderr, _("%s: could not stat file \"%s\": %s\n"),
-						progname, fullpath, strerror(errno));
-				disconnect_and_exit(1);
-			}
-
-			if (statbuf.st_size != XLOG_SEG_SIZE)
-			{
-				fprintf(stderr,
-						_("%s: segment file \"%s\" has incorrect size %d, skipping\n"),
-						progname, dirent->d_name, (int) statbuf.st_size);
-				continue;
-			}
-		}
-		else if (!ispartial && iscompress)
-		{
-			int		fd;
-			char	buf[4];
-			int		bytes_out;
-			char	fullpath[MAXPGPATH];
-
-			snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
-
-			fd = open(fullpath, O_RDONLY | PG_BINARY);
-			if (fd < 0)
-			{
-				fprintf(stderr, _("%s: could not open compressed file \"%s\": %s\n"),
-						progname, fullpath, strerror(errno));
-				disconnect_and_exit(1);
-			}
-			if (lseek(fd, (off_t)(-4), SEEK_END) < 0)
-			{
-				fprintf(stderr, _("%s: could not seek compressed file \"%s\": %s\n"),
-						progname, fullpath, strerror(errno));
-				disconnect_and_exit(1);
-			}
-			if (read(fd, (char *) buf, sizeof(buf)) != sizeof(buf))
-			{
-				fprintf(stderr, _("%s: could not read compressed file \"%s\": %s\n"),
-						progname, fullpath, strerror(errno));
-				disconnect_and_exit(1);
-			}
-
-			close(fd);
-			bytes_out = (buf[3] << 24) | (buf[2] << 16) |
-						(buf[1] << 8) | buf[0];
-
-			if (bytes_out != XLOG_SEG_SIZE)
-			{
-				fprintf(stderr,
-						_("%s: compressed segment file \"%s\" has incorrect uncompressed size %d, skipping\n"),
-						progname, dirent->d_name, bytes_out);
-				continue;
-			}
-		}
-
-		/* Looks like a valid segment. Remember that we saw it. */
-		if ((segno > high_segno) ||
-			(segno == high_segno && tli > high_tli) ||
-			(segno == high_segno && tli == high_tli && high_ispartial && !ispartial))
-		{
-			high_segno = segno;
-			high_tli = tli;
-			high_ispartial = ispartial;
-		}
-	}
-
-	if (errno)
-	{
-		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
-				progname, basedir, strerror(errno));
-		disconnect_and_exit(1);
-	}
-
-	close_destination_dir(dir, basedir);
-
-	if (high_segno > 0)
-	{
-		XLogRecPtr	high_ptr;
-
-		/*
-		 * Move the starting pointer to the start of the next segment, if the
-		 * highest one we saw was completed. Otherwise start streaming from
-		 * the beginning of the .partial segment.
-		 */
-		if (!high_ispartial)
-			high_segno++;
-
-		XLogSegNoOffsetToRecPtr(high_segno, 0, high_ptr);
-
-		*tli = high_tli;
-		return high_ptr;
-	}
-	else
-		return InvalidXLogRecPtr;
-}
-
-/*
- * Start the log streaming
- */
-static void
-StreamLog(void)
-{
-	XLogRecPtr	serverpos;
-	TimeLineID	servertli;
-	StreamCtl	stream;
-
-	MemSet(&stream, 0, sizeof(stream));
-
-	/*
-	 * Connect in replication mode to the server
-	 */
-	if (conn == NULL)
-		conn = GetConnection();
-	if (!conn)
-		/* Error message already written in GetConnection() */
-		return;
-
-	if (!CheckServerVersionForStreaming(conn))
-	{
-		/*
-		 * Error message already written in CheckServerVersionForStreaming().
-		 * There's no hope of recovering from a version mismatch, so don't
-		 * retry.
-		 */
-		disconnect_and_exit(1);
-	}
-
-	/*
-	 * Identify server, obtaining start LSN position and current timeline ID
-	 * at the same time, necessary if not valid data can be found in the
-	 * existing output directory.
-	 */
-	if (!RunIdentifySystem(conn, NULL, &servertli, &serverpos, NULL))
-		disconnect_and_exit(1);
-
-	/*
-	 * Figure out where to start streaming.
-	 */
-	stream.startpos = FindStreamingStart(&stream.timeline);
-	if (stream.startpos == InvalidXLogRecPtr)
-	{
-		stream.startpos = serverpos;
-		stream.timeline = servertli;
-	}
-
-	/*
-	 * Always start streaming at the beginning of a segment
-	 */
-	stream.startpos -= stream.startpos % XLOG_SEG_SIZE;
-
-	/*
-	 * Start the replication
-	 */
-	if (verbose)
-		fprintf(stderr,
-				_("%s: starting log streaming at %X/%X (timeline %u)\n"),
-		progname, (uint32) (stream.startpos >> 32), (uint32) stream.startpos,
-				stream.timeline);
-
-	stream.stream_stop = stop_streaming;
-	stream.standby_message_timeout = standby_message_timeout;
-	stream.synchronous = synchronous;
-	stream.do_sync = true;
-	stream.mark_done = false;
-	stream.walmethod = CreateWalDirectoryMethod(basedir, compresslevel,
-												stream.do_sync);
-	stream.partial_suffix = ".partial";
-	stream.replication_slot = replication_slot;
-	stream.temp_slot = false;
-
-	ReceiveXlogStream(conn, &stream);
-
-	if (!stream.walmethod->finish())
-	{
-		fprintf(stderr,
-				_("%s: could not finish writing WAL files: %s\n"),
-				progname, strerror(errno));
-		return;
-	}
-
-	PQfinish(conn);
-
-	FreeWalDirectoryMethod();
-	pg_free(stream.walmethod);
-
-	conn = NULL;
-}
-
-/*
- * When sigint is called, just tell the system to exit at the next possible
- * moment.
- */
-#ifndef WIN32
-
-static void
-sigint_handler(int signum)
-{
-	time_to_abort = true;
-}
-#endif
-
-int
-main(int argc, char **argv)
-{
-	static struct option long_options[] = {
-		{"help", no_argument, NULL, '?'},
-		{"version", no_argument, NULL, 'V'},
-		{"directory", required_argument, NULL, 'D'},
-		{"dbname", required_argument, NULL, 'd'},
-		{"host", required_argument, NULL, 'h'},
-		{"port", required_argument, NULL, 'p'},
-		{"username", required_argument, NULL, 'U'},
-		{"no-loop", no_argument, NULL, 'n'},
-		{"no-password", no_argument, NULL, 'w'},
-		{"password", no_argument, NULL, 'W'},
-		{"status-interval", required_argument, NULL, 's'},
-		{"slot", required_argument, NULL, 'S'},
-		{"verbose", no_argument, NULL, 'v'},
-		{"compress", required_argument, NULL, 'Z'},
-/* action */
-		{"create-slot", no_argument, NULL, 1},
-		{"drop-slot", no_argument, NULL, 2},
-		{"if-not-exists", no_argument, NULL, 3},
-		{"synchronous", no_argument, NULL, 4},
-		{NULL, 0, NULL, 0}
-	};
-
-	int			c;
-	int			option_index;
-	char	   *db_name;
-
-	progname = get_progname(argv[0]);
-	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
-
-	if (argc > 1)
-	{
-		if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
-		{
-			usage();
-			exit(0);
-		}
-		else if (strcmp(argv[1], "-V") == 0 ||
-				 strcmp(argv[1], "--version") == 0)
-		{
-			puts("pg_receivexlog (PostgreSQL) " PG_VERSION);
-			exit(0);
-		}
-	}
-
-	while ((c = getopt_long(argc, argv, "D:d:h:p:U:s:S:nwWvZ:",
-							long_options, &option_index)) != -1)
-	{
-		switch (c)
-		{
-			case 'D':
-				basedir = pg_strdup(optarg);
-				break;
-			case 'd':
-				connection_string = pg_strdup(optarg);
-				break;
-			case 'h':
-				dbhost = pg_strdup(optarg);
-				break;
-			case 'p':
-				if (atoi(optarg) <= 0)
-				{
-					fprintf(stderr, _("%s: invalid port number \"%s\"\n"),
-							progname, optarg);
-					exit(1);
-				}
-				dbport = pg_strdup(optarg);
-				break;
-			case 'U':
-				dbuser = pg_strdup(optarg);
-				break;
-			case 'w':
-				dbgetpassword = -1;
-				break;
-			case 'W':
-				dbgetpassword = 1;
-				break;
-			case 's':
-				standby_message_timeout = atoi(optarg) * 1000;
-				if (standby_message_timeout < 0)
-				{
-					fprintf(stderr, _("%s: invalid status interval \"%s\"\n"),
-							progname, optarg);
-					exit(1);
-				}
-				break;
-			case 'S':
-				replication_slot = pg_strdup(optarg);
-				break;
-			case 'n':
-				noloop = 1;
-				break;
-			case 'v':
-				verbose++;
-				break;
-			case 'Z':
-				compresslevel = atoi(optarg);
-				if (compresslevel < 0 || compresslevel > 9)
-				{
-					fprintf(stderr, _("%s: invalid compression level \"%s\"\n"),
-							progname, optarg);
-					exit(1);
-				}
-				break;
-/* action */
-			case 1:
-				do_create_slot = true;
-				break;
-			case 2:
-				do_drop_slot = true;
-				break;
-			case 3:
-				slot_exists_ok = true;
-				break;
-			case 4:
-				synchronous = true;
-				break;
-			default:
-
-				/*
-				 * getopt_long already emitted a complaint
-				 */
-				fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
-						progname);
-				exit(1);
-		}
-	}
-
-	/*
-	 * Any non-option arguments?
-	 */
-	if (optind < argc)
-	{
-		fprintf(stderr,
-				_("%s: too many command-line arguments (first is \"%s\")\n"),
-				progname, argv[optind]);
-		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
-				progname);
-		exit(1);
-	}
-
-	if (do_drop_slot && do_create_slot)
-	{
-		fprintf(stderr, _("%s: cannot use --create-slot together with --drop-slot\n"), progname);
-		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
-				progname);
-		exit(1);
-	}
-
-	if (replication_slot == NULL && (do_drop_slot || do_create_slot))
-	{
-		/* translator: second %s is an option name */
-		fprintf(stderr, _("%s: %s needs a slot to be specified using --slot\n"), progname,
-				do_drop_slot ? "--drop-slot" : "--create-slot");
-		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
-				progname);
-		exit(1);
-	}
-
-	/*
-	 * Required arguments
-	 */
-	if (basedir == NULL && !do_drop_slot && !do_create_slot)
-	{
-		fprintf(stderr, _("%s: no target directory specified\n"), progname);
-		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
-				progname);
-		exit(1);
-	}
-
-#ifndef HAVE_LIBZ
-	if (compresslevel != 0)
-	{
-		fprintf(stderr,
-				_("%s: this build does not support compression\n"),
-				progname);
-		exit(1);
-	}
-#endif
-
-	/*
-	 * Check existence of destination folder.
-	 */
-	if (!do_drop_slot && !do_create_slot)
-	{
-		DIR		   *dir = get_destination_dir(basedir);
-
-		close_destination_dir(dir, basedir);
-	}
-
-#ifndef WIN32
-	pqsignal(SIGINT, sigint_handler);
-#endif
-
-	/*
-	 * Obtain a connection before doing anything.
-	 */
-	conn = GetConnection();
-	if (!conn)
-		/* error message already written in GetConnection() */
-		exit(1);
-
-	/*
-	 * Run IDENTIFY_SYSTEM to make sure we've successfully have established a
-	 * replication connection and haven't connected using a database specific
-	 * connection.
-	 */
-	if (!RunIdentifySystem(conn, NULL, NULL, NULL, &db_name))
-		disconnect_and_exit(1);
-
-	/*
-	 * Check that there is a database associated with connection, none should
-	 * be defined in this context.
-	 */
-	if (db_name)
-	{
-		fprintf(stderr,
-				_("%s: replication connection using slot \"%s\" is unexpectedly database specific\n"),
-				progname, replication_slot);
-		disconnect_and_exit(1);
-	}
-
-	/*
-	 * Drop a replication slot.
-	 */
-	if (do_drop_slot)
-	{
-		if (verbose)
-			fprintf(stderr,
-					_("%s: dropping replication slot \"%s\"\n"),
-					progname, replication_slot);
-
-		if (!DropReplicationSlot(conn, replication_slot))
-			disconnect_and_exit(1);
-		disconnect_and_exit(0);
-	}
-
-	/* Create a replication slot */
-	if (do_create_slot)
-	{
-		if (verbose)
-			fprintf(stderr,
-					_("%s: creating replication slot \"%s\"\n"),
-					progname, replication_slot);
-
-		if (!CreateReplicationSlot(conn, replication_slot, NULL, true,
-								   slot_exists_ok))
-			disconnect_and_exit(1);
-		disconnect_and_exit(0);
-	}
-
-	/*
-	 * Don't close the connection here so that subsequent StreamLog() can
-	 * reuse it.
-	 */
-
-	while (true)
-	{
-		StreamLog();
-		if (time_to_abort)
-		{
-			/*
-			 * We've been Ctrl-C'ed. That's not an error, so exit without an
-			 * errorcode.
-			 */
-			exit(0);
-		}
-		else if (noloop)
-		{
-			fprintf(stderr, _("%s: disconnected\n"), progname);
-			exit(1);
-		}
-		else
-		{
-			fprintf(stderr,
-			/* translator: check source for value for %d */
-					_("%s: disconnected; waiting %d seconds to try again\n"),
-					progname, RECONNECT_SLEEP_TIME);
-			pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
-		}
-	}
-}
diff --git a/src/bin/pg_basebackup/t/020_pg_receivewal.pl b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
new file mode 100644
index 0000000..b4cb6f7
--- /dev/null
+++ b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
@@ -0,0 +1,8 @@
+use strict;
+use warnings;
+use TestLib;
+use Test::More tests => 8;
+
+program_help_ok('pg_receivewal');
+program_version_ok('pg_receivewal');
+program_options_handling_ok('pg_receivewal');
diff --git a/src/bin/pg_basebackup/t/020_pg_receivexlog.pl b/src/bin/pg_basebackup/t/020_pg_receivexlog.pl
deleted file mode 100644
index c68e86d..0000000
--- a/src/bin/pg_basebackup/t/020_pg_receivexlog.pl
+++ /dev/null
@@ -1,8 +0,0 @@
-use strict;
-use warnings;
-use TestLib;
-use Test::More tests => 8;
-
-program_help_ok('pg_receivexlog');
-program_version_ok('pg_receivexlog');
-program_options_handling_ok('pg_receivexlog');
diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h
index 2cd8b6d..8d679da 100644
--- a/src/bin/pg_basebackup/walmethods.h
+++ b/src/bin/pg_basebackup/walmethods.h
@@ -39,7 +39,7 @@ struct WalWriteMethod
  *	- WalDirectoryMethod - write WAL to regular files in a standard pg_xlog
  *	- TarDirectoryMethod - write WAL to a tarfile corresponding to pg_xlog
  *						   (only implements the methods required for pg_basebackup,
- *						   not all those required for pg_receivexlog)
+ *						   not all those required for pg_receivewal)
  */
 WalWriteMethod *CreateWalDirectoryMethod(const char *basedir,
 										 int compression, bool sync);
diff --git a/src/bin/pg_resetwal/.gitignore b/src/bin/pg_resetwal/.gitignore
new file mode 100644
index 0000000..236abb4
--- /dev/null
+++ b/src/bin/pg_resetwal/.gitignore
@@ -0,0 +1 @@
+/pg_resetwal
diff --git a/src/bin/pg_resetwal/Makefile b/src/bin/pg_resetwal/Makefile
new file mode 100644
index 0000000..0f6e5da
--- /dev/null
+++ b/src/bin/pg_resetwal/Makefile
@@ -0,0 +1,35 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_resetwal
+#
+# Copyright (c) 1998-2017, PostgreSQL Global Development Group
+#
+# src/bin/pg_resetwal/Makefile
+#
+#-------------------------------------------------------------------------
+
+PGFILEDESC = "pg_resetwal - reset PostgreSQL WAL log"
+PGAPPICON=win32
+
+subdir = src/bin/pg_resetwal
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+OBJS= pg_resetwal.o $(WIN32RES)
+
+all: pg_resetwal
+
+pg_resetwal: $(OBJS) | submake-libpgport
+	$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+install: all installdirs
+	$(INSTALL_PROGRAM) pg_resetwal$(X) '$(DESTDIR)$(bindir)/pg_resetwal$(X)'
+
+installdirs:
+	$(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+	rm -f '$(DESTDIR)$(bindir)/pg_resetwal$(X)'
+
+clean distclean maintainer-clean:
+	rm -f pg_resetwal$(X) $(OBJS)
diff --git a/src/bin/pg_resetwal/nls.mk b/src/bin/pg_resetwal/nls.mk
new file mode 100644
index 0000000..d04d58e
--- /dev/null
+++ b/src/bin/pg_resetwal/nls.mk
@@ -0,0 +1,4 @@
+# src/bin/pg_resetwal/nls.mk
+CATALOG_NAME     = pg_resetwal
+AVAIL_LANGUAGES  = cs de es fr it ja ko pl pt_BR ru sv zh_CN
+GETTEXT_FILES    = pg_resetwal.c ../../common/restricted_token.c
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
new file mode 100644
index 0000000..96b7097
--- /dev/null
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -0,0 +1,1184 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_resetwal.c
+ *	  A utility to "zero out" the xlog when it's corrupt beyond recovery.
+ *	  Can also rebuild pg_control if needed.
+ *
+ * The theory of operation is fairly simple:
+ *	  1. Read the existing pg_control (which will include the last
+ *		 checkpoint record).  If it is an old format then update to
+ *		 current format.
+ *	  2. If pg_control is corrupt, attempt to intuit reasonable values,
+ *		 by scanning the old xlog if necessary.
+ *	  3. Modify pg_control to reflect a "shutdown" state with a checkpoint
+ *		 record at the start of xlog.
+ *	  4. Flush the existing xlog files and write a new segment with
+ *		 just a checkpoint record in it.  The new segment is positioned
+ *		 just past the end of the old xlog, so that existing LSNs in
+ *		 data pages will appear to be "in the past".
+ * This is all pretty straightforward except for the intuition part of
+ * step 2 ...
+ *
+ *
+ * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/bin/pg_resetwal/pg_resetwal.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*
+ * We have to use postgres.h not postgres_fe.h here, because there's so much
+ * backend-only stuff in the XLOG include files we need.  But we need a
+ * frontend-ish environment otherwise.  Hence this ugly hack.
+ */
+#define FRONTEND 1
+
+#include "postgres.h"
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "access/transam.h"
+#include "access/tuptoaster.h"
+#include "access/multixact.h"
+#include "access/xlog.h"
+#include "access/xlog_internal.h"
+#include "catalog/catversion.h"
+#include "catalog/pg_control.h"
+#include "common/fe_memutils.h"
+#include "common/restricted_token.h"
+#include "storage/large_object.h"
+#include "pg_getopt.h"
+
+
+static ControlFileData ControlFile;		/* pg_control values */
+static XLogSegNo newXlogSegNo;	/* new XLOG segment # */
+static bool guessed = false;	/* T if we had to guess at any values */
+static const char *progname;
+static uint32 set_xid_epoch = (uint32) -1;
+static TransactionId set_xid = 0;
+static TransactionId set_oldest_commit_ts_xid = 0;
+static TransactionId set_newest_commit_ts_xid = 0;
+static Oid	set_oid = 0;
+static MultiXactId set_mxid = 0;
+static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
+static uint32 minXlogTli = 0;
+static XLogSegNo minXlogSegNo = 0;
+
+static bool ReadControlFile(void);
+static void GuessControlValues(void);
+static void PrintControlValues(bool guessed);
+static void PrintNewControlValues(void);
+static void RewriteControlFile(void);
+static void FindEndOfXLOG(void);
+static void KillExistingXLOG(void);
+static void KillExistingArchiveStatus(void);
+static void WriteEmptyXLOG(void);
+static void usage(void);
+
+
+int
+main(int argc, char *argv[])
+{
+	int			c;
+	bool		force = false;
+	bool		noupdate = false;
+	MultiXactId set_oldestmxid = 0;
+	char	   *endptr;
+	char	   *endptr2;
+	char	   *DataDir = NULL;
+	int			fd;
+
+	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_resetwal"));
+
+	progname = get_progname(argv[0]);
+
+	if (argc > 1)
+	{
+		if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+		{
+			usage();
+			exit(0);
+		}
+		if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
+		{
+			puts("pg_resetwal (PostgreSQL) " PG_VERSION);
+			exit(0);
+		}
+	}
+
+
+	while ((c = getopt(argc, argv, "c:D:e:fl:m:no:O:x:")) != -1)
+	{
+		switch (c)
+		{
+			case 'D':
+				DataDir = optarg;
+				break;
+
+			case 'f':
+				force = true;
+				break;
+
+			case 'n':
+				noupdate = true;
+				break;
+
+			case 'e':
+				set_xid_epoch = strtoul(optarg, &endptr, 0);
+				if (endptr == optarg || *endptr != '\0')
+				{
+					/*------
+					  translator: the second %s is a command line argument (-e, etc) */
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-e");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				if (set_xid_epoch == -1)
+				{
+					fprintf(stderr, _("%s: transaction ID epoch (-e) must not be -1\n"), progname);
+					exit(1);
+				}
+				break;
+
+			case 'x':
+				set_xid = strtoul(optarg, &endptr, 0);
+				if (endptr == optarg || *endptr != '\0')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-x");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				if (set_xid == 0)
+				{
+					fprintf(stderr, _("%s: transaction ID (-x) must not be 0\n"), progname);
+					exit(1);
+				}
+				break;
+
+			case 'c':
+				set_oldest_commit_ts_xid = strtoul(optarg, &endptr, 0);
+				if (endptr == optarg || *endptr != ',')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				set_newest_commit_ts_xid = strtoul(endptr + 1, &endptr2, 0);
+				if (endptr2 == endptr + 1 || *endptr2 != '\0')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+
+				if (set_oldest_commit_ts_xid < 2 &&
+					set_oldest_commit_ts_xid != 0)
+				{
+					fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
+					exit(1);
+				}
+
+				if (set_newest_commit_ts_xid < 2 &&
+					set_newest_commit_ts_xid != 0)
+				{
+					fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
+					exit(1);
+				}
+				break;
+
+			case 'o':
+				set_oid = strtoul(optarg, &endptr, 0);
+				if (endptr == optarg || *endptr != '\0')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-o");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				if (set_oid == 0)
+				{
+					fprintf(stderr, _("%s: OID (-o) must not be 0\n"), progname);
+					exit(1);
+				}
+				break;
+
+			case 'm':
+				set_mxid = strtoul(optarg, &endptr, 0);
+				if (endptr == optarg || *endptr != ',')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+
+				set_oldestmxid = strtoul(endptr + 1, &endptr2, 0);
+				if (endptr2 == endptr + 1 || *endptr2 != '\0')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				if (set_mxid == 0)
+				{
+					fprintf(stderr, _("%s: multitransaction ID (-m) must not be 0\n"), progname);
+					exit(1);
+				}
+
+				/*
+				 * XXX It'd be nice to have more sanity checks here, e.g. so
+				 * that oldest is not wrapped around w.r.t. nextMulti.
+				 */
+				if (set_oldestmxid == 0)
+				{
+					fprintf(stderr, _("%s: oldest multitransaction ID (-m) must not be 0\n"),
+							progname);
+					exit(1);
+				}
+				break;
+
+			case 'O':
+				set_mxoff = strtoul(optarg, &endptr, 0);
+				if (endptr == optarg || *endptr != '\0')
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-O");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				if (set_mxoff == -1)
+				{
+					fprintf(stderr, _("%s: multitransaction offset (-O) must not be -1\n"), progname);
+					exit(1);
+				}
+				break;
+
+			case 'l':
+				if (strspn(optarg, "01234567890ABCDEFabcdef") != XLOG_FNAME_LEN)
+				{
+					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-l");
+					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+					exit(1);
+				}
+				XLogFromFileName(optarg, &minXlogTli, &minXlogSegNo);
+				break;
+
+			default:
+				fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+				exit(1);
+		}
+	}
+
+	if (DataDir == NULL && optind < argc)
+		DataDir = argv[optind++];
+
+	/* Complain if any arguments remain */
+	if (optind < argc)
+	{
+		fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
+				progname, argv[optind]);
+		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+				progname);
+		exit(1);
+	}
+
+	if (DataDir == NULL)
+	{
+		fprintf(stderr, _("%s: no data directory specified\n"), progname);
+		fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+		exit(1);
+	}
+
+	/*
+	 * Don't allow pg_resetwal to be run as root, to avoid overwriting the
+	 * ownership of files in the data directory. We need only check for root
+	 * -- any other user won't have sufficient permissions to modify files in
+	 * the data directory.
+	 */
+#ifndef WIN32
+	if (geteuid() == 0)
+	{
+		fprintf(stderr, _("%s: cannot be executed by \"root\"\n"),
+				progname);
+		fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"),
+				progname);
+		exit(1);
+	}
+#endif
+
+	get_restricted_token(progname);
+
+	if (chdir(DataDir) < 0)
+	{
+		fprintf(stderr, _("%s: could not change directory to \"%s\": %s\n"),
+				progname, DataDir, strerror(errno));
+		exit(1);
+	}
+
+	/*
+	 * Check for a postmaster lock file --- if there is one, refuse to
+	 * proceed, on grounds we might be interfering with a live installation.
+	 */
+	if ((fd = open("postmaster.pid", O_RDONLY, 0)) < 0)
+	{
+		if (errno != ENOENT)
+		{
+			fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
+					progname, "postmaster.pid", strerror(errno));
+			exit(1);
+		}
+	}
+	else
+	{
+		fprintf(stderr, _("%s: lock file \"%s\" exists\n"
+						  "Is a server running?  If not, delete the lock file and try again.\n"),
+				progname, "postmaster.pid");
+		exit(1);
+	}
+
+	/*
+	 * Attempt to read the existing pg_control file
+	 */
+	if (!ReadControlFile())
+		GuessControlValues();
+
+	/*
+	 * Also look at existing segment files to set up newXlogSegNo
+	 */
+	FindEndOfXLOG();
+
+	/*
+	 * If we're not going to proceed with the reset, print the current control
+	 * file parameters.
+	 */
+	if ((guessed && !force) || noupdate)
+		PrintControlValues(guessed);
+
+	/*
+	 * Adjust fields if required by switches.  (Do this now so that printout,
+	 * if any, includes these values.)
+	 */
+	if (set_xid_epoch != -1)
+		ControlFile.checkPointCopy.nextXidEpoch = set_xid_epoch;
+
+	if (set_xid != 0)
+	{
+		ControlFile.checkPointCopy.nextXid = set_xid;
+
+		/*
+		 * For the moment, just set oldestXid to a value that will force
+		 * immediate autovacuum-for-wraparound.  It's not clear whether adding
+		 * user control of this is useful, so let's just do something that's
+		 * reasonably safe.  The magic constant here corresponds to the
+		 * maximum allowed value of autovacuum_freeze_max_age.
+		 */
+		ControlFile.checkPointCopy.oldestXid = set_xid - 2000000000;
+		if (ControlFile.checkPointCopy.oldestXid < FirstNormalTransactionId)
+			ControlFile.checkPointCopy.oldestXid += FirstNormalTransactionId;
+		ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
+	}
+
+	if (set_oldest_commit_ts_xid != 0)
+		ControlFile.checkPointCopy.oldestCommitTsXid = set_oldest_commit_ts_xid;
+	if (set_newest_commit_ts_xid != 0)
+		ControlFile.checkPointCopy.newestCommitTsXid = set_newest_commit_ts_xid;
+
+	if (set_oid != 0)
+		ControlFile.checkPointCopy.nextOid = set_oid;
+
+	if (set_mxid != 0)
+	{
+		ControlFile.checkPointCopy.nextMulti = set_mxid;
+
+		ControlFile.checkPointCopy.oldestMulti = set_oldestmxid;
+		if (ControlFile.checkPointCopy.oldestMulti < FirstMultiXactId)
+			ControlFile.checkPointCopy.oldestMulti += FirstMultiXactId;
+		ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
+	}
+
+	if (set_mxoff != -1)
+		ControlFile.checkPointCopy.nextMultiOffset = set_mxoff;
+
+	if (minXlogTli > ControlFile.checkPointCopy.ThisTimeLineID)
+	{
+		ControlFile.checkPointCopy.ThisTimeLineID = minXlogTli;
+		ControlFile.checkPointCopy.PrevTimeLineID = minXlogTli;
+	}
+
+	if (minXlogSegNo > newXlogSegNo)
+		newXlogSegNo = minXlogSegNo;
+
+	/*
+	 * If we had to guess anything, and -f was not given, just print the
+	 * guessed values and exit.  Also print if -n is given.
+	 */
+	if ((guessed && !force) || noupdate)
+	{
+		PrintNewControlValues();
+		if (!noupdate)
+		{
+			printf(_("\nIf these values seem acceptable, use -f to force reset.\n"));
+			exit(1);
+		}
+		else
+			exit(0);
+	}
+
+	/*
+	 * Don't reset from a dirty pg_control without -f, either.
+	 */
+	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"
+				 "If you want to proceed anyway, use -f to force reset.\n"));
+		exit(1);
+	}
+
+	/*
+	 * Else, do the dirty deed.
+	 */
+	RewriteControlFile();
+	KillExistingXLOG();
+	KillExistingArchiveStatus();
+	WriteEmptyXLOG();
+
+	printf(_("Transaction log reset\n"));
+	return 0;
+}
+
+
+/*
+ * Try to read the existing pg_control file.
+ *
+ * This routine is also responsible for updating old pg_control versions
+ * to the current format.  (Currently we don't do anything of the sort.)
+ */
+static bool
+ReadControlFile(void)
+{
+	int			fd;
+	int			len;
+	char	   *buffer;
+	pg_crc32c	crc;
+
+	if ((fd = open(XLOG_CONTROL_FILE, O_RDONLY | PG_BINARY, 0)) < 0)
+	{
+		/*
+		 * If pg_control is not there at all, or we can't read it, the odds
+		 * are we've been handed a bad DataDir path, so give up. User can do
+		 * "touch pg_control" to force us to proceed.
+		 */
+		fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
+				progname, XLOG_CONTROL_FILE, strerror(errno));
+		if (errno == ENOENT)
+			fprintf(stderr, _("If you are sure the data directory path is correct, execute\n"
+							  "  touch %s\n"
+							  "and try again.\n"),
+					XLOG_CONTROL_FILE);
+		exit(1);
+	}
+
+	/* Use malloc to ensure we have a maxaligned buffer */
+	buffer = (char *) pg_malloc(PG_CONTROL_SIZE);
+
+	len = read(fd, buffer, PG_CONTROL_SIZE);
+	if (len < 0)
+	{
+		fprintf(stderr, _("%s: could not read file \"%s\": %s\n"),
+				progname, XLOG_CONTROL_FILE, strerror(errno));
+		exit(1);
+	}
+	close(fd);
+
+	if (len >= sizeof(ControlFileData) &&
+	  ((ControlFileData *) buffer)->pg_control_version == PG_CONTROL_VERSION)
+	{
+		/* Check the CRC. */
+		INIT_CRC32C(crc);
+		COMP_CRC32C(crc,
+					buffer,
+					offsetof(ControlFileData, crc));
+		FIN_CRC32C(crc);
+
+		if (EQ_CRC32C(crc, ((ControlFileData *) buffer)->crc))
+		{
+			/* Valid data... */
+			memcpy(&ControlFile, buffer, sizeof(ControlFile));
+			return true;
+		}
+
+		fprintf(stderr, _("%s: pg_control exists but has invalid CRC; proceed with caution\n"),
+				progname);
+		/* We will use the data anyway, but treat it as guessed. */
+		memcpy(&ControlFile, buffer, sizeof(ControlFile));
+		guessed = true;
+		return true;
+	}
+
+	/* Looks like it's a mess. */
+	fprintf(stderr, _("%s: pg_control exists but is broken or unknown version; ignoring it\n"),
+			progname);
+	return false;
+}
+
+
+/*
+ * Guess at pg_control values when we can't read the old ones.
+ */
+static void
+GuessControlValues(void)
+{
+	uint64		sysidentifier;
+	struct timeval tv;
+
+	/*
+	 * Set up a completely default set of pg_control values.
+	 */
+	guessed = true;
+	memset(&ControlFile, 0, sizeof(ControlFile));
+
+	ControlFile.pg_control_version = PG_CONTROL_VERSION;
+	ControlFile.catalog_version_no = CATALOG_VERSION_NO;
+
+	/*
+	 * Create a new unique installation identifier, since we can no longer use
+	 * any old XLOG records.  See notes in xlog.c about the algorithm.
+	 */
+	gettimeofday(&tv, NULL);
+	sysidentifier = ((uint64) tv.tv_sec) << 32;
+	sysidentifier |= ((uint64) tv.tv_usec) << 12;
+	sysidentifier |= getpid() & 0xFFF;
+
+	ControlFile.system_identifier = sysidentifier;
+
+	ControlFile.checkPointCopy.redo = SizeOfXLogLongPHD;
+	ControlFile.checkPointCopy.ThisTimeLineID = 1;
+	ControlFile.checkPointCopy.PrevTimeLineID = 1;
+	ControlFile.checkPointCopy.fullPageWrites = false;
+	ControlFile.checkPointCopy.nextXidEpoch = 0;
+	ControlFile.checkPointCopy.nextXid = FirstNormalTransactionId;
+	ControlFile.checkPointCopy.nextOid = FirstBootstrapObjectId;
+	ControlFile.checkPointCopy.nextMulti = FirstMultiXactId;
+	ControlFile.checkPointCopy.nextMultiOffset = 0;
+	ControlFile.checkPointCopy.oldestXid = FirstNormalTransactionId;
+	ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
+	ControlFile.checkPointCopy.oldestMulti = FirstMultiXactId;
+	ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
+	ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
+	ControlFile.checkPointCopy.oldestActiveXid = InvalidTransactionId;
+
+	ControlFile.state = DB_SHUTDOWNED;
+	ControlFile.time = (pg_time_t) time(NULL);
+	ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
+	ControlFile.unloggedLSN = 1;
+
+	/* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */
+
+	ControlFile.wal_level = WAL_LEVEL_MINIMAL;
+	ControlFile.wal_log_hints = false;
+	ControlFile.track_commit_timestamp = false;
+	ControlFile.MaxConnections = 100;
+	ControlFile.max_worker_processes = 8;
+	ControlFile.max_prepared_xacts = 0;
+	ControlFile.max_locks_per_xact = 64;
+
+	ControlFile.maxAlign = MAXIMUM_ALIGNOF;
+	ControlFile.floatFormat = FLOATFORMAT_VALUE;
+	ControlFile.blcksz = BLCKSZ;
+	ControlFile.relseg_size = RELSEG_SIZE;
+	ControlFile.xlog_blcksz = XLOG_BLCKSZ;
+	ControlFile.xlog_seg_size = XLOG_SEG_SIZE;
+	ControlFile.nameDataLen = NAMEDATALEN;
+	ControlFile.indexMaxKeys = INDEX_MAX_KEYS;
+	ControlFile.toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE;
+	ControlFile.loblksize = LOBLKSIZE;
+#ifdef HAVE_INT64_TIMESTAMP
+	ControlFile.enableIntTimes = true;
+#else
+	ControlFile.enableIntTimes = false;
+#endif
+	ControlFile.float4ByVal = FLOAT4PASSBYVAL;
+	ControlFile.float8ByVal = FLOAT8PASSBYVAL;
+
+	/*
+	 * XXX eventually, should try to grovel through old XLOG to develop more
+	 * accurate values for TimeLineID, nextXID, etc.
+	 */
+}
+
+
+/*
+ * Print the guessed pg_control values when we had to guess.
+ *
+ * NB: this display should be just those fields that will not be
+ * reset by RewriteControlFile().
+ */
+static void
+PrintControlValues(bool guessed)
+{
+	char		sysident_str[32];
+
+	if (guessed)
+		printf(_("Guessed pg_control values:\n\n"));
+	else
+		printf(_("Current pg_control values:\n\n"));
+
+	/*
+	 * Format system_identifier separately to keep platform-dependent format
+	 * code out of the translatable message string.
+	 */
+	snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
+			 ControlFile.system_identifier);
+
+	printf(_("pg_control version number:            %u\n"),
+		   ControlFile.pg_control_version);
+	printf(_("Catalog version number:               %u\n"),
+		   ControlFile.catalog_version_no);
+	printf(_("Database system identifier:           %s\n"),
+		   sysident_str);
+	printf(_("Latest checkpoint's TimeLineID:       %u\n"),
+		   ControlFile.checkPointCopy.ThisTimeLineID);
+	printf(_("Latest checkpoint's full_page_writes: %s\n"),
+		   ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
+	printf(_("Latest checkpoint's NextXID:          %u:%u\n"),
+		   ControlFile.checkPointCopy.nextXidEpoch,
+		   ControlFile.checkPointCopy.nextXid);
+	printf(_("Latest checkpoint's NextOID:          %u\n"),
+		   ControlFile.checkPointCopy.nextOid);
+	printf(_("Latest checkpoint's NextMultiXactId:  %u\n"),
+		   ControlFile.checkPointCopy.nextMulti);
+	printf(_("Latest checkpoint's NextMultiOffset:  %u\n"),
+		   ControlFile.checkPointCopy.nextMultiOffset);
+	printf(_("Latest checkpoint's oldestXID:        %u\n"),
+		   ControlFile.checkPointCopy.oldestXid);
+	printf(_("Latest checkpoint's oldestXID's DB:   %u\n"),
+		   ControlFile.checkPointCopy.oldestXidDB);
+	printf(_("Latest checkpoint's oldestActiveXID:  %u\n"),
+		   ControlFile.checkPointCopy.oldestActiveXid);
+	printf(_("Latest checkpoint's oldestMultiXid:   %u\n"),
+		   ControlFile.checkPointCopy.oldestMulti);
+	printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
+		   ControlFile.checkPointCopy.oldestMultiDB);
+	printf(_("Latest checkpoint's oldestCommitTsXid:%u\n"),
+		   ControlFile.checkPointCopy.oldestCommitTsXid);
+	printf(_("Latest checkpoint's newestCommitTsXid:%u\n"),
+		   ControlFile.checkPointCopy.newestCommitTsXid);
+	printf(_("Maximum data alignment:               %u\n"),
+		   ControlFile.maxAlign);
+	/* we don't print floatFormat since can't say much useful about it */
+	printf(_("Database block size:                  %u\n"),
+		   ControlFile.blcksz);
+	printf(_("Blocks per segment of large relation: %u\n"),
+		   ControlFile.relseg_size);
+	printf(_("WAL block size:                       %u\n"),
+		   ControlFile.xlog_blcksz);
+	printf(_("Bytes per WAL segment:                %u\n"),
+		   ControlFile.xlog_seg_size);
+	printf(_("Maximum length of identifiers:        %u\n"),
+		   ControlFile.nameDataLen);
+	printf(_("Maximum columns in an index:          %u\n"),
+		   ControlFile.indexMaxKeys);
+	printf(_("Maximum size of a TOAST chunk:        %u\n"),
+		   ControlFile.toast_max_chunk_size);
+	printf(_("Size of a large-object chunk:         %u\n"),
+		   ControlFile.loblksize);
+	printf(_("Date/time type storage:               %s\n"),
+		   (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
+	printf(_("Float4 argument passing:              %s\n"),
+		   (ControlFile.float4ByVal ? _("by value") : _("by reference")));
+	printf(_("Float8 argument passing:              %s\n"),
+		   (ControlFile.float8ByVal ? _("by value") : _("by reference")));
+	printf(_("Data page checksum version:           %u\n"),
+		   ControlFile.data_checksum_version);
+}
+
+
+/*
+ * Print the values to be changed.
+ */
+static void
+PrintNewControlValues(void)
+{
+	char		fname[MAXFNAMELEN];
+
+	/* This will be always printed in order to keep format same. */
+	printf(_("\n\nValues to be changed:\n\n"));
+
+	XLogFileName(fname, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
+	printf(_("First log segment after reset:        %s\n"), fname);
+
+	if (set_mxid != 0)
+	{
+		printf(_("NextMultiXactId:                      %u\n"),
+			   ControlFile.checkPointCopy.nextMulti);
+		printf(_("OldestMultiXid:                       %u\n"),
+			   ControlFile.checkPointCopy.oldestMulti);
+		printf(_("OldestMulti's DB:                     %u\n"),
+			   ControlFile.checkPointCopy.oldestMultiDB);
+	}
+
+	if (set_mxoff != -1)
+	{
+		printf(_("NextMultiOffset:                      %u\n"),
+			   ControlFile.checkPointCopy.nextMultiOffset);
+	}
+
+	if (set_oid != 0)
+	{
+		printf(_("NextOID:                              %u\n"),
+			   ControlFile.checkPointCopy.nextOid);
+	}
+
+	if (set_xid != 0)
+	{
+		printf(_("NextXID:                              %u\n"),
+			   ControlFile.checkPointCopy.nextXid);
+		printf(_("OldestXID:                            %u\n"),
+			   ControlFile.checkPointCopy.oldestXid);
+		printf(_("OldestXID's DB:                       %u\n"),
+			   ControlFile.checkPointCopy.oldestXidDB);
+	}
+
+	if (set_xid_epoch != -1)
+	{
+		printf(_("NextXID epoch:                        %u\n"),
+			   ControlFile.checkPointCopy.nextXidEpoch);
+	}
+
+	if (set_oldest_commit_ts_xid != 0)
+	{
+		printf(_("oldestCommitTsXid:                    %u\n"),
+			   ControlFile.checkPointCopy.oldestCommitTsXid);
+	}
+	if (set_newest_commit_ts_xid != 0)
+	{
+		printf(_("newestCommitTsXid:                    %u\n"),
+			   ControlFile.checkPointCopy.newestCommitTsXid);
+	}
+}
+
+
+/*
+ * Write out the new pg_control file.
+ */
+static void
+RewriteControlFile(void)
+{
+	int			fd;
+	char		buffer[PG_CONTROL_SIZE];		/* need not be aligned */
+
+	/*
+	 * Adjust fields as needed to force an empty XLOG starting at
+	 * newXlogSegNo.
+	 */
+	XLogSegNoOffsetToRecPtr(newXlogSegNo, SizeOfXLogLongPHD,
+							ControlFile.checkPointCopy.redo);
+	ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
+
+	ControlFile.state = DB_SHUTDOWNED;
+	ControlFile.time = (pg_time_t) time(NULL);
+	ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
+	ControlFile.prevCheckPoint = 0;
+	ControlFile.minRecoveryPoint = 0;
+	ControlFile.minRecoveryPointTLI = 0;
+	ControlFile.backupStartPoint = 0;
+	ControlFile.backupEndPoint = 0;
+	ControlFile.backupEndRequired = false;
+
+	/*
+	 * Force the defaults for max_* settings. The values don't really matter
+	 * as long as wal_level='minimal'; the postmaster will reset these fields
+	 * anyway at startup.
+	 */
+	ControlFile.wal_level = WAL_LEVEL_MINIMAL;
+	ControlFile.wal_log_hints = false;
+	ControlFile.track_commit_timestamp = false;
+	ControlFile.MaxConnections = 100;
+	ControlFile.max_worker_processes = 8;
+	ControlFile.max_prepared_xacts = 0;
+	ControlFile.max_locks_per_xact = 64;
+
+	/* Now we can force the recorded xlog seg size to the right thing. */
+	ControlFile.xlog_seg_size = XLogSegSize;
+
+	/* Contents are protected with a CRC */
+	INIT_CRC32C(ControlFile.crc);
+	COMP_CRC32C(ControlFile.crc,
+				(char *) &ControlFile,
+				offsetof(ControlFileData, crc));
+	FIN_CRC32C(ControlFile.crc);
+
+	/*
+	 * We write out PG_CONTROL_SIZE bytes into pg_control, zero-padding the
+	 * excess over sizeof(ControlFileData).  This reduces the odds of
+	 * premature-EOF errors when reading pg_control.  We'll still fail when we
+	 * check the contents of the file, but hopefully with a more specific
+	 * error than "couldn't read pg_control".
+	 */
+	if (sizeof(ControlFileData) > PG_CONTROL_SIZE)
+	{
+		fprintf(stderr,
+				_("%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"),
+				progname);
+		exit(1);
+	}
+
+	memset(buffer, 0, PG_CONTROL_SIZE);
+	memcpy(buffer, &ControlFile, sizeof(ControlFileData));
+
+	unlink(XLOG_CONTROL_FILE);
+
+	fd = open(XLOG_CONTROL_FILE,
+			  O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
+			  S_IRUSR | S_IWUSR);
+	if (fd < 0)
+	{
+		fprintf(stderr, _("%s: could not create pg_control file: %s\n"),
+				progname, strerror(errno));
+		exit(1);
+	}
+
+	errno = 0;
+	if (write(fd, buffer, PG_CONTROL_SIZE) != PG_CONTROL_SIZE)
+	{
+		/* if write didn't set errno, assume problem is no disk space */
+		if (errno == 0)
+			errno = ENOSPC;
+		fprintf(stderr, _("%s: could not write pg_control file: %s\n"),
+				progname, strerror(errno));
+		exit(1);
+	}
+
+	if (fsync(fd) != 0)
+	{
+		fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
+		exit(1);
+	}
+
+	close(fd);
+}
+
+
+/*
+ * Scan existing XLOG files and determine the highest existing WAL address
+ *
+ * On entry, ControlFile.checkPointCopy.redo and ControlFile.xlog_seg_size
+ * are assumed valid (note that we allow the old xlog seg size to differ
+ * from what we're using).  On exit, newXlogId and newXlogSeg are set to
+ * suitable values for the beginning of replacement WAL (in our seg size).
+ */
+static void
+FindEndOfXLOG(void)
+{
+	DIR		   *xldir;
+	struct dirent *xlde;
+	uint64		segs_per_xlogid;
+	uint64		xlogbytepos;
+
+	/*
+	 * Initialize the max() computation using the last checkpoint address from
+	 * old pg_control.  Note that for the moment we are working with segment
+	 * numbering according to the old xlog seg size.
+	 */
+	segs_per_xlogid = (UINT64CONST(0x0000000100000000) / ControlFile.xlog_seg_size);
+	newXlogSegNo = ControlFile.checkPointCopy.redo / ControlFile.xlog_seg_size;
+
+	/*
+	 * Scan the pg_wal directory to find existing WAL segment files. We
+	 * assume any present have been used; in most scenarios this should be
+	 * conservative, because of xlog.c's attempts to pre-create files.
+	 */
+	xldir = opendir(XLOGDIR);
+	if (xldir == NULL)
+	{
+		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+				progname, XLOGDIR, strerror(errno));
+		exit(1);
+	}
+
+	while (errno = 0, (xlde = readdir(xldir)) != NULL)
+	{
+		if (IsXLogFileName(xlde->d_name) ||
+			IsPartialXLogFileName(xlde->d_name))
+		{
+			unsigned int tli,
+						log,
+						seg;
+			XLogSegNo	segno;
+
+			/*
+			 * Note: We don't use XLogFromFileName here, because we want to
+			 * use the segment size from the control file, not the size the
+			 * pg_resetwal binary was compiled with
+			 */
+			sscanf(xlde->d_name, "%08X%08X%08X", &tli, &log, &seg);
+			segno = ((uint64) log) * segs_per_xlogid + seg;
+
+			/*
+			 * Note: we take the max of all files found, regardless of their
+			 * timelines.  Another possibility would be to ignore files of
+			 * timelines other than the target TLI, but this seems safer.
+			 * Better too large a result than too small...
+			 */
+			if (segno > newXlogSegNo)
+				newXlogSegNo = segno;
+		}
+	}
+
+	if (errno)
+	{
+		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+				progname, XLOGDIR, strerror(errno));
+		exit(1);
+	}
+
+	if (closedir(xldir))
+	{
+		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+				progname, XLOGDIR, strerror(errno));
+		exit(1);
+	}
+
+	/*
+	 * Finally, convert to new xlog seg size, and advance by one to ensure we
+	 * are in virgin territory.
+	 */
+	xlogbytepos = newXlogSegNo * ControlFile.xlog_seg_size;
+	newXlogSegNo = (xlogbytepos + XLogSegSize - 1) / XLogSegSize;
+	newXlogSegNo++;
+}
+
+
+/*
+ * Remove existing XLOG files
+ */
+static void
+KillExistingXLOG(void)
+{
+	DIR		   *xldir;
+	struct dirent *xlde;
+	char		path[MAXPGPATH];
+
+	xldir = opendir(XLOGDIR);
+	if (xldir == NULL)
+	{
+		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+				progname, XLOGDIR, strerror(errno));
+		exit(1);
+	}
+
+	while (errno = 0, (xlde = readdir(xldir)) != NULL)
+	{
+		if (IsXLogFileName(xlde->d_name) ||
+			IsPartialXLogFileName(xlde->d_name))
+		{
+			snprintf(path, MAXPGPATH, "%s/%s", XLOGDIR, xlde->d_name);
+			if (unlink(path) < 0)
+			{
+				fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
+						progname, path, strerror(errno));
+				exit(1);
+			}
+		}
+	}
+
+	if (errno)
+	{
+		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+				progname, XLOGDIR, strerror(errno));
+		exit(1);
+	}
+
+	if (closedir(xldir))
+	{
+		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+				progname, XLOGDIR, strerror(errno));
+		exit(1);
+	}
+}
+
+
+/*
+ * Remove existing archive status files
+ */
+static void
+KillExistingArchiveStatus(void)
+{
+	DIR		   *xldir;
+	struct dirent *xlde;
+	char		path[MAXPGPATH];
+
+#define ARCHSTATDIR XLOGDIR "/archive_status"
+
+	xldir = opendir(ARCHSTATDIR);
+	if (xldir == NULL)
+	{
+		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+				progname, ARCHSTATDIR, strerror(errno));
+		exit(1);
+	}
+
+	while (errno = 0, (xlde = readdir(xldir)) != NULL)
+	{
+		if (strspn(xlde->d_name, "0123456789ABCDEF") == XLOG_FNAME_LEN &&
+			(strcmp(xlde->d_name + XLOG_FNAME_LEN, ".ready") == 0 ||
+			 strcmp(xlde->d_name + XLOG_FNAME_LEN, ".done") == 0 ||
+			 strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.ready") == 0 ||
+			 strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.done") == 0))
+		{
+			snprintf(path, MAXPGPATH, "%s/%s", ARCHSTATDIR, xlde->d_name);
+			if (unlink(path) < 0)
+			{
+				fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
+						progname, path, strerror(errno));
+				exit(1);
+			}
+		}
+	}
+
+	if (errno)
+	{
+		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+				progname, ARCHSTATDIR, strerror(errno));
+		exit(1);
+	}
+
+	if (closedir(xldir))
+	{
+		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+				progname, ARCHSTATDIR, strerror(errno));
+		exit(1);
+	}
+}
+
+
+/*
+ * Write an empty XLOG file, containing only the checkpoint record
+ * already set up in ControlFile.
+ */
+static void
+WriteEmptyXLOG(void)
+{
+	char	   *buffer;
+	XLogPageHeader page;
+	XLogLongPageHeader longpage;
+	XLogRecord *record;
+	pg_crc32c	crc;
+	char		path[MAXPGPATH];
+	int			fd;
+	int			nbytes;
+	char	   *recptr;
+
+	/* Use malloc() to ensure buffer is MAXALIGNED */
+	buffer = (char *) pg_malloc(XLOG_BLCKSZ);
+	page = (XLogPageHeader) buffer;
+	memset(buffer, 0, XLOG_BLCKSZ);
+
+	/* Set up the XLOG page header */
+	page->xlp_magic = XLOG_PAGE_MAGIC;
+	page->xlp_info = XLP_LONG_HEADER;
+	page->xlp_tli = ControlFile.checkPointCopy.ThisTimeLineID;
+	page->xlp_pageaddr = ControlFile.checkPointCopy.redo - SizeOfXLogLongPHD;
+	longpage = (XLogLongPageHeader) page;
+	longpage->xlp_sysid = ControlFile.system_identifier;
+	longpage->xlp_seg_size = XLogSegSize;
+	longpage->xlp_xlog_blcksz = XLOG_BLCKSZ;
+
+	/* Insert the initial checkpoint record */
+	recptr = (char *) page + SizeOfXLogLongPHD;
+	record = (XLogRecord *) recptr;
+	record->xl_prev = 0;
+	record->xl_xid = InvalidTransactionId;
+	record->xl_tot_len = SizeOfXLogRecord + SizeOfXLogRecordDataHeaderShort + sizeof(CheckPoint);
+	record->xl_info = XLOG_CHECKPOINT_SHUTDOWN;
+	record->xl_rmid = RM_XLOG_ID;
+
+	recptr += SizeOfXLogRecord;
+	*(recptr++) = XLR_BLOCK_ID_DATA_SHORT;
+	*(recptr++) = sizeof(CheckPoint);
+	memcpy(recptr, &ControlFile.checkPointCopy,
+		   sizeof(CheckPoint));
+
+	INIT_CRC32C(crc);
+	COMP_CRC32C(crc, ((char *) record) + SizeOfXLogRecord, record->xl_tot_len - SizeOfXLogRecord);
+	COMP_CRC32C(crc, (char *) record, offsetof(XLogRecord, xl_crc));
+	FIN_CRC32C(crc);
+	record->xl_crc = crc;
+
+	/* Write the first page */
+	XLogFilePath(path, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
+
+	unlink(path);
+
+	fd = open(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
+			  S_IRUSR | S_IWUSR);
+	if (fd < 0)
+	{
+		fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
+				progname, path, strerror(errno));
+		exit(1);
+	}
+
+	errno = 0;
+	if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
+	{
+		/* if write didn't set errno, assume problem is no disk space */
+		if (errno == 0)
+			errno = ENOSPC;
+		fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
+				progname, path, strerror(errno));
+		exit(1);
+	}
+
+	/* Fill the rest of the file with zeroes */
+	memset(buffer, 0, XLOG_BLCKSZ);
+	for (nbytes = XLOG_BLCKSZ; nbytes < XLogSegSize; nbytes += XLOG_BLCKSZ)
+	{
+		errno = 0;
+		if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
+		{
+			if (errno == 0)
+				errno = ENOSPC;
+			fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
+					progname, path, strerror(errno));
+			exit(1);
+		}
+	}
+
+	if (fsync(fd) != 0)
+	{
+		fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
+		exit(1);
+	}
+
+	close(fd);
+}
+
+
+static void
+usage(void)
+{
+	printf(_("%s resets the PostgreSQL transaction 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"));
+	printf(_("                   (zero in either value means no change)\n"));
+	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(_("  -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"));
+	printf(_("  -O OFFSET        set next multitransaction offset\n"));
+	printf(_("  -V, --version    output version information, then exit\n"));
+	printf(_("  -x XID           set next transaction ID\n"));
+	printf(_("  -?, --help       show this help, then exit\n"));
+	printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
+}
diff --git a/src/bin/pg_resetwal/po/cs.po b/src/bin/pg_resetwal/po/cs.po
new file mode 100644
index 0000000..52ddcac
--- /dev/null
+++ b/src/bin/pg_resetwal/po/cs.po
@@ -0,0 +1,498 @@
+# Czech message translation file for pg_resetxlog
+# Copyright (C) 2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Tomas Vondra <tv@fuzzy.cz>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog-cs (PostgreSQL 9.3)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2013-09-23 20:18+0000\n"
+"PO-Revision-Date: 2013-12-01 20:46-0500\n"
+"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
+"Language-Team: Czech <info@cspug.cx>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Lokalize 1.5\n"
+
+#: pg_resetxlog.c:133
+#, c-format
+msgid "%s: invalid argument for option -e\n"
+msgstr "%s: neplatný argument pro volbu -e\n"
+
+#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
+#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
+#: pg_resetxlog.c:242
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Zkuste \"%s --help\" pro více informací.\n"
+
+#: pg_resetxlog.c:139
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: epocha ID transakce (-e) nesmí být -1\n"
+
+#: pg_resetxlog.c:148
+#, c-format
+msgid "%s: invalid argument for option -x\n"
+msgstr "%s: neplatný argument pro volbu -x\n"
+
+#: pg_resetxlog.c:154
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID transakce (-x) nesmí být 0\n"
+
+#: pg_resetxlog.c:163
+#, c-format
+msgid "%s: invalid argument for option -o\n"
+msgstr "%s: neplatný argument pro volbu -o\n"
+
+#: pg_resetxlog.c:169
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) nesmí být 0\n"
+
+#: pg_resetxlog.c:178 pg_resetxlog.c:186
+#, c-format
+msgid "%s: invalid argument for option -m\n"
+msgstr "%s: neplatný argument pro volbu -m\n"
+
+#: pg_resetxlog.c:192
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID transakce (-m) nesmí být 0\n"
+
+#: pg_resetxlog.c:202
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID nejstarší multitransakce (-m) nesmí být 0\n"
+
+#: pg_resetxlog.c:212
+#, c-format
+msgid "%s: invalid argument for option -O\n"
+msgstr "%s: neplatný argument pro volbu -O\n"
+
+#: pg_resetxlog.c:218
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: ID transakce (-O) nesmí být -1\n"
+
+#: pg_resetxlog.c:226
+#, c-format
+msgid "%s: invalid argument for option -l\n"
+msgstr "%s: neplatný argument pro volbu -l\n"
+
+#: pg_resetxlog.c:241
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: není specifikován datový adresář\n"
+
+#: pg_resetxlog.c:255
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: nemůže být spuštěn uživatelem \"root\"\n"
+
+#: pg_resetxlog.c:257
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Musíte spustit %s jako PostgreSQL superuživatel.\n"
+
+#: pg_resetxlog.c:267
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: nelze změnit adresář na \"%s\": %s\n"
+
+#: pg_resetxlog.c:280 pg_resetxlog.c:414
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: nelze otevřít soubor \"%s\" pro čtení: %s\n"
+
+#: pg_resetxlog.c:287
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: soubor se zámkem \"%s\" existuje\n"
+"Neběží již server?  Jestliže ne, smažte soubor se zámkem a zkuste to znova.\n"
+
+#: pg_resetxlog.c:362
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Jestliže tyto hodnoty vypadají akceptovatelně, použijte -f pro vynucený "
+"reset.\n"
+
+#: pg_resetxlog.c:374
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Databázový server nebyl ukončen standardně.\n"
+"Resetování transakčního logu může způsobit ztrátu dat.\n"
+"Jestliže i přesto chcete pokračovat, použijte -f pro vynucený reset.\n"
+
+#: pg_resetxlog.c:388
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Transakční log resetován\n"
+
+#: pg_resetxlog.c:417
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Máte-li jistotu, že je cesta k datovému adresáři správná, proveďte\n"
+"  touch %s\n"
+"a zkuste to znovu.\n"
+
+#: pg_resetxlog.c:430
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: nelze číst soubor \"%s\": %s\n"
+
+#: pg_resetxlog.c:453
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr ""
+"%s: pg_control existuje, ale s neplatným kontrolním součtem CRC; postupujte "
+"opatrně\n"
+
+#: pg_resetxlog.c:462
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr ""
+"%s: pg_control existuje, ale je poškozen nebo neznámé verze; ignoruji to\n"
+
+#: pg_resetxlog.c:561
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Odhadnuté hodnoty pg_controlu:\n"
+"\n"
+
+#: pg_resetxlog.c:563
+#, c-format
+msgid ""
+"pg_control values:\n"
+"\n"
+msgstr ""
+"Hodnoty pg_controlu:\n"
+"\n"
+
+#: pg_resetxlog.c:574
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "První log segment po resetu:  %s\n"
+
+#: pg_resetxlog.c:576
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "číslo verze pg_controlu:              %u\n"
+
+#: pg_resetxlog.c:578
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Číslo verze katalogu:               %u\n"
+
+#: pg_resetxlog.c:580
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Identifikátor databázového systému:   %s\n"
+
+#: pg_resetxlog.c:582
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineID posledního checkpointu:     %u\n"
+
+#: pg_resetxlog.c:584
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Poslední full_page_writes checkpointu:       %s\n"
+
+#: pg_resetxlog.c:585
+msgid "off"
+msgstr "vypnuto"
+
+#: pg_resetxlog.c:585
+msgid "on"
+msgstr "zapnuto"
+
+#: pg_resetxlog.c:586
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgstr "Poslední umístění NextXID checkpointu:          %u/%u\n"
+
+#: pg_resetxlog.c:589
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "Poslední umístění NextOID checkpointu:          %u\n"
+
+#: pg_resetxlog.c:591
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId posledního checkpointu:          %u\n"
+
+#: pg_resetxlog.c:593
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset posledního checkpointu:          %u\n"
+
+#: pg_resetxlog.c:595
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID posledního checkpointu:          %u\n"
+
+#: pg_resetxlog.c:597
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "DB k oldestXID posledního checkpointu:   %u\n"
+
+#: pg_resetxlog.c:599
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID posledního checkpointu:          %u\n"
+
+#: pg_resetxlog.c:601
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid posledního checkpointu:   %u\n"
+
+#: pg_resetxlog.c:603
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "oldestMulti's DB posledního checkpointu: %u\n"
+
+#: pg_resetxlog.c:605
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Maximální zarovnání dat:              %u\n"
+
+#: pg_resetxlog.c:608
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Velikost databázového bloku:                  %u\n"
+
+#: pg_resetxlog.c:610
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Bloků v segmentu velké relace: %u\n"
+
+#: pg_resetxlog.c:612
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Velikost WAL bloku:                   %u\n"
+
+#: pg_resetxlog.c:614
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Bytů ve WAL segmentu:                  %u\n"
+
+#: pg_resetxlog.c:616
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Maximální délka identifikátorů:        %u\n"
+
+#: pg_resetxlog.c:618
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Maximální počet sloupců v indexu:     %u\n"
+
+#: pg_resetxlog.c:620
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Maximální velikost úseku TOAST:       %u\n"
+
+#: pg_resetxlog.c:622
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Způsob uložení typu date/time:               %s\n"
+
+#: pg_resetxlog.c:623
+msgid "64-bit integers"
+msgstr "64-bitová čísla"
+
+#: pg_resetxlog.c:623
+msgid "floating-point numbers"
+msgstr "čísla s plovoucí řádovou čárkou"
+
+#: pg_resetxlog.c:624
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Způsob předávání float4 hodnot:        %s\n"
+
+#: pg_resetxlog.c:625 pg_resetxlog.c:627
+msgid "by reference"
+msgstr "odkazem"
+
+#: pg_resetxlog.c:625 pg_resetxlog.c:627
+msgid "by value"
+msgstr "hodnotou"
+
+#: pg_resetxlog.c:626
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Způsob předávání float8 hodnot:        %s\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+#| msgid "Catalog version number:               %u\n"
+msgid "Data page checksum version:           %u\n"
+msgstr "Verze kontrolních součtů datových stránek:           %u\n"
+
+#: pg_resetxlog.c:690
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: interní chyba -- sizeof(ControlFileData) je příliš velký ... opravte "
+"PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:705
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: nelze vytvořit pg_control soubor: %s\n"
+
+#: pg_resetxlog.c:716
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: nelze zapsat pg_control soubor: %s\n"
+
+#: pg_resetxlog.c:723 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync chyba: %s\n"
+
+#: pg_resetxlog.c:763 pg_resetxlog.c:834 pg_resetxlog.c:890
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: nelze otevřít adresář \"%s\": %s\n"
+
+#: pg_resetxlog.c:805 pg_resetxlog.c:867 pg_resetxlog.c:924
+#, c-format
+msgid "%s: could not read from directory \"%s\": %s\n"
+msgstr "%s: nelze číst z adresáře \"%s\": %s\n"
+
+#: pg_resetxlog.c:848 pg_resetxlog.c:905
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: nelze smazat soubor \"%s\": %s\n"
+
+#: pg_resetxlog.c:989
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: nelze otevřít soubor \"%s\": %s\n"
+
+#: pg_resetxlog.c:1000 pg_resetxlog.c:1014
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: nelze zapsat do souboru \"%s\": %s\n"
+
+#: pg_resetxlog.c:1033
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s resetuje PostgreSQL transakční log.\n"
+"\n"
+
+#: pg_resetxlog.c:1034
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Použití:\n"
+"  %s [VOLBA]... ADRESÁŘ\n"
+"\n"
+
+#: pg_resetxlog.c:1035
+#, c-format
+msgid "Options:\n"
+msgstr "Přepínače:\n"
+
+#: pg_resetxlog.c:1036
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      nastaví epochu následujícího ID transakce\n"
+
+#: pg_resetxlog.c:1037
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f              vynutí provedení update\n"
+
+#: pg_resetxlog.c:1038
+#, c-format
+msgid ""
+"  -l XLOGFILE      force minimum WAL starting location for new transaction "
+"log\n"
+msgstr ""
+"  -l XLOGFILE      vynutí minimální počáteční WAL pozici pro nový transakční "
+"log\n"
+
+#: pg_resetxlog.c:1039
+#, c-format
+#| msgid "  -x XID           set next transaction ID\n"
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     nastav další a nejstarší ID multitransakce\n"
+
+#: pg_resetxlog.c:1040
+#, c-format
+msgid ""
+"  -n               no update, just show extracted control values (for "
+"testing)\n"
+msgstr ""
+"  -n              bez změny, jen ukáže získané kontrolní hodnoty (pro "
+"testování)\n"
+
+#: pg_resetxlog.c:1041
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID          nastaví následující OID\n"
+
+#: pg_resetxlog.c:1042
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET       nastaví offset následující multitransakce\n"
+
+#: pg_resetxlog.c:1043
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    ukáže informace o verzi a skončí\n"
+
+#: pg_resetxlog.c:1044
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID          nastaví ID následující transakce\n"
+
+#: pg_resetxlog.c:1045
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       ukáže tuto nápovědu a skončí\n"
+
+#: pg_resetxlog.c:1046
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "First log file ID after reset:        %u\n"
+#~ msgstr "První ID log souboru po resetu:       %u\n"
diff --git a/src/bin/pg_resetwal/po/de.po b/src/bin/pg_resetwal/po/de.po
new file mode 100644
index 0000000..fb6324d
--- /dev/null
+++ b/src/bin/pg_resetwal/po/de.po
@@ -0,0 +1,605 @@
+# German message translation file for pg_resetxlog
+# Peter Eisentraut <peter_e@gmx.net>, 2002 - 2016.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-12 20:14+0000\n"
+"PO-Revision-Date: 2016-04-12 18:28-0400\n"
+"Last-Translator: Peter Eisentraut <peter_e@gmx.net>\n"
+"Language-Team: German <peter_e@gmx.net>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: WARNUNG: auf dieser Plattform können keine beschränkten Token erzeugt werden\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: konnte Prozess-Token nicht öffnen: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: konnte SIDs nicht erzeugen: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: konnte beschränktes Token nicht erzeugen: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: konnte Prozess für Befehl »%s« nicht starten: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: konnte Prozess nicht mit beschränktem Token neu starten: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: konnte Statuscode des Subprozesses nicht ermitteln: Fehlercode %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: ungültiges Argument für Option %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: Transaktions-ID-Epoche (-e) darf nicht -1 sein\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: Transaktions-ID (-x) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: Transaktions-ID (-c) muss entweder 0 oder größer oder gleich 2 sein\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: Multitransaktions-ID (-m) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: älteste Multitransaktions-ID (-m) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: Multitransaktions-Offset (-O) darf nicht -1 sein\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: zu viele Kommandozeilenargumente (das erste ist »%s«)\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: kein Datenverzeichnis angegeben\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: kann nicht von »root« ausgeführt werden\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Sie müssen %s als PostgreSQL-Superuser ausführen.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: konnte nicht in Verzeichnis »%s« wechseln: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: konnte Datei »%s« nicht zum Lesen öffnen: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: Sperrdatei »%s« existiert bereits\n"
+"Läuft der Server?  Wenn nicht, dann Sperrdatei löschen und nochmal versuchen.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Wenn diese Werte akzeptabel scheinen, dann benutzen Sie -f um das\n"
+"Zurücksetzen zu erzwingen.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Der Datenbankserver wurde nicht sauber heruntergefahren.\n"
+"Beim Zurücksetzen des Transaktionslogs können Daten verloren gehen.\n"
+"Wenn Sie trotzdem weiter machen wollen, benutzen Sie -f, um das\n"
+"Zurücksetzen zu erzwingen.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Transaktionslog wurde zurück gesetzt\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Wenn Sie sicher sind, dass das Datenverzeichnis korrekt ist, führen Sie\n"
+"  touch %s\n"
+"aus und versuchen Sie es erneut.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: konnte Datei »%s« nicht lesen: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control existiert, aber mit ungültiger CRC; mit Vorsicht fortfahren\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control existiert, aber ist kaputt oder hat unbekannte Version; wird ignoriert\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Geschätzte pg_control-Werte:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Aktuelle pg_control-Werte:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "pg_control-Versionsnummer:                   %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Katalogversionsnummer:                       %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Datenbanksystemidentifikation:               %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineID des letzten Checkpoints:          %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes des letzten Checkpoints:    %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "aus"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "an"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "NextXID des letzten Checkpoints:             %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID des letzten Checkpoints:             %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId des letzten Checkpoints:     %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset des letzten Checkpoints:     %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID des letzten Checkpoints:           %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "DB der oldestXID des letzten Checkpoints:    %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID des letzten Checkpoints:     %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid des letzten Checkpoints:      %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB des oldestMulti des letzten Checkpoints:  %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid des letzten Checkpoints:   %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid des letzten Checkpoints:   %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Maximale Datenausrichtung (Alignment):       %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Datenbankblockgröße:                         %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blöcke pro Segment:                          %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "WAL-Blockgröße:                              %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Bytes pro WAL-Segment:                       %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Maximale Bezeichnerlänge:                    %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Maximale Spalten in einem Index:             %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Maximale Größe eines Stücks TOAST:           %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Größe eines Large-Object-Chunks:             %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Speicherung von Datum/Zeit-Typen:            %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-Bit-Ganzzahlen"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "Gleitkommazahlen"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Übergabe von Float4-Argumenten:              %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "Referenz"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "Wert"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Übergabe von Float8-Argumenten:              %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Datenseitenprüfsummenversion:                %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Zu ändernde Werte:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Erstes Logdateisegment nach Zurücksetzen:    %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                             %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                              %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "OldestMulti's DB:                            %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                             %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                                     %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                                     %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                                   %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "OldestXID's DB:                              %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "NextXID-Epoche:                              %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                           %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                           %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: interner Fehler -- sizeof(ControlFileData) ist zu groß ... PG_CONTROL_SIZE reparieren\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: konnte pg_control-Datei nicht erstellen: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%sL konnte pg_control-Datei nicht schreiben: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync-Fehler: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: konnte Verzeichnis »%s« nicht öffnen: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: konnte Verzeichnis »%s« nicht lesen: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: konnte Verzeichnis »%s« nicht schließen: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: konnte Datei »%s« nicht löschen: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: konnte Datei »%s« nicht öffnen: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: konnte Datei »%s« nicht schreiben: %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s setzt den PostgreSQL-Transaktionslog zurück.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Aufruf:\n"
+"  %s [OPTION]... DATENVERZEICHNIS\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Optionen:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
+msgstr "  -c XID,XID       älteste und neuste Transaktion mit Commit-Timestamp setzen\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   (Null in einem Wert bedeutet keine Änderung)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DATENVERZ    Datenbankverzeichnis\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCHE     nächste Transaktions-ID-Epoche setzen\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               Änderung erzwingen\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr "  -l XLOGDATEI     minimale WAL-Startposition für neuen Log erzwingen\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     nächste und älteste Multitransaktions-ID setzen\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr ""
+"  -n               keine Änderungen; nur zeigen, was gemacht werden würde (zum\n"
+"                   Testen)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           nächste OID setzen\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        nächsten Multitransaktions-Offset setzen\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    Versionsinformationen anzeigen, dann beenden\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           nächste Transaktions-ID setzen\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       diese Hilfe anzeigen, dann beenden\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Berichten Sie Fehler an <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/es.po b/src/bin/pg_resetwal/po/es.po
new file mode 100644
index 0000000..fec8ea9
--- /dev/null
+++ b/src/bin/pg_resetwal/po/es.po
@@ -0,0 +1,611 @@
+# Spanish message translation file for pg_resetxlog
+#
+# Copyright (C) 2003-2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Ivan Hernandez <ivanx@ciencias.unam.mx>, 2003.
+# Alvaro Herrera <alvherre@alvh.no-ip.org>, 2004-2014
+# Jaime Casanova <systemguards@gmail.com>, 2005
+# Martín Marqués <martin@2ndquadrant.com>, 2013-2014
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL 9.6)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-05-02 20:14+0000\n"
+"PO-Revision-Date: 2016-05-24 10:56-0500\n"
+"Last-Translator: Carlos Chapi <carlos.chapi@2ndquadrant.com>\n"
+"Language-Team: Español <pgsql-es-ayuda@postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.7\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ATENCIÓN: no se pueden crear tokens restrigidos en esta plataforma\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: no se pudo abrir el token de proceso: código de error %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: no se pudo emplazar los SIDs: código de error %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: no se pudo crear el token restringido: código de error %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: no se pudo iniciar el proceso para la orden «%s»: código de error %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: no se pudo re-ejecutar con el token restringido: código de error %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: no se pudo obtener el código de salida del subproceso»: código de error %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: argumento no válido para la opción %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Prueba con «%s --help» para más información\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: el «epoch» de ID de transacción (-e) no debe ser -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: el ID de transacción (-x) no debe ser 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: el ID de transacción (-c) debe ser 0 o bien mayor o igual a 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) no debe ser cero\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: el ID de multitransacción (-m) no debe ser 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: el ID de multitransacción más antiguo (-m) no debe ser 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: la posición de multitransacción (-O) no debe ser -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: demasiados argumentos de línea de órdenes (el primero es «%s»)\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: directorio de datos no especificado\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: no puede ser ejecutado con el usuario «root»\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Debe ejecutar %s con el superusuario de PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: no se pudo cambiar al directorio «%s»: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: no se pudo abrir el archivo «%s» para lectura: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: el archivo candado «%s» existe\n"
+"¿Hay un servidor corriendo? Si no, borre el archivo candado e inténtelo de nuevo\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Si estos valores parecen aceptables, use -f para forzar reinicio.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"El servidor de base de datos no fue terminado limpiamente.\n"
+"Reiniciar la bitácora de transacciones puede causar pérdida de datos.\n"
+"Si de todas formas quiere proceder, use -f para forzar su reinicio.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Bitácora de transacciones reiniciada\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Si está seguro que la ruta al directorio de datos es correcta, ejecute\n"
+"   touch %s\n"
+"y pruebe de nuevo.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: no se pudo leer el archivo «%s»: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: existe pg_control pero tiene un CRC no válido, proceda con precaución\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: existe pg_control pero está roto o se desconoce su versión; ignorándolo\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valores de pg_control asumidos:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valores actuales de pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "Número de versión de pg_control:                 %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Número de versión de catálogo:                   %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Identificador de sistema:                        %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineID del checkpoint más reciente:          %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes del checkpoint más reciente:    %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "desactivado"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "activado"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "NextXID del checkpoint más reciente:             %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID del checkpoint más reciente:             %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId del checkpoint más reciente:     %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset del checkpoint más reciente:     %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID del checkpoint más reciente:           %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "BD del oldestXID del checkpoint más reciente:    %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID del checkpoint más reciente:     %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid del checkpoint más reciente:      %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "BD del oldestMultiXid del checkpt. más reciente: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid del último checkpoint:         %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid del último checkpoint:         %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Máximo alineamiento de datos:                    %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Tamaño del bloque de la base de datos:           %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Bloques por segmento de relación grande:         %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Tamaño del bloque de WAL:                        %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Bytes por segmento WAL:                          %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Longitud máxima de identificadores:              %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Máximo número de columnas en un índice:          %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Longitud máxima de un trozo TOAST:               %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Longitud máxima de un trozo de objeto grande:    %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Tipo de almacenamiento hora/fecha:               %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "enteros de 64 bits"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "números de coma flotante"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Paso de parámetros float4:                       %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "por referencia"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "por valor"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Paso de parámetros float8:                       %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Versión de suma de verificación de datos:        %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valores a cambiar:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Primer segmento de log después de reiniciar:     %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                      %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                       %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "Base de datos del OldestMulti:        %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                      %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                              %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                              %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                            %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "Base de datos del OldestXID:          %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "Epoch del NextXID:                    %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                    %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                    %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: error interno -- sizeof(ControlFileData) es demasiado grande ... corrija PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: no se pudo crear el archivo pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: no se pudo escribir el archivo pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: error de fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: no se pudo abrir el directorio «%s»: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: no se pudo leer el directorio «%s»: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: no se pudo cerrar el directorio «%s»: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: no se pudo borrar el archivo «%s»: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: no se pudo abrir el archivo «%s»: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: no se pudo escribir en el archivo «%s»: %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s reinicia la bitácora de transacciones de PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Uso:\n"
+"   %s [OPCIÓN]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opciones:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
+msgstr ""
+"  -c XID,XID      asigna los ID de transacciones más antiguo y más nuevo que llevan\n"
+"                  timestamp de commit\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                  (cero en cualquiera de ellos significa no cambiar)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DATADIR     directorio de datos\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH     asigna el siguiente «epoch» de ID de transacción\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f              fuerza que la actualización sea hecha\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr ""
+"  -l XLOGFILE     fuerza una posición mínima de inicio de WAL para una\n"
+"                  nueva transacción\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID    asigna el siguiente ID de multitransacción y el más antiguo\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr "  -n              no actualiza, sólo muestra lo que va a hacer (para pruebas)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID          asigna el siguiente OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET       asigna la siguiente posición de multitransacción\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version   muestra información de la versión, luego sale\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID          asigna el siguiente ID de transacción\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help      muestra esta ayuda, luego sale\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Reporte errores a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/fr.po b/src/bin/pg_resetwal/po/fr.po
new file mode 100644
index 0000000..1a9a57f
--- /dev/null
+++ b/src/bin/pg_resetwal/po/fr.po
@@ -0,0 +1,644 @@
+# translation of pg_resetxlog.po to fr_fr
+# french message translation file for pg_resetxlog
+#
+# Use these quotes: � %s �
+#
+# Guillaume Lelarge <guillaume@lelarge.info>, 2003-2009.
+# St�phane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-05-08 21:14+0000\n"
+"PO-Revision-Date: 2016-05-09 10:28+0200\n"
+"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
+"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s : ATTENTION : ne peut pas cr�r les jetons restreints sur cette plateforme\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s : n'a pas pu ouvrir le jeton du processus : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s : n'a pas pu allouer les SID : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s : n'a pas pu cr�er le jeton restreint : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s : n'a pas pu d�marrer le processus pour la commande � %s � : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s : n'a pas pu r�-ex�cuter le jeton restreint : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s : n'a pas pu r�cup�rer le code de statut du sous-processus : code d'erreur %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s : argument invalide pour l'option %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Essayer � %s --help � pour plus d'informations.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr ""
+"%s : la valeur epoch de l'identifiant de transaction (-e) ne doit pas �tre\n"
+"-1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s : l'identifiant de la transaction (-x) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s : l'identifiant de transaction (-c) doit �tre 0 ou sup�rieur ou �gal � 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s : l'OID (-o) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s : l'identifiant de multi-transaction (-m) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s : l'identifiant de multi-transaction le plus ancien (-m) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s : le d�calage de multi-transaction (-O) ne doit pas �tre -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s : trop d'arguments en ligne de commande (le premier �tant � %s �)\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s : aucun r�pertoire de donn�es indiqu�\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s : ne peut pas �tre ex�cut� par � root �\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Vous devez ex�cuter %s en tant que super-utilisateur PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s : n'a pas pu acc�der au r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s : n'a pas pu ouvrir le fichier � %s � en lecture : %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s : le verrou � %s � existe\n"
+"Le serveur est-il d�marr� ? Sinon, supprimer le fichier verrou et r�essayer.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Si ces valeurs semblent acceptables, utiliser -f pour forcer la\n"
+"r�initialisation.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Le serveur de bases de donn�es n'a pas �t� arr�t� proprement.\n"
+"R�-initialiser le journal des transactions peut occasionner des pertes de\n"
+"donn�es.\n"
+"Pour continuer malgr� tout, utiliser -f pour forcer la\n"
+"r�initialisation.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "R�initialisation du journal des transactions\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Si le chemin du r�pertoire de donn�es est correct, ex�cuter\n"
+"  touch %s\n"
+"et r�essayer.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s : n'a pas pu lire le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s : pg_control existe mais son CRC est invalide ; agir avec pr�caution\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s : pg_control existe mais est corrompu ou de version inconnue ; ignor�\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valeurs de pg_control devin�es :\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valeurs actuelles de pg_control :\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "Num�ro de version de pg_control :                       %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Num�ro de version du catalogue :                        %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Identifiant du syst�me de base de donn�es :             %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "Dernier TimeLineID du point de contr�le :               %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Dernier full_page_writes du point de contr�le :         %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "d�sactiv�"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "activ�"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "Dernier NextXID du point de contr�le :                  %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "Dernier NextOID du point de contr�le :                  %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "Dernier NextMultiXactId du point de contr�le :          %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "Dernier NextMultiOffset du point de contr�le :          %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "Dernier oldestXID du point de contr�le :                %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "Dernier oldestXID du point de contr�le de la base :     %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "Dernier oldestActiveXID du point de contr�le :          %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "Dernier oldestMultiXID du point de contr�le :           %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "Dernier oldestMulti du point de contr�le de la base :     %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "Dernier oldestCommitTsXid du point de contr�le :        %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "Dernier newestCommitTsXid du point de contr�le :        %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Alignement maximal des donn�es :                        %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Taille du bloc de la base de donn�es :                  %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blocs par segment des relations volumineuses :          %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Taille de bloc du journal de transaction :              %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Octets par segment du journal de transaction :          %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Longueur maximale des identifiants :                    %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Nombre maximal de colonnes d'un index:                  %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Longueur maximale d'un morceau TOAST :                  %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Taille d'un morceau de Large Object :                   %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Stockage du type date/heure :                           %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "entiers 64-bits"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "nombres � virgule flottante"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Passage d'argument float4 :                             %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "par r�f�rence"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "par valeur"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Passage d'argument float8 :                             %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Version des sommes de contr�le des pages de donn�es : %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valeurs � changer :\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Premier segment du journal apr�s r�initialisation :     %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                      %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                       %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "OldestMulti's DB:                     %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                      %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                              %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                              %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                            %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "OldestXID's DB:                       %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "NextXID Epoch:                        %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                    %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                    %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr ""
+"%s : erreur interne -- sizeof(ControlFileData) est trop important...\n"
+"corrigez PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s : n'a pas pu cr�er le fichier pg_control : %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s : n'a pas pu �crire le fichier pg_control : %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s : erreur fsync : %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s : n'a pas pu ouvrir le r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s : n'a pas pu fermer le r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s : n'a pas pu supprimer le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s : n'a pas pu ouvrir le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s : n'a pas pu �crire le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s r�initialise le journal des transactions PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Usage :\n"
+"  %s [OPTION]... R�P_DONN�ES\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Options :\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
+msgstr "  -c XID,XID      configure la plus ancienne et la plus r�cente transaction\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                  (z�ro dans l'une des deux valeurs signifie aucun changement)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr "  [-D] R�PDONNEES r�pertoire de la base de donn�es\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr ""
+"  -e XIDEPOCH     fixe la valeur epoch du prochain identifiant de\n"
+"                  transaction\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f              force la mise � jour\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr ""
+"  -l FICHIERXLOG  force l'emplacement minimal de d�but des WAL du nouveau\n"
+"                  journal de transactions\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID    fixe le prochain identifiant multi-transaction\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr ""
+"  -n              pas de mise � jour, affiche simplement ce qui sera fait\n"
+"                  (pour test)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID          fixe le prochain OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O D�CALAGE     fixe le d�calage de la prochaine multi-transaction\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version  affiche la version et quitte\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID          fixe le prochain identifiant de transaction\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help     affiche cette aide et quitte\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Rapporter les bogues � <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s : argument invalide pour l'option -x\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s : argument invalide pour l'option -o\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s : argument invalide pour l'option -m\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s : argument invalide pour l'option -O\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s : argument invalide pour l'option -l\n"
+
+#~ msgid "%s: could not read from directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
+
+#~ msgid "  --help          show this help, then exit\n"
+#~ msgstr "  --help          affiche cette aide et quitte\n"
+
+#~ msgid "  --version       output version information, then exit\n"
+#~ msgstr "  --version       afficherla version et quitte\n"
+
+#~ msgid "First log file ID after reset:        %u\n"
+#~ msgstr "Premier identifiant du journal apr�s r�initialisation : %u\n"
diff --git a/src/bin/pg_resetwal/po/it.po b/src/bin/pg_resetwal/po/it.po
new file mode 100644
index 0000000..9fc4479
--- /dev/null
+++ b/src/bin/pg_resetwal/po/it.po
@@ -0,0 +1,620 @@
+#
+# Translation of pg_resetxlog to Italian
+# PostgreSQL Project
+#
+# Associazione Culturale ITPUG - Italian PostgreSQL Users Group
+# http://www.itpug.org/ - info@itpug.org
+#
+# Traduttori:
+#  * Diego Cinelli <diego.cinelli@itpug.org>
+#  * Daniele Varrazzo <daniele.varrazzo@gmail.com>
+#
+# Revisori:
+#  * Emanuele Zamprogno <emanuele.zamprogno@itpug.org>
+#
+# Traduttori precedenti:
+#  * Fabrizio Mazzoni <veramente@libero.it>
+#  * Mirko Tebaldi <mirko.tebaldi@libero.it>
+#
+# Copyright (c) 2010, Associazione Culturale ITPUG
+# Distributed under the same license of the PostgreSQL project
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL) 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-17 00:14+0000\n"
+"PO-Revision-Date: 2016-04-17 20:51+0100\n"
+"Last-Translator: Daniele Varrazzo <daniele.varrazzo@gmail.com>\n"
+"Language-Team: Gruppo traduzioni ITPUG <traduzioni@itpug.org>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ATTENZIONE: non è possibile creare token ristretti su questa piattaforma\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: apertura del token di processo fallita: codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: allocazione dei SID fallita: codice di errore: %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: creazione del token ristretto fallita: codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: avvio del processo fallito per il comando \"%s\": codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: ri-esecuzione con token ristretto fallita: codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: lettura del codice di uscita del sottoprocesso fallita: codice di errore %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: argomento non valido per l'opzione %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Prova \"%s --help\" per maggiori informazioni.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: l'ID epoch della transazione (-e) non deve essere -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: l'ID della transazione (-x) non deve essere 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: l'ID di transazione (-c) dev'essere 0 or maggiore o uguale a 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: l'OID (-o) non deve essere 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: l'ID della multitransazione (-m) non deve essere 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: l'ID multitransazione più vecchio (-m) non può essere 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: l'offset di una multitransazione (-O) non può essere -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: troppi argomenti di riga di comando (il primo è \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: non è stata specificata una directory per i dati\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s non può essere eseguito da \"root\"\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "È obbligatorio eseguire %s come superutente di PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: spostamento nella directory \"%s\" fallito: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: errore nell'apertura del file \"%s\" per la lettura: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: il file di lock \"%s\" esiste\n"
+"Il server è in esecuzione? Se non lo è, cancella il file di lock e riprova.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Se questi parametri sembrano accettabili, utilizza -f per forzare un reset.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Il server database non è stato arrestato correttamente.\n"
+"Resettare il registro delle transazioni può causare una perdita di dati.\n"
+"Se vuoi continuare comunque, utilizza -f per forzare il reset.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Registro delle transazioni riavviato\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Se sei sicuro che il percorso della directory dei dati è corretto, esegui\n"
+"  touch %s\n"
+"e riprova.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: lettura del file \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control esiste ma ha un CRC non valido; procedere con cautela\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control esiste ma è inutilizzabile o è una versione sconosciuta; verrà ignorato\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valori pg_control indovinati:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valori pg_control attuali:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "Numero di versione di pg_control:           %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Numero di versione del catalogo:            %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Identificatore di sistema del database:     %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineId dell'ultimo checkpoint:          %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes dell'ultimo checkpoint:    %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "disattivato"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "attivato"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "NextXID dell'ultimo checkpoint:             %u.%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID dell'ultimo checkpoint:             %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId dell'ultimo checkpoint:     %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset dell'ultimo checkpoint:     %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID dell'ultimo checkpoint:           %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "DB dell'oldestXID dell'ultimo checkpoint:   %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID dell'ultimo checkpoint:     %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXID dell'ultimo checkpoint:      %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB dell'oldestMulti dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid dell'ultimo checkpoint:   %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid dell'ultimo checkpoint:   %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Massimo allineamento dei dati:              %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Dimensione blocco database:                 %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blocchi per ogni segmento grosse tabelle:   %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Dimensione blocco WAL:                      %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Byte per segmento WAL:                      %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Lunghezza massima degli identificatori:     %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Massimo numero di colonne in un indice:     %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Massima dimensione di un segmento TOAST:    %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Dimensione di un blocco large-object:       %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Memorizzazione per tipi data/ora:           %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "interi a 64 bit"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "numeri in virgola mobile"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Passaggio di argomenti Float4:              %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "per riferimento"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "per valore"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "passaggio di argomenti Float8:              %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Versione somma di controllo dati pagine:    %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valori da cambiare:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Primo segmento di log dopo il reset:        %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                            %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                             %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "DB di OldestMulti:                          %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                            %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                                    %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                                    %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                                  %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "DB di OldestXID:                            %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "Epoca del NextXID:                          %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                          %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                          %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: errore interno -- sizeof(ControlFileData) è troppo grande ... correggere PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: creazione del file pg_control fallita: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: scrittura del file pg_control fallita: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: errore fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: apertura della directory \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: lettura della directory \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: chiusura della directory \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: cancellazione del file \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: apertura del file \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: errore nella scrittura del file \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s riavvia il registro delle transazioni di PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Utilizzo:\n"
+"  %s [OPZIONI]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opzioni:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
+msgstr "  -c XID,XID       imposta le transazione più vecchia e più nuova che portano l'ora di commit\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   (zero in uno dei dei valori vuol dire nessun cambiamento)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DATADIR      directory dei dati\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      imposta il prossimo ID epoch transazione\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               forza l'esecuzione dell'aggiornamento\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr "  -l XLOGFILE      forza la locazione di inizio WAL minima per il nuovo log transazioni\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     imposta gli ID multitransazione successivo e più vecchio\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr "  -n               nessuna modifica, mostra solo cosa sarebbe fatto (per prova)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           imposta il prossimo OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        imposta il prossimo offset multitransazione\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    mostra informazioni sulla versione ed esci\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           imposta il prossimo ID di transazione\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       mostra questo aiuto ed esci\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Puoi segnalare eventuali bug a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/ja.po b/src/bin/pg_resetwal/po/ja.po
new file mode 100644
index 0000000..54a0f87
--- /dev/null
+++ b/src/bin/pg_resetwal/po/ja.po
@@ -0,0 +1,490 @@
+# translation of initdb.
+# Shigehiro Honda <fwif0083@mb.infoweb.ne.jp>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.0 beta 3\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2013-08-18 12:05+0900\n"
+"PO-Revision-Date: 2013-08-18 12:10+0900\n"
+"Last-Translator: HOTTA Michihide <hotta@net-newbie.com>\n"
+"Language-Team: jpug-doc <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: pg_resetxlog.c:133
+#, c-format
+msgid "%s: invalid argument for option -e\n"
+msgstr "%s: オプション -e の引数が無効です\n"
+
+#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
+#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
+#: pg_resetxlog.c:242
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "詳細は\"%s --help\"を実行してください\n"
+
+#: pg_resetxlog.c:139
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: トランザクションID エポック(-e)は -1 であってはなりません\n"
+
+#: pg_resetxlog.c:148
+#, c-format
+msgid "%s: invalid argument for option -x\n"
+msgstr "%s: オプション-xの引数が無効です\n"
+
+#: pg_resetxlog.c:154
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: トランザクションID(-x)は非0でなければなりません\n"
+
+#: pg_resetxlog.c:163
+#, c-format
+msgid "%s: invalid argument for option -o\n"
+msgstr "%s: オプション-oの引数が無効です\n"
+
+#: pg_resetxlog.c:169
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID(-o)は非0でなければなりません\n"
+
+#: pg_resetxlog.c:178 pg_resetxlog.c:186
+#, c-format
+msgid "%s: invalid argument for option -m\n"
+msgstr "%s: オプション-mの引数が無効です\n"
+
+#: pg_resetxlog.c:192
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: マルチトランザクションID(-m)は非0でなければなりません\n"
+
+#: pg_resetxlog.c:202
+#, c-format
+#| msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: 最も古いマルチトランザクションID(-m)は非0でなければなりません\n"
+
+#: pg_resetxlog.c:212
+#, c-format
+msgid "%s: invalid argument for option -O\n"
+msgstr "%s: オプション-Oの引数が無効です\n"
+
+#: pg_resetxlog.c:218
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: マルチトランザクションオフセット(-O)は-1ではいけません\n"
+
+#: pg_resetxlog.c:226
+#, c-format
+msgid "%s: invalid argument for option -l\n"
+msgstr "%s: オプション-lの引数が無効です\n"
+
+#: pg_resetxlog.c:241
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: データディレクトリが指定されていません\n"
+
+#: pg_resetxlog.c:255
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: \"root\"では実行できません\n"
+
+#: pg_resetxlog.c:257
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "PostgreSQLのスーパーユーザで%sを実行しなければなりません\n"
+
+#: pg_resetxlog.c:267
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: ディレクトリ\"%s\"に移動できませんでした: %s\n"
+
+#: pg_resetxlog.c:280 pg_resetxlog.c:414
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: 読み取り用のファイル\"%s\"をオープンできませんでした: %s\n"
+
+#: pg_resetxlog.c:287
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: ロックファイル\"%s\"があります\n"
+"サーバが稼動していませんか? 稼動していなければロックファイルを削除し再実行してください。\n"
+
+#: pg_resetxlog.c:362
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"この値が適切だと思われるのであれば、-fを使用して強制リセットしてください。\n"
+
+#: pg_resetxlog.c:374
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"データベースサーバが正しくシャットダウンされていませんでした。\n"
+"トランザクションログのリセットにはデータ損失の恐れがあります。\n"
+"とにかく処理したいのであれば、-fを使用して強制的にリセットしてください。\n"
+
+#: pg_resetxlog.c:388
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "トランザクションログをリセットします。\n"
+
+#: pg_resetxlog.c:417
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"確実にデータディレクトリのパスが正しければ、\n"
+"  touch %s\n"
+"を実行し、再実行してください。\n"
+"\n"
+
+#: pg_resetxlog.c:430
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: ファイル\"%s\"を読み込めませんでした: %s\n"
+
+#: pg_resetxlog.c:453
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_controlがありましたが、CRCが無効でした。警告付きで続行します\n"
+
+#: pg_resetxlog.c:462
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_controlがありましたが、破損あるいは未知のバージョンでしたので無視します\n"
+
+#: pg_resetxlog.c:562
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"pg_controlの推測値:\n"
+"\n"
+
+#: pg_resetxlog.c:564
+#, c-format
+msgid ""
+"pg_control values:\n"
+"\n"
+msgstr ""
+"pg_controlの値:\n"
+"\n"
+
+#: pg_resetxlog.c:575
+#, c-format
+#| msgid "First log file segment after reset:   %u\n"
+msgid "First log segment after reset:        %s\n"
+msgstr "リセット後、最初のログセグメント:        %s\n"
+
+#: pg_resetxlog.c:577
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "pg_controlバージョン番号:                 %u\n"
+
+#: pg_resetxlog.c:579
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "カタログバージョン番号:                   %u\n"
+
+#: pg_resetxlog.c:581
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "データベースシステム識別子:               %s\n"
+
+#: pg_resetxlog.c:583
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "最終チェックポイントの時系列ID:           %u\n"
+
+#: pg_resetxlog.c:585
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "最終チェックポイントのfull_page_writes %s\n"
+
+#: pg_resetxlog.c:586
+msgid "off"
+msgstr "オフ"
+
+#: pg_resetxlog.c:586
+msgid "on"
+msgstr "オン"
+
+#: pg_resetxlog.c:587
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgstr "最終チェックポイントのNextXID:                    %u/%u\n"
+
+#: pg_resetxlog.c:590
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "最終チェックポイントのNextOID:            %u\n"
+
+#: pg_resetxlog.c:592
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "最終チェックポイントのNextMultiXactId:  %u\n"
+
+#: pg_resetxlog.c:594
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "最終チェックポイントのNextMultiOffset:   %u\n"
+
+#: pg_resetxlog.c:596
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "最終チェックポイントのoldestXID:      %u\n"
+
+#: pg_resetxlog.c:598
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "最終チェックポイントのoldestXIDのDB:  %u\n"
+
+#: pg_resetxlog.c:600
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "最終チェックポイントのoldestActiveXID: %u\n"
+
+#: pg_resetxlog.c:602
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "最終チェックポイントのoldestMultiXid:   %u\n"
+
+#: pg_resetxlog.c:604
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "最終チェックポイントのoldestMulti'sのDB: %u\n"
+
+#: pg_resetxlog.c:606
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "最大のデータアライメント:               %u\n"
+
+#: pg_resetxlog.c:609
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "データベースブロックサイズ:               %u\n"
+
+#: pg_resetxlog.c:611
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "ラージリレーションセグメントのブロック数: %u\n"
+
+#: pg_resetxlog.c:613
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "WALブロックのサイズ:                              %u\n"
+
+#: pg_resetxlog.c:615
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "WALセグメント当たりのバイト数:                  %u\n"
+
+#: pg_resetxlog.c:617
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "識別子の最大長:                           %u\n"
+
+#: pg_resetxlog.c:619
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "インデックス内の最大列数:                  %u\n"
+
+#: pg_resetxlog.c:621
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "TOAST チャンク一個の最大サイズ:       %u\n"
+
+#: pg_resetxlog.c:623
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "日付/時刻型の格納方式                     %s\n"
+
+#: pg_resetxlog.c:624
+msgid "64-bit integers"
+msgstr "64ビット整数"
+
+#: pg_resetxlog.c:624
+msgid "floating-point numbers"
+msgstr "浮動小数点数"
+
+#: pg_resetxlog.c:625
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Float4 引数の渡し方：                 %s\n"
+
+#: pg_resetxlog.c:626 pg_resetxlog.c:628
+msgid "by reference"
+msgstr "参照渡し"
+
+#: pg_resetxlog.c:626 pg_resetxlog.c:628
+msgid "by value"
+msgstr "値渡し"
+
+#: pg_resetxlog.c:627
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Float8  引数の渡し方：                %s\n"
+
+#: pg_resetxlog.c:629
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "データベージチェックサムのバージョン:           %u\n"
+
+#: pg_resetxlog.c:692
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: 内部エラー -- sizeof(ControlFileData)が大きすぎます \n"
+"... PG_CONTROL_SIZE を修正してください\n"
+
+#: pg_resetxlog.c:707
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: pg_controlファイルを作成できませんでした: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: pg_controlファイルを書き込めませんでした: %s\n"
+
+#: pg_resetxlog.c:725 pg_resetxlog.c:1024
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsyncエラー: %s\n"
+
+#: pg_resetxlog.c:765 pg_resetxlog.c:836 pg_resetxlog.c:892
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: ディレクトリ\"%s\"をオープンできませんでした: %s\n"
+
+#: pg_resetxlog.c:807 pg_resetxlog.c:869 pg_resetxlog.c:926
+#, c-format
+msgid "%s: could not read from directory \"%s\": %s\n"
+msgstr "%s: ディレクトリ\"%s\"から読み込めませんでした: %s\n"
+
+#: pg_resetxlog.c:850 pg_resetxlog.c:907
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: ファイル\"%s\"を削除できませんでした: %s\n"
+
+#: pg_resetxlog.c:991
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: ファイル\"%s\"をオープンできませんでした: %s\n"
+
+#: pg_resetxlog.c:1002 pg_resetxlog.c:1016
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: ファイル\"%s\"を書き込めませんでした: %s\n"
+
+#: pg_resetxlog.c:1035
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%sはPostgreSQLのトランザクションログをリセットします。\n"
+"\n"
+
+#: pg_resetxlog.c:1036
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"使用方法:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1037
+#, c-format
+msgid "Options:\n"
+msgstr "オプション:\n"
+
+#: pg_resetxlog.c:1038
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH     次のトランザクションIDエポックを設定します\n"
+
+#: pg_resetxlog.c:1039
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f              強制的に更新を実施します\n"
+
+#: pg_resetxlog.c:1040
+#, c-format
+#| msgid "  -l TLI,FILE,SEG  force minimum WAL starting location for new transaction log\n"
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr "  -l XLOGFILE      新しいトランザクションログの最小WAL開始ポイントを強制します\n\n"
+
+#: pg_resetxlog.c:1041
+#, c-format
+#| msgid "  -m XID           set next multitransaction ID\n"
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     次の最も古いマルチトランザクションIDを設定します\n"
+
+#: pg_resetxlog.c:1042
+#, c-format
+msgid "  -n               no update, just show extracted control values (for testing)\n"
+msgstr "  -n              更新をせず、単に取り出した制御値を表示します(試験用)\n"
+
+#: pg_resetxlog.c:1043
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID          次のOIDを設定します\n"
+
+#: pg_resetxlog.c:1044
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        次のマルチトランザクションオフセットを設定します\n"
+
+#: pg_resetxlog.c:1045
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version             バージョン情報を表示し、終了します\n"
+
+#: pg_resetxlog.c:1046
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID          次のトランザクションIDを設定します\n"
+
+#: pg_resetxlog.c:1047
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help                このヘルプを表示し、終了します\n"
+
+#: pg_resetxlog.c:1048
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"不具合は<pgsql-bugs@postgresql.org>まで報告してください。\n"
+
+#~ msgid "  --version       output version information, then exit\n"
+#~ msgstr "  --version       バージョン情報を表示し、終了します\n"
+
+#~ msgid "  --help          show this help, then exit\n"
+#~ msgstr "  --help          ヘルプを表示し、終了します\n"
+
+#~ msgid "First log file ID after reset:        %u\n"
+#~ msgstr "リセット後、現在のログファイルID:     %u\n"
diff --git a/src/bin/pg_resetwal/po/ko.po b/src/bin/pg_resetwal/po/ko.po
new file mode 100644
index 0000000..47d83c3
--- /dev/null
+++ b/src/bin/pg_resetwal/po/ko.po
@@ -0,0 +1,616 @@
+# Korean message translation file for PostgreSQL pg_resetxlog
+# Ioseph Kim <ioseph@uri.sarang.net>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.5\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-01-27 10:03+0900\n"
+"PO-Revision-Date: 2016-01-29 13:45+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: Korean Team <pgsql-kr@postgresql.kr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ko\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: 경고: 이 운영체제에서 restricted token을 만들 수 없음\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: 프로세스 토큰을 열 수 없음: 오류 코드 %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: SID를 할당할 수 없음: 오류 코드 %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: 상속된 토큰을 만들 수 없음: 오류 코드 %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: \"%s\" 명령용 프로세스를 시작할 수 없음: 오류 코드 %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: 상속된 토큰으로 재실행할 수 없음: 오류 코드 %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: 하위 프로세스의 종료 코드를 구할 수 없음: 오류 코드 %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: %s 옵션의 잘못된 인자\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "자세한 사용법은 \"%s --help\"\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: 트랜잭션 ID epoch (-e) 값은 -1이 아니여야함\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: 트랜잭션 ID (-x) 값은 0이 아니여야함\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid ""
+"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr ""
+"%s: -c 옵션으로 지정한 트랜잭션 ID는 0이거나 2이상이어야 함\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) 값은 0이 아니여야함\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: 멀티트랜잭션 ID (-m) 값은 0이 아니여야함\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: 제일 오래된 멀티트랜잭션 ID (-m) 값은 0이 아니여야함\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: 멀티트랜잭션 옵셋 (-O) 값은 -1이 아니여야함\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: 너무 많은 명령행 인수를 지정했습니다. (처음 \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: 데이터 디렉터리를 지정하지 않았음\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: 이 프로그램은 \"root\"로 실행될 수 없음\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "PostgreSQL superuser로 %s 프로그램을 실행하십시오.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: \"%s\" 디렉터리로 바꿀 수 없음: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: \"%s\" 파일을 읽기 모드로 열 수 없음: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: \"%s\" 잠금 파일이 있습니다.\n"
+"서버가 가동중인가요? 그렇지 않다면, 이 파일을 지우고 다시 시도하십시오.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"이 설정값들이 타당하다고 판단되면, 강제로 갱신하려면, -f 옵션을 쓰세요.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"이 데이터베이스 서버는 정상적으로 중지되지 못했습니다.\n"
+"트랜잭션 로그를 다시 설정하는 것은 자료 손실을 야기할 수 있습니다.\n"
+"그럼에도 불구하고 진행하려면, -f 옵션을 사용해서 강제 설정을 하십시오.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "트랜잭션 로그 재설정\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"지정한 데이터 디렉터리가 맞다면, 다음 명령을 실행하고, 다시 시도해\n"
+"보십시오.\n"
+"  touch %s\n"
+"(win32에서 어떻게 하나?)\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: \"%s\" 파일을 읽을 수 없음: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr ""
+"%s: pg_control파일이 있지만, CRC값이 잘못되었습니다; 경고과 함께 진행함\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control파일이 있지만, 손상되었거나 버전을 알 수 없음; 무시함\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"추측된 pg_control 설정값들:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"현재 pg_control 설정값들:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "pg_control 버전 번호:                 %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "카탈로그 버전 번호:                   %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "데이터베이스 시스템 식별자:           %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "마지막 체크포인트 TimeLineID:         %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "마지막 체크포인트 full_page_writes:   %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "off"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "on"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgstr "마지막 체크포인트 NextXID:            %u/%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "마지막 체크포인트 NextOID:            %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "마지막 체크포인트 NextMultiXactId:    %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "마지막 체크포인트 NextMultiOffset:    %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "마지막 체크포인트 제일 오래된 XID:    %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "마지막 체크포인트 제일 오래된 XID의 DB:%u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "마지막 체크포인트 제일 오래된 ActiveXID:%u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "마지막 체크포인트 제일 오래된 MultiXid:%u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "마지막 체크포인트 제일 오래된 MultiXid의 DB:%u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "마지막 체크포인트 제일 오래된 CommitTsXid:%u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "마지막 체크포인트 최신 CommitTsXid:   %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "최대 자료 정렬:                       %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "데이터베이스 블록 크기:               %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "대형 릴레이션의 세그먼트당 블럭 갯수: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "WAL 블록 크기:                        %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "WAL 세그먼트의 크기(byte):            %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "식별자 최대 길이:                     %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "인덱스에서 사용하는 최대 열 수:      %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "TOAST 청크의 최대 크기:        %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "대형객체 청크의 최대 크기:            %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "날짜/시간형 자료의 저장방식:          %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-비트 정수"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "부동소수"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Float4 인수 전달:                     %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "참조별"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "값별"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Float8 인수 전달:                     %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "데이터 페이지 체크섬 버전:            %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"변경될 값:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "리셋 뒤 첫 로그 세그먼트:             %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                      %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                       %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "OldestMultiXid의 DB:                  %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                      %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                              %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                              %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                            %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "OldestXID의 DB:                       %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "NextXID epoch:                        %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "제일 오래된 CommitTsXid:              %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "최근 CommitTsXid:                     %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: 내부 오류 -- sizeof(ControlFileData) 값이 너무 큼 ... PG_CONTROL_SIZE 고"
+"쳐야함\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: pg_control 파일 만들 수 없음: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: pg_control 파일 쓸 수 없음: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync 오류: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: \"%s\" 디렉터리 열 수 없음: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: \"%s\" 디렉터리를 읽을 수 없음: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: \"%s\" 디렉터리를 닫을 수 없음: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: \"%s\" 파일 삭제 할 수 없음: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: \"%s\" 파일 열 수 없음: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: \"%s\" 파일 쓸 수 없음: %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s 프로그램은 PostgreSQL 트랜잭션 로그를 다시 설정합니다.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"사용법:\n"
+"  %s [옵션]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "옵션들:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid ""
+"  -c XID,XID       set oldest and newest transactions bearing commit "
+"timestamp\n"
+msgstr ""
+"  -c XID,XID       커밋 시간을 도출하는 제일 오래된, 최신의 트랜잭션 지정\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   (0으로 지정하면 바꾸지 않음)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DATADIR      데이터 디렉터리\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      다음 트랙잭션 ID epoch 지정\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               강제로 갱신함\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid ""
+"  -l XLOGFILE      force minimum WAL starting location for new transaction "
+"log\n"
+msgstr ""
+"  -l XLOGFILE      새 트랜잭션 로그를 위한 WAL 최소 시작 위치를 강제로 지정\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     다음 제일 오래된 멀티트랜잭션 ID 지정\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid ""
+"  -n               no update, just show what would be done (for testing)\n"
+msgstr ""
+"  -n               갱신하지 않음, 컨트롤 값들을 보여주기만 함(테스트용)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           다음 OID 지정\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        다음 멀티트랜잭션 옵셋 지정\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    버전 정보 보여주고 마침\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           다음 XID(트랜잭션 ID) 지정\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       이 도움말을 보여주고 마침\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"오류보고: <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/pl.po b/src/bin/pg_resetwal/po/pl.po
new file mode 100644
index 0000000..d87214b
--- /dev/null
+++ b/src/bin/pg_resetwal/po/pl.po
@@ -0,0 +1,626 @@
+# pg_resetxlog message translation file for pg_resetxlog
+# Copyright (C) 2011 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Begina Felicysym <begina.felicysym@wp.eu>, 2011, 2012, 2013.
+# grzegorz <begina.felicysym@wp.eu>, 2014, 2015, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL 9.1)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-07-03 03:14+0000\n"
+"PO-Revision-Date: 2016-07-03 17:54+0200\n"
+"Last-Translator: grzegorz <begina.felicysym@wp.eu>\n"
+"Language-Team: begina.felicysym@wp.eu\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: OSTRZEŻENIE nie można tworzyć ograniczonych tokenów na tej platformie\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: nie można otworzyć tokenu procesu: kod błędu %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: nie udało się przydzielić SIDów: kod błędu %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: nie udało się utworzyć ograniczonego tokena: kod błędu %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: nie udało się uruchomić procesu dla polecenia \"%s\": kod błędu %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: nie udało się ponownie wykonać ograniczonego tokena: %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: nie udało uzyskać kodu wyjścia z usługi podrzędnej: kod błędu %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: niepoprawny argument dla opcji %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Spróbuj \"%s --help\" aby uzyskać więcej informacji.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: epoka ID transakcji (-e) nie może być -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID transakcji (-x) nie może być 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: ID transakcji (-c) musi być albo 0 albo większa lub równa 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) nie może być 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID multitransakcji (-m) nie może być 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: najstarszy ID multitransakcji (-m) nie może być 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: offset multitransakcji (-O) nie może być -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: za duża ilość parametrów (pierwszy to \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: katalog danych nie został ustawiony\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: nie może być wykonywane pod \"rootem\"\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Musisz uruchomić %s jako superużytkownik PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: nie można zmienić katalogu na \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: nie można otworzyć pliku \"%s\" do odczytu: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: plik blokady \"%s\" istnieje\n"
+"Czy serwer działa? Jeśli nie, usuń plik blokady i spróbuj ponownie.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Jeśli te wartości wydają się do przyjęcia, użyj -f by wymusić reset.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Serwer bazy danych nie został poprawnie zamknięty.\n"
+"Zresetowanie dziennika transakcji może spowodować utratę danych.\n"
+"Jeśli chcesz kontynuować, użyj -f, aby wymusić reset.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Reset dziennika transakcji\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Jeśli jesteś pewien, że ścieżka folder u jest poprawna, wykonaj\n"
+"  touch %s\n"
+"i spróbuj ponownie.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: nie można odczytać z pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control istnieje ale ma niepoprawne CRC; postępuj ostrożnie\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control istnieje ale jest uszkodzony lub ma nieznaną wersję, zignorowano\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Odgadnięte wartości pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Bieżące wartości pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "pg_control w wersji numer:                       %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Katalog w wersji numer:                          %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Identyfikator systemu bazy danych:               %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineID najnowszego punktu kontrolnego:       %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes najnowszego punktu kontrolnego: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "wyłączone"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "włączone"
+
+#: pg_resetxlog.c:649
+#, c-format
+#| msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "NextXID najnowszego punktu kontrolnego:          %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID najnowszego punktu kontrolnego:          %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId najnowszego punktu kontrolnego:  %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset najnowszego punktu kontrolnego:  %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID najnowszego punktu kontrolnego:        %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "DB oldestXID'u najnowszego punktu kontrolnego:   %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "NextXID najnowszego punktu kontrolnego:          %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid najnowszego punktu kontrolnego:   %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB oldestMulti'u najnowszego punktu kontrolnego:  %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Maksymalne wyrównanie danych:                    %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Wielkość bloku bazy danych:                      %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Bloki na segment są w relacji:                   %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Wielkość bloku WAL:                              %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Bajtów na segment WAL:                           %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Maksymalna długość identyfikatorów:              %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Maksymalna liczba kolumn w indeksie:             %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Maksymalny rozmiar fragmentu TOAST:              %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Rozmiar fragmentu dużego obiektu:                %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Typ przechowywania daty/czasu:                   %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-bit'owe zmienne integer"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "liczby zmiennoprzecinkowe"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Przekazywanie parametru float4:                  %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "przez referencję"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "przez wartość"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Przekazywanie parametru float8:                  %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Suma kontrolna strony danych w wersji numer:     %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Wartości do zmiany:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Pierwszy segment dziennika po resecie:            %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                                  %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                                   %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "DB OldestMulti'u:                                 %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                                  %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                                          %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                                          %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                                        %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "DB OldestXIDu:                                    %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "Epoka NextXID:                                    %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                                %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                                %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: błąd wewnętrzny -- sizeof(ControlFileData) jest zbyt duża ... popraw PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: nie można utworzyć pliku pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: nie można pisać do pliku pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: błąd fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: nie można otworzyć katalogu \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: nie można odczytać katalogu \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: nie można zamknąć katalogu \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: nie można usunąć pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: nie można otworzyć pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: nie można zapisać pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s resetuje log transakcji PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Sposób użycia:\n"
+"  %s [OPCJA]... FOLDERDANYCH\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opcje:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
+msgstr "  -c XID,XID       ustawia najstarszy i najświeższy znacznik czasu wykonywanego zatwierdzenia\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   (zero w obu wartościach oznacza brak zmian)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DATADIR      folder bazy danych\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      ustawia epokę ID następnej transakcji\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               wymusza wykonanie modyfikacji\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr "  -l XLOGFILE      wymusza minimalne położenie początkowe WAL dla nowego komunikatu transakcji\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m XID,MXID      ustawia ID następnej i najstarszej multitransakcji\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr "  -n               bez modyfikacji, po prostu wyświetl co będzie zrobione (do testowania)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           ustawia następny OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        ustawia następny offset multitransakcji\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    wypisuje informacje o wersji i kończy\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           ustawia ID następnej transakcji\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       pokazuje ten ekran pomocy i kończy\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Błędy proszę przesyłać na adres <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -x\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -o\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -m\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -O\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -l\n"
+
+#~ msgid "%s: could not read from directory \"%s\": %s\n"
+#~ msgstr "%s: nie można odczytać katalogu \"%s\": %s\n"
+
+#~ msgid "First log file ID after reset:        %u\n"
+#~ msgstr "Pierwszy plik dziennika po resecie:              %u\n"
diff --git a/src/bin/pg_resetwal/po/pt_BR.po b/src/bin/pg_resetwal/po/pt_BR.po
new file mode 100644
index 0000000..ca6e6d4
--- /dev/null
+++ b/src/bin/pg_resetwal/po/pt_BR.po
@@ -0,0 +1,603 @@
+# Brazilian Portuguese message translation file for pg_resetxlog
+# Copyright (C) 2009 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Cesar Suga <sartre@linuxbr.com>, 2002.
+# Roberto Mello <rmello@fslc.usu.edu>, 2002.
+# Euler Taveira de Oliveira <euler@timbira.com>, 2003-2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.5\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-02-13 17:22-0300\n"
+"PO-Revision-Date: 2005-10-04 22:55-0300\n"
+"Last-Translator: Euler Taveira de Oliveira <euler@timbira.com>\n"
+"Language-Team: Brazilian Portuguese <pgbr-dev@listas.postgresql.org.br>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: AVISO: não pode criar informações restritas nessa plataforma\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: não pôde abrir informação sobre processo: código de erro %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: não pôde alocar SIDs: código de erro %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: não pôde criar informação restrita: código de erro %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: não pôde iniciar processo para comando \"%s\": código de erro %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: não pôde executar novamente com informação restrita: código de erro %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: não pôde obter código de saída de subprocesso: código de erro %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: argumento inválido para opção %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Tente \"%s --help\" para obter informações adicionais.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: época do ID da transação (-e) não deve ser -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID da transação (-x) não deve ser 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: ID de transação (-c) deve ser 0 ou maior ou igual a 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) não deve ser 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID de transação múltipla (-m) não deve ser 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID de transação múltipla mais velho (-m) não deve ser 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: deslocamento da transação múltipla (-O) não deve ser -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: muitos argumentos de linha de comando (primeiro é \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: nenhum diretório de dados foi especificado\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: não pode ser executado pelo \"root\"\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Você deve executar %s como um super-usuário do PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: não pôde mudar diretório para \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: não pôde abrir arquivo \"%s\" para leitura: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: arquivo de bloqueio \"%s\" existe\n"
+"O servidor está executando? Se não, apague o arquivo de bloqueio e tente novamente.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Se estes valores lhe parecem aceitáveis, use -f para forçar o reinício.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"O servidor de banco de dados não foi desligado corretamente.\n"
+"Reiniciar o log de transação pode causar perda de dados.\n"
+"Se você quer continuar mesmo assim, use -f para forçar o reinício.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Log de transação reiniciado\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Se você tem certeza que o caminho do diretório de dados está correto, execute\n"
+"  touch %s\n"
+"e tente novamente.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: não pôde ler arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control existe mas tem CRC inválido: prossiga com cuidado\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control existe mas não funciona ou sua versão é desconhecida; ignorando-o\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valores supostos do pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valores atuais do pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "número da versão do pg_control:                    %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Número da versão do catálogo:                      %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Identificador do sistema de banco de dados:        %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineID do último ponto de controle:            %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes do último ponto de controle:      %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "desabilitado"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "habilitado"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgstr "NextXID do último ponto de controle:               %u/%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID do último ponto de controle:               %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId do último ponto de controle:       %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset do último ponto de controle:       %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID do último ponto de controle:             %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "BD do oldestXID do último ponto de controle:       %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID do último ponto de controle:       %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid do último ponto de controle:        %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "BD do oldestMulti do último ponto de controle:     %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid do último ponto de controle:     %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid do último ponto de controle:     %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Máximo alinhamento de dado:                        %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Tamanho do bloco do banco de dados:                %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blocos por segmento da relação grande:             %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Tamanho do bloco do WAL:                           %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Bytes por segmento do WAL:                         %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Tamanho máximo de identificadores:                 %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Máximo de colunas em um índice:                    %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Tamanho máximo do bloco TOAST:                     %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Tamanho do bloco de um objeto grande:              %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Tipo de data/hora do repositório:                  %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "inteiros de 64 bits"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "números de ponto flutuante"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Passagem de argumento float4:                      %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "por referência"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "por valor"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Passagem de argumento float8:                      %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Versão da verificação de páginas de dados:         %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valores a serem alterados:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Primeiro segmento do arquivo de log após reinício: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                                   %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                                    %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "BD do OldestMulti:                                 %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                                   %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                                           %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                                           %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                                         %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "BD do OldestXID:                                   %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "época do NextXID:                                  %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                                 %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                                 %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: erro interno -- sizeof(ControlFileData) é muito grande ... conserte o PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: não pôde criar arquivo do pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: não pôde escrever no arquivo do pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: erro ao executar fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: não pôde abrir diretório \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: não pôde ler diretório \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: não pôde fechar diretório \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: não pôde apagar arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: não pôde abrir arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: não pôde escrever no arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s reinicia o log de transação do PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Uso:\n"
+"  %s [OPÇÃO]... DIRDADOS\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opções:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
+msgstr "  -c XID,XID       define transações mais velha e mais nova contendo timestamp de efetivação\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   (zero em qualquer valor significa nenhuma mudança)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DIRDADOS     diretório de dados\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e ÉPOCA_XID     define próxima época do ID de transação\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               força atualização ser feita\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr "  -l XLOGFILE      força local inicial mínimo do WAL para novo log de transação\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     define próximo e mais velho ID de transação múltipla\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr "  -n               sem atualização, mostra o que seria feito (para teste)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           define próximo OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        define próxima posição de transação múltipla\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    mostra informação sobre a versão e termina\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           define próximo ID de transação\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       mostra essa ajuda e termina\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Relate erros a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/ru.po b/src/bin/pg_resetwal/po/ru.po
new file mode 100644
index 0000000..5a8e12e
--- /dev/null
+++ b/src/bin/pg_resetwal/po/ru.po
@@ -0,0 +1,677 @@
+# PG_RESETXLOG Translated Messages into the Russian Language (UTF-8)
+#
+# Copyright (c) 2002-2005 Serguei A. Mokhov, mokhov@cs.concordia.ca
+# Copyright (c) 2012-2013 Alexander Lakhin, exclusion@gmail.com
+# Distributed under the same licensing terms as PostgreSQL itself.
+#
+# pgtranslation Id: pg_resetxlog.po,v 1.3 2009/10/14 21:08:40 petere Exp $
+#
+# translation of subject-specific terminology, see:
+# перевод некоторых специфичных терминов:
+# http://wiki.postgresql.org/wiki/NLS/ru/dict
+#
+# ChangeLog:
+#   - August 24, 2014: Updates for 9.4. Alexander Lakhin <exclusion@gmail.com>.
+#     - With corrections from Dmitriy Olshevskiy <olshevskiy87@bk.ru>
+#   - March 14, 2013: Updates for 9.3. Alexander Lakhin <exclusion@gmail.com>.
+#   - June 27, 2012: Updates for 9.2. Alexander Lakhin <exclusion@gmail.com>.
+#   - April 2, 2012: Bug fixes. Alexander Lakhin <exclusion@gmail.com>.
+#   - February 18, 2012: Complete translation for 9.1. Alexander Lakhin <exclusion@gmail.com>.
+#   - March 27, 2009: complete translation for 8.3, Sergey Burladyan <eshkinkot@gmail.com>.
+#   - January 17, 2005: Complete translation for 8.0, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+#   - December, 2004: Corrections and improvements by Oleg Bartunov <oleg@sai.msu.su>.
+#   - April 6 - August 11, 2004: Updates for 8.0; <mokhov@cs.concordia.ca>.
+#   - July 24 - August 23, 2003: Updates for 7.4.*; <mokhov@cs.concordia.ca>.
+#   - October 12, 2002: Complete post-7.3beta2 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+#   - September 7, 2002: Complete post-7.3beta1 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+#   - August 31, 2002: Initial Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9 current\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-05-27 16:14+0000\n"
+"PO-Revision-Date: 2015-12-31 14:56+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-translators@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Lokalize 2.0\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ПРЕДУПРЕЖДЕНИЕ: в этой ОС нельзя создавать ограниченные маркеры\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: не удалось открыть маркер процесса (код ошибки: %lu)\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: не удалось подготовить структуры SID (код ошибки: %lu)\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: не удалось создать ограниченный маркер (код ошибки: %lu)\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr ""
+"%s: не удалось запустить процесс для команды \"%s\" (код ошибки: %lu)\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr ""
+"%s: не удалось перезапуститься с ограниченным маркером (код ошибки: %lu)\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: не удалось получить код выхода от подпроцесса (код ошибки: %lu)\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: недопустимый аргумент параметра %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Для дополнительной информации попробуйте \"%s --help\".\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: эпоха ID транзакции (-e) не должна быть равна -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID транзакции (-x) не должен быть равен 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid ""
+"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: ID транзакции (-c) должен быть равен 0, либо больше или равен 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) не должен быть равен 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID мультитранзакции (-m) не должен быть равен 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID старейшей мультитранзакции (-m) не должен быть равен 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: смещение мультитранзакции (-O) не должно быть равно -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: слишком много аргументов командной строки (первый: \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: каталог данных не указан\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: программу не должен запускать root\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Запускать %s нужно от имени суперпользователя PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: не удалось перейти в каталог \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: не удалось открыть файл \"%s\" для чтения: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: обнаружен файл блокировки \"%s\"\n"
+"Возможно, сервер запущен? Если нет, удалите этот файл и попробуйте снова.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Если эти значения приемлемы, выполните сброс принудительно, добавив ключ -"
+"f.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Сервер баз данных был остановлен некорректно.\n"
+"Сброс журнала транзакций может привести к потере данных.\n"
+"Если вы хотите сбросить его, несмотря на это, добавьте ключ -f.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Журнал транзакций сброшен\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Если вы уверены, что путь к каталогу данных правильный, выполните\n"
+"  touch %s\n"
+"и повторите попытку.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: не удалось прочитать файл \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr ""
+"%s: pg_control существует, но его контрольная сумма неверна; продолжайте с "
+"осторожностью\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr ""
+"%s: pg_control испорчен или имеет неизвестную версию; игнорируется...\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Предполагаемые значения pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Текущие значения pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "Номер версии pg_control:              %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Номер версии каталога:                %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Идентификатор системы баз данных:     %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "Линия времени последней конт. точки:  %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Режим full_page_writes последней к.т: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "выкл."
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "вкл."
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "NextXID последней конт. точки:        %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID последней конт. точки:        %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId послед. конт. точки:  %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset послед. конт. точки:  %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID последней конт. точки:      %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "БД с oldestXID последней конт. точки: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID последней к.т.:       %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid последней конт. точки: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "БД с oldestMulti последней к.т.:      %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid последней к. т.:    %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid последней к. т.:    %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Макс. предел выравнивания данных:     %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Размер блока БД:                      %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Блоков в макс. сегменте отношений:    %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Размер блока WAL:                     %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Байт в сегменте WAL:                  %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Максимальная длина идентификаторов:   %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Максимальное число столбцов в индексе: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Максимальный размер порции TOAST:     %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Размер порции большого объекта:       %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Формат хранения даты/времени:         %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-битные целые"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "числа с плавающей точкой"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Передача аргумента Float4:            %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "по ссылке"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "по значению"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Передача аргумента Float8:            %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Версия контрольных сумм страниц:      %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Значения, которые будут изменены:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Первый сегмент журнала после сброса:  %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                      %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                       %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "БД с oldestMultiXid:                  %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                      %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                              %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                              %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                            %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "БД с oldestXID:                       %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "Эпоха NextXID:                        %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid:                    %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid:                    %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: внутренняя ошибка -- размер ControlFileData слишком велик -- исправьте "
+"PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: не удалось создать файл pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: не удалось записать файл pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: ошибка синхронизации с ФС: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: не удалось открыть каталог \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: не удалось прочитать каталог \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: не удалось закрыть каталог \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: ошибка при удалении файла \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: не удалось открыть файл \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: не удалось записать файл \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s сбрасывает журнал транзакций PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Usage:\n"
+"  %s [ПАРАМЕТР]... КАТ_ДАННЫХ\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Параметры:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid ""
+"  -c XID,XID       set oldest and newest transactions bearing commit "
+"timestamp\n"
+msgstr ""
+"  -c XID,XID       задать старейшую и новейшую транзакции, несущие метку "
+"времени фиксации\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   (0 в любом из аргументов игнорируется)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] КАТ_ДАННЫХ   каталог данных\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      задать эпоху в ID следующей транзакции\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               принудительное выполнение операции\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid ""
+"  -l XLOGFILE      force minimum WAL starting location for new transaction "
+"log\n"
+msgstr ""
+"  -l XLOGFILE      задать минимальное начальное положение WAL для нового\n"
+"                   журнала транзакций\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     задать ID следующей и старейшей мультитранзакции\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid ""
+"  -n               no update, just show what would be done (for testing)\n"
+msgstr ""
+"  -n               показать, какие действия будут выполнены, но не выполнять "
+"их\n"
+"                   (для проверки)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           задать следующий OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O СМЕЩЕНИЕ      задать смещение следующей мультитранзакции\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    показать версию и выйти\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           задать ID следующей транзакции\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       показать эту справку и выйти\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Об ошибках сообщайте по адресу <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s: недопустимый аргумент параметра -x\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s: недопустимый аргумент параметра -o\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s: недопустимый аргумент параметра -m\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s: недопустимый аргумент параметра -O\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s: недопустимый аргумент параметра -l\n"
+
+#~ msgid "  -m XID,OLDEST    set next multitransaction ID and oldest value\n"
+#~ msgstr ""
+#~ "  -m XID,СТАРЕЙШАЯ задать ID следующей мультитранзакции и ID старейшей\n"
+
+#~ msgid "disabled"
+#~ msgstr "отключен"
+
+#~ msgid "enabled"
+#~ msgstr "включен"
+
+#~ msgid "First log file ID after reset:        %u\n"
+#~ msgstr "ID первого журнала после сброса:      %u\n"
diff --git a/src/bin/pg_resetwal/po/sv.po b/src/bin/pg_resetwal/po/sv.po
new file mode 100644
index 0000000..528531b
--- /dev/null
+++ b/src/bin/pg_resetwal/po/sv.po
@@ -0,0 +1,550 @@
+# Swedish message translation file for resetxlog.
+# Dennis Björklund <db@zigo.dhs.org>, 2002, 2003, 2004, 2005, 2006.
+# Peter Eisentraut <peter_e@gmx.net>, 2010.
+# Mats Erik Andersson <bsd@gisladisker.se>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.4\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2014-11-25 16:12+0000\n"
+"PO-Revision-Date: 2014-11-29 18:32+0100\n"
+"Last-Translator: Mats Erik Andersson <bsd@gisladisker.se>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: pg_resetxlog.c:130
+#, c-format
+msgid "%s: invalid argument for option -e\n"
+msgstr "%s: Ogiltigt argument för växel -e.\n"
+
+#: pg_resetxlog.c:131 pg_resetxlog.c:146 pg_resetxlog.c:161 pg_resetxlog.c:176
+#: pg_resetxlog.c:184 pg_resetxlog.c:210 pg_resetxlog.c:224 pg_resetxlog.c:231
+#: pg_resetxlog.c:239
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Försök med \"%s --help\" för mer information.\n"
+
+#: pg_resetxlog.c:136
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: Epok (-e) för transaktions-ID får inte vara -1.\n"
+
+#: pg_resetxlog.c:145
+#, c-format
+msgid "%s: invalid argument for option -x\n"
+msgstr "%s: Ogiltigt argument för växel -x.\n"
+
+#: pg_resetxlog.c:151
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: Transaktions-ID (-x) får inte vara 0.\n"
+
+#: pg_resetxlog.c:160
+#, c-format
+msgid "%s: invalid argument for option -o\n"
+msgstr "%s: Ogiltigt argument för växel -o.\n"
+
+#: pg_resetxlog.c:166
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) får inte vara 0.\n"
+
+#: pg_resetxlog.c:175 pg_resetxlog.c:183
+#, c-format
+msgid "%s: invalid argument for option -m\n"
+msgstr "%s: Ogiltigt argument för växel -m.\n"
+
+#: pg_resetxlog.c:189
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: Multitransaktions-ID (-m) får inte vara 0.\n"
+
+#: pg_resetxlog.c:199
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: Äldsta multitransaktions-ID (-m) får inte vara 0.\n"
+
+#: pg_resetxlog.c:209
+#, c-format
+msgid "%s: invalid argument for option -O\n"
+msgstr "%s: Ogiltigt argument för växel -O.\n"
+
+#: pg_resetxlog.c:215
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: Multitransaktionsoffset (-O) får inte vara -1.\n"
+
+#: pg_resetxlog.c:223
+#, c-format
+msgid "%s: invalid argument for option -l\n"
+msgstr "%s: Ogiltigt argument för växel -l.\n"
+
+#: pg_resetxlog.c:238
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: Ingen datakatalog angiven.\n"
+
+#: pg_resetxlog.c:252
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: Får inte utföras av \"root\".\n"
+
+#: pg_resetxlog.c:254
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Du måste köra %s som PostgreSQL:s superanvändare.\n"
+
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: Kunde inte gå till katalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:277 pg_resetxlog.c:418
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: Kunde inte öppna filen \"%s\" för läsning: %s\n"
+
+#: pg_resetxlog.c:284
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: En låsfil \"%s\" finns på plats.\n"
+"Kör servern redan? Om inte, radera låsfilen och försök igen.\n"
+
+#: pg_resetxlog.c:366
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Om dessa värden verkar godtagbara, använd då -f för att\n"
+"framtvinga återställning.\n"
+
+#: pg_resetxlog.c:378
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Databasservern stängdes inte av ordentligt. Att återställa\n"
+"transaktionsloggen kan medföra att data förloras. Om du ändå\n"
+"vill fortsätta, använd -f för att framtvinga återställning.\n"
+
+#: pg_resetxlog.c:392
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Återställning av transaktionslogg.\n"
+
+#: pg_resetxlog.c:421
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"Om du är säker på att sökvägen till datakatalogen är riktig,\n"
+"utför då \"touch %s\" och försök sedan igen.\n"
+
+#: pg_resetxlog.c:434
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: Kunde inte läsa fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:457
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control existerar men har ogiltig CRC. Fortsätt med varsamhet.\n"
+
+#: pg_resetxlog.c:466
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control existerar men är trasig eller har okänd version. Den ignoreras.\n"
+
+#: pg_resetxlog.c:568
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Gissade värden för pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:570
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Nuvarande värden för pg_control:\n"
+"\n"
+
+# November 26th, 2014: Insert six additional space characters
+# for best alignment with Swedish translation.
+# Translations should be checked against those of pg_controldata.
+#: pg_resetxlog.c:579
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "Versionsnummer för pg_control:              %u\n"
+
+#: pg_resetxlog.c:581
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Katalogversion:                             %u\n"
+
+#: pg_resetxlog.c:583
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "Databasens systemidentifierare:             %s\n"
+
+#: pg_resetxlog.c:585
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "TimeLineID vid senaste kontrollpunkt:       %u\n"
+
+#: pg_resetxlog.c:587
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Senaste kontrollpunktens full_page_writes:  %s\n"
+
+#: pg_resetxlog.c:588
+msgid "off"
+msgstr "av"
+
+#: pg_resetxlog.c:588
+msgid "on"
+msgstr "på"
+
+#: pg_resetxlog.c:589
+#, c-format
+msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgstr "NextXID vid senaste kontrollpunkt:          %u/%u\n"
+
+#: pg_resetxlog.c:592
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "NextOID vid senaste kontrollpunkt:          %u\n"
+
+#: pg_resetxlog.c:594
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "NextMultiXactId vid senaste kontrollpunkt:  %u\n"
+
+#: pg_resetxlog.c:596
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "NextMultiOffset vid senaste kontrollpunkt:  %u\n"
+
+#: pg_resetxlog.c:598
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "oldestXID vid senaste kontrollpunkt:        %u\n"
+
+#: pg_resetxlog.c:600
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "DB för oldestXID vid senaste kontrollpunkt: %u\n"
+
+# FIXME: too wide
+#: pg_resetxlog.c:602
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "oldestActiveXID vid senaste kontrollpunkt:  %u\n"
+
+#: pg_resetxlog.c:604
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "oldestMultiXid vid senaste kontrollpunkt:   %u\n"
+
+#: pg_resetxlog.c:606
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB för oldestMulti vid senaste kontrollpkt: %u\n"
+
+#: pg_resetxlog.c:608
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "Maximal jämkning av data (alignment):       %u\n"
+
+#: pg_resetxlog.c:611
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "Databasens blockstorlek:                    %u\n"
+
+#: pg_resetxlog.c:613
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Block per segment i en stor relation:       %u\n"
+
+#: pg_resetxlog.c:615
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "Blockstorlek i transaktionsloggen:          %u\n"
+
+#: pg_resetxlog.c:617
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "Segmentstorlek i transaktionsloggen:        %u\n"
+
+#: pg_resetxlog.c:619
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "Maximal längd för identifierare:            %u\n"
+
+#: pg_resetxlog.c:621
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "Maximalt antal kolonner i ett index:        %u\n"
+
+#: pg_resetxlog.c:623
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "Maximal storlek för en TOAST-enhet:         %u\n"
+
+#: pg_resetxlog.c:625
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "Storlek för large-object-enheter:           %u\n"
+
+#: pg_resetxlog.c:627
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "Representation av dag och tid:              %s\n"
+
+#: pg_resetxlog.c:628
+msgid "64-bit integers"
+msgstr "64-bitars heltal"
+
+#: pg_resetxlog.c:628
+msgid "floating-point numbers"
+msgstr "flyttal"
+
+#: pg_resetxlog.c:629
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "Åtkomst till float4-argument:               %s\n"
+
+#: pg_resetxlog.c:630 pg_resetxlog.c:632
+msgid "by reference"
+msgstr "referens"
+
+#: pg_resetxlog.c:630 pg_resetxlog.c:632
+msgid "by value"
+msgstr "värdeåtkomst"
+
+#: pg_resetxlog.c:631
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "Åtkomst till float8-argument:               %s\n"
+
+#: pg_resetxlog.c:633
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "Checksummaversion för datasidor:            %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Värden att förändra:\n"
+"\n"
+
+# November 26th, 2014: Insert additional spacing to fit
+# with the first translated text, which uses most characters.
+#: pg_resetxlog.c:650
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "Första loggsegment efter återställning: %s\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "NextMultiXactId:                        %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "OldestMultiXid:                         %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "DB för OldestMulti:                     %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "NextMultiOffset:                        %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                                %u\n"
+
+#: pg_resetxlog.c:676
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                                %u\n"
+
+#: pg_resetxlog.c:678
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                              %u\n"
+
+#: pg_resetxlog.c:680
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "DB för OldestXID:                       %u\n"
+
+#: pg_resetxlog.c:686
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "Epok för NextXID:                       %u\n"
+
+
+#: pg_resetxlog.c:751
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: Internt fel: sizeof(ControlFileData) är alltför stor. Rätta till PG_CONTROL_SIZE.\n"
+
+#: pg_resetxlog.c:766
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: Kunde inte skapa fil för pg_control: %s\n"
+
+#: pg_resetxlog.c:777
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: Kunde inte skriva fil för pg_control: %s\n"
+
+#: pg_resetxlog.c:784 pg_resetxlog.c:1068
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: Misslyckad fsync: %s\n"
+
+#: pg_resetxlog.c:824 pg_resetxlog.c:890 pg_resetxlog.c:941
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: Kunde inte öppna filkatalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:855 pg_resetxlog.c:912 pg_resetxlog.c:964
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: Kunde inte läsa filkatalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:862 pg_resetxlog.c:919 pg_resetxlog.c:971
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: Kunde inte stänga filkatalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:903 pg_resetxlog.c:955
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: Kunde inte radera fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:1035
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: Kunde inte öppna fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:1046 pg_resetxlog.c:1060
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: Kunde inte skriva fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:1079
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s återställer transaktionslogg för PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1080
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Användning:\n"
+"  %s [FLAGGA]... DATAKATALOG\n"
+"\n"
+
+#: pg_resetxlog.c:1081
+#, c-format
+msgid "Options:\n"
+msgstr "Programväxlar:\n"
+
+#: pg_resetxlog.c:1082
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      sätter epok för nästa transaktions-ID\n"
+
+#: pg_resetxlog.c:1083
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               framtvinga återställning\n"
+
+#: pg_resetxlog.c:1084
+#, c-format
+msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
+msgstr "  -l XLOGFIL       ny transaktionslogg måste vara detta namn eller ett senare\n"
+
+#: pg_resetxlog.c:1085
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID     sätt nästa och äldsta multitransaktions-ID\n"
+
+#: pg_resetxlog.c:1086
+#, c-format
+msgid "  -n               no update, just show what would be done (for testing)\n"
+msgstr "  -n               ingen updatering; visa planerade åtgärder (för testning)\n"
+
+#: pg_resetxlog.c:1087
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           sätt nästa OID\n"
+
+#: pg_resetxlog.c:1088
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        sätt nästa multitransaktionsoffset\n"
+
+#: pg_resetxlog.c:1089
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    visa versionsinformation, avsluta sedan\n"
+
+#: pg_resetxlog.c:1090
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           sätt nästa transaktions-ID\n"
+
+#: pg_resetxlog.c:1091
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       visa denna hjälp, avsluta sedan\n"
+
+#: pg_resetxlog.c:1092
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Reportera fel till <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/zh_CN.po b/src/bin/pg_resetwal/po/zh_CN.po
new file mode 100644
index 0000000..c199ac9
--- /dev/null
+++ b/src/bin/pg_resetwal/po/zh_CN.po
@@ -0,0 +1,661 @@
+# simplified Chinese translation file for pg_resetxlog and friends
+# Bao Wei <weibao@forevertek.com>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL 9.0)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-18 04:44+0000\n"
+"PO-Revision-Date: 2016-05-19 20:41+0800\n"
+"Last-Translator: Yuwei Peng <ywpeng@whu.edu.cn>\n"
+"Language-Team: Chinese (Simplified) <ywpeng@whu.edu.cn>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: WARNING: 无法为该平台创建受限制的令牌\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s:无法打开进程令牌 (token): 错误码 %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: 无法分配SID: 错误码 %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: 无法创建受限令牌: 错误码为 %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: 无法为命令 \"%s\"创建进程: 错误码 %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: 无法使用受限令牌再次执行: 错误码 %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: 无法从子进程得到退出码: 错误码 %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s:：选项%s的参数无效\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "输入 \"%s --help\" 获取更多的信息.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: 事务ID epoch(-e) 不能为 -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: 事务 ID (-x) 不能为 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid ""
+"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s：事务ID (-c) 必须是0或者大于等于2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) 不能为 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s:  多事务 ID (-m) 不能为 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s:  最老的多事务 ID (-m) 不能为 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: 多事务 偏移 (-O) 不能为-1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: 命令行参数太多 (第一个是 \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: 没有指定数据目录\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s:不能由\"root\"执行\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "您现在作为PostgreSQL超级用户运行%s.\n"
+
+# command.c:256
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: 无法切换目录至 \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: 无法打开文件 \"%s\" 读取信息: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running?  If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: 锁文件 \"%s\" 已经存在\n"
+"是否有一个服务正在运行? 如果没有, 删除那个锁文件然后再试一次.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"如果这些值可接受, 用 -f 强制重置.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"数据库服务器没有彻底关闭.\n"
+"重置事务日志有可能会引起丢失数据.\n"
+"如果你仍想继续, 用 -f 强制重置.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "事务日志重置\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+"  touch %s\n"
+"and try again.\n"
+msgstr ""
+"如果你确定数据目录路径是正确的, 运行\n"
+"  touch %s\n"
+"然后再试一次.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: 无法读取文件 \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control 已经存在, 但有无效的CRC; 带有警告的继续运行\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control 已经存在, 但已破坏或无效版本; 忽略它\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"猜测的 pg_control 值:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"当前的 pg_control 值:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number:            %u\n"
+msgstr "pg_control 版本:                      %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number:               %u\n"
+msgstr "Catalog 版本:                         %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier:           %s\n"
+msgstr "数据库系统标识符:                     %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID:       %u\n"
+msgstr "最新检查点的 TimeLineID:              %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "最新检查点的full_page_writes: %s\n"
+
+# help.c:48
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "关闭"
+
+# help.c:48
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "开启"
+
+#: pg_resetxlog.c:649
+#, c-format
+#| msgid "Latest checkpoint's NextXID:          %u/%u\n"
+msgid "Latest checkpoint's NextXID:          %u:%u\n"
+msgstr "最新检查点的NextXID:          %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID:          %u\n"
+msgstr "最新检查点的 NextOID:                 %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId:  %u\n"
+msgstr "最新检查点的 NextMultiXactId:         %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset:  %u\n"
+msgstr "最新检查点的 NextMultiOffset:          %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID:        %u\n"
+msgstr "最新检查点的oldestXID:             %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB:   %u\n"
+msgstr "最新检查点的oldestXID所在的数据库: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID:  %u\n"
+msgstr "最新检查点的oldestActiveXID:      %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid:   %u\n"
+msgstr "最新检查点的oldestMultiXid:   %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "最新检查点的oldestMulti所在的数据库: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+#| msgid "Latest checkpoint's oldestCommitTs:   %u\n"
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "最新检查点的oldestCommitTsXid:%u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+#| msgid "Latest checkpoint's newestCommitTs:   %u\n"
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "最新检查点的newestCommitTsXid:%u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment:               %u\n"
+msgstr "最大的数据校准:                     %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size:                  %u\n"
+msgstr "数据库块大小:                         %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "大关系的每段块数:                     %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size:                       %u\n"
+msgstr "WAL块大小:                         %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment:                %u\n"
+msgstr "每一个 WAL 段字节数:                  %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers:        %u\n"
+msgstr "标示符的最大长度:                     %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index:          %u\n"
+msgstr "在索引中最多可用的列数:                   %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk:        %u\n"
+msgstr "一个TOAST区块的最大空间:                   %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk:         %u\n"
+msgstr "一个大对象区块的大小:     %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage:               %s\n"
+msgstr "日期/时间类型存储:                    %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64位整型"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "浮点数"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing:              %s\n"
+msgstr "正在传递Float4类型的参数:                    %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "由引用"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "由值"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing:              %s\n"
+msgstr "正在传递Float8类型的参数:                    %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version:           %u\n"
+msgstr "数据页检验和版本:        %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"将被改变的值:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset:        %s\n"
+msgstr "重置后的第一个日志段:        %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId:                      %u\n"
+msgstr "下一个MultiXactId值NextMultiXactId:         %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid:                       %u\n"
+msgstr "最老的MultiXid值OldestMultiXid:          %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB:                     %u\n"
+msgstr "最老的MultiXid对应的DB:     %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset:                      %u\n"
+msgstr "下一个偏移NextMultiOffset:           %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID:                              %u\n"
+msgstr "NextOID:                             %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID:                              %u\n"
+msgstr "NextXID:                              %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID:                            %u\n"
+msgstr "OldestXID:                            %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB:                       %u\n"
+msgstr "OldestXID's DB:                       %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch:                        %u\n"
+msgstr "NextXID 末端:                        %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+#| msgid "oldestCommitTs:                       %u\n"
+msgid "oldestCommitTsXid:                    %u\n"
+msgstr "oldestCommitTsXid：          %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+#| msgid "newestCommitTs:                       %u\n"
+msgid "newestCommitTsXid:                    %u\n"
+msgstr "newestCommitTsXid：          %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr "%s: 内部错误 -- sizeof(ControlFileData) 太大 ... 修复 xlog.c\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: 无法创建 pg_control 文件: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: 无法写 pg_control 文件: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync 错误: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: 无法打开目录 \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: 无法读取目录 \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: 无法关闭目录 \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: 无法删除文件 \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: 无法打开文件 \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: 无法写文件 \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s 重置 PostgreSQL 事务日志.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+"  %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"使用方法:\n"
+"  %s [选项]... 数据目录\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "选项:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid ""
+"  -c XID,XID       set oldest and newest transactions bearing commit "
+"timestamp\n"
+msgstr "  -c XID,XID       设置承受提交时间戳的最旧和最新事务\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid "                   (zero in either value means no change)\n"
+msgstr "                   （任一值中的零表示没有改变）\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR      data directory\n"
+msgstr " [-D] DATADIR      数据目录\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
+msgstr "  -e XIDEPOCH      设置下一个事务ID时间单元（epoch）\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid "  -f               force update to be done\n"
+msgstr "  -f               强制更新\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid ""
+"  -l XLOGFILE      force minimum WAL starting location for new transaction "
+"log\n"
+msgstr "  -l XLOGFILE      为新的事务日志强制使用最小WAL日志起始位置\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
+msgstr "  -m MXID,MXID    　设置下一个事务和最老的事务ID\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid ""
+"  -n               no update, just show what would be done (for testing)\n"
+msgstr "  -n               未更新, 只显示将要做什么 (测试用途)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid "  -o OID           set next OID\n"
+msgstr "  -o OID           设置下一个 OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid "  -O OFFSET        set next multitransaction offset\n"
+msgstr "  -O OFFSET        设置下一个多事务（multitransaction）偏移\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid "  -V, --version    output version information, then exit\n"
+msgstr "  -V, --version    输出版本信息，然后退出\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid "  -x XID           set next transaction ID\n"
+msgstr "  -x XID           设置下一个事务 ID\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid "  -?, --help       show this help, then exit\n"
+msgstr "  -?, --help       显示帮助信息，然后退出\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"报告错误至 <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s: 为 -x 选项的无效参数\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s: 为 -o 选项的无效参数\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s: 对于选项-m 参数无效\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s: 对于选项-O 参数无效\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s: 为 -l 选项的无效参数\n"
+
+#~ msgid "First log file ID after reset:        %u\n"
+#~ msgstr "重置后的第一个日志文件ID:               %u\n"
+
+#~ msgid "%s: invalid argument for -o option\n"
+#~ msgstr "%s: 为 -o 选项的无效参数\n"
+
+#~ msgid "%s: invalid argument for -x option\n"
+#~ msgstr "%s: 为 -x 选项的无效参数\n"
+
+#~ msgid "Latest checkpoint's StartUpID:        %u\n"
+#~ msgstr "最新检查点的 StartUpID:               %u\n"
+
+#~ msgid "Maximum number of function arguments: %u\n"
+#~ msgstr "函数参数的最大个数:                   %u\n"
+
+#~ msgid "%s: invalid LC_CTYPE setting\n"
+#~ msgstr "%s: 无效的 LC_CTYPE 设置\n"
+
+#~ msgid "%s: invalid LC_COLLATE setting\n"
+#~ msgstr "%s: 无效的 LC_COLLATE 设置\n"
+
+#~ msgid "  --version       output version information, then exit\n"
+#~ msgstr "  --version         输出版本信息, 然后退出\n"
+
+#~ msgid "  --help          show this help, then exit\n"
+#~ msgstr "  --help            显示此帮助信息, 然后退出\n"
+
+#~ msgid "%s: could not read from directory \"%s\": %s\n"
+#~ msgstr "%s: 无法从目录 \"%s\" 中读取: %s\n"
diff --git a/src/bin/pg_resetxlog/.gitignore b/src/bin/pg_resetxlog/.gitignore
deleted file mode 100644
index 6b84208..0000000
--- a/src/bin/pg_resetxlog/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/pg_resetxlog
diff --git a/src/bin/pg_resetxlog/Makefile b/src/bin/pg_resetxlog/Makefile
deleted file mode 100644
index e048924..0000000
--- a/src/bin/pg_resetxlog/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile for src/bin/pg_resetxlog
-#
-# Copyright (c) 1998-2017, PostgreSQL Global Development Group
-#
-# src/bin/pg_resetxlog/Makefile
-#
-#-------------------------------------------------------------------------
-
-PGFILEDESC = "pg_resetxlog - reset PostgreSQL WAL log"
-PGAPPICON=win32
-
-subdir = src/bin/pg_resetxlog
-top_builddir = ../../..
-include $(top_builddir)/src/Makefile.global
-
-OBJS= pg_resetxlog.o $(WIN32RES)
-
-all: pg_resetxlog
-
-pg_resetxlog: $(OBJS) | submake-libpgport
-	$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
-
-install: all installdirs
-	$(INSTALL_PROGRAM) pg_resetxlog$(X) '$(DESTDIR)$(bindir)/pg_resetxlog$(X)'
-
-installdirs:
-	$(MKDIR_P) '$(DESTDIR)$(bindir)'
-
-uninstall:
-	rm -f '$(DESTDIR)$(bindir)/pg_resetxlog$(X)'
-
-clean distclean maintainer-clean:
-	rm -f pg_resetxlog$(X) $(OBJS)
diff --git a/src/bin/pg_resetxlog/nls.mk b/src/bin/pg_resetxlog/nls.mk
deleted file mode 100644
index ce18674..0000000
--- a/src/bin/pg_resetxlog/nls.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-# src/bin/pg_resetxlog/nls.mk
-CATALOG_NAME     = pg_resetxlog
-AVAIL_LANGUAGES  = cs de es fr it ja ko pl pt_BR ru sv zh_CN
-GETTEXT_FILES    = pg_resetxlog.c ../../common/restricted_token.c
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
deleted file mode 100644
index 963802e..0000000
--- a/src/bin/pg_resetxlog/pg_resetxlog.c
+++ /dev/null
@@ -1,1184 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_resetxlog.c
- *	  A utility to "zero out" the xlog when it's corrupt beyond recovery.
- *	  Can also rebuild pg_control if needed.
- *
- * The theory of operation is fairly simple:
- *	  1. Read the existing pg_control (which will include the last
- *		 checkpoint record).  If it is an old format then update to
- *		 current format.
- *	  2. If pg_control is corrupt, attempt to intuit reasonable values,
- *		 by scanning the old xlog if necessary.
- *	  3. Modify pg_control to reflect a "shutdown" state with a checkpoint
- *		 record at the start of xlog.
- *	  4. Flush the existing xlog files and write a new segment with
- *		 just a checkpoint record in it.  The new segment is positioned
- *		 just past the end of the old xlog, so that existing LSNs in
- *		 data pages will appear to be "in the past".
- * This is all pretty straightforward except for the intuition part of
- * step 2 ...
- *
- *
- * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/bin/pg_resetxlog/pg_resetxlog.c
- *
- *-------------------------------------------------------------------------
- */
-
-/*
- * We have to use postgres.h not postgres_fe.h here, because there's so much
- * backend-only stuff in the XLOG include files we need.  But we need a
- * frontend-ish environment otherwise.  Hence this ugly hack.
- */
-#define FRONTEND 1
-
-#include "postgres.h"
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <locale.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
-
-#include "access/transam.h"
-#include "access/tuptoaster.h"
-#include "access/multixact.h"
-#include "access/xlog.h"
-#include "access/xlog_internal.h"
-#include "catalog/catversion.h"
-#include "catalog/pg_control.h"
-#include "common/fe_memutils.h"
-#include "common/restricted_token.h"
-#include "storage/large_object.h"
-#include "pg_getopt.h"
-
-
-static ControlFileData ControlFile;		/* pg_control values */
-static XLogSegNo newXlogSegNo;	/* new XLOG segment # */
-static bool guessed = false;	/* T if we had to guess at any values */
-static const char *progname;
-static uint32 set_xid_epoch = (uint32) -1;
-static TransactionId set_xid = 0;
-static TransactionId set_oldest_commit_ts_xid = 0;
-static TransactionId set_newest_commit_ts_xid = 0;
-static Oid	set_oid = 0;
-static MultiXactId set_mxid = 0;
-static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
-static uint32 minXlogTli = 0;
-static XLogSegNo minXlogSegNo = 0;
-
-static bool ReadControlFile(void);
-static void GuessControlValues(void);
-static void PrintControlValues(bool guessed);
-static void PrintNewControlValues(void);
-static void RewriteControlFile(void);
-static void FindEndOfXLOG(void);
-static void KillExistingXLOG(void);
-static void KillExistingArchiveStatus(void);
-static void WriteEmptyXLOG(void);
-static void usage(void);
-
-
-int
-main(int argc, char *argv[])
-{
-	int			c;
-	bool		force = false;
-	bool		noupdate = false;
-	MultiXactId set_oldestmxid = 0;
-	char	   *endptr;
-	char	   *endptr2;
-	char	   *DataDir = NULL;
-	int			fd;
-
-	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_resetxlog"));
-
-	progname = get_progname(argv[0]);
-
-	if (argc > 1)
-	{
-		if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
-		{
-			usage();
-			exit(0);
-		}
-		if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
-		{
-			puts("pg_resetxlog (PostgreSQL) " PG_VERSION);
-			exit(0);
-		}
-	}
-
-
-	while ((c = getopt(argc, argv, "c:D:e:fl:m:no:O:x:")) != -1)
-	{
-		switch (c)
-		{
-			case 'D':
-				DataDir = optarg;
-				break;
-
-			case 'f':
-				force = true;
-				break;
-
-			case 'n':
-				noupdate = true;
-				break;
-
-			case 'e':
-				set_xid_epoch = strtoul(optarg, &endptr, 0);
-				if (endptr == optarg || *endptr != '\0')
-				{
-					/*------
-					  translator: the second %s is a command line argument (-e, etc) */
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-e");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				if (set_xid_epoch == -1)
-				{
-					fprintf(stderr, _("%s: transaction ID epoch (-e) must not be -1\n"), progname);
-					exit(1);
-				}
-				break;
-
-			case 'x':
-				set_xid = strtoul(optarg, &endptr, 0);
-				if (endptr == optarg || *endptr != '\0')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-x");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				if (set_xid == 0)
-				{
-					fprintf(stderr, _("%s: transaction ID (-x) must not be 0\n"), progname);
-					exit(1);
-				}
-				break;
-
-			case 'c':
-				set_oldest_commit_ts_xid = strtoul(optarg, &endptr, 0);
-				if (endptr == optarg || *endptr != ',')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				set_newest_commit_ts_xid = strtoul(endptr + 1, &endptr2, 0);
-				if (endptr2 == endptr + 1 || *endptr2 != '\0')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-
-				if (set_oldest_commit_ts_xid < 2 &&
-					set_oldest_commit_ts_xid != 0)
-				{
-					fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
-					exit(1);
-				}
-
-				if (set_newest_commit_ts_xid < 2 &&
-					set_newest_commit_ts_xid != 0)
-				{
-					fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
-					exit(1);
-				}
-				break;
-
-			case 'o':
-				set_oid = strtoul(optarg, &endptr, 0);
-				if (endptr == optarg || *endptr != '\0')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-o");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				if (set_oid == 0)
-				{
-					fprintf(stderr, _("%s: OID (-o) must not be 0\n"), progname);
-					exit(1);
-				}
-				break;
-
-			case 'm':
-				set_mxid = strtoul(optarg, &endptr, 0);
-				if (endptr == optarg || *endptr != ',')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-
-				set_oldestmxid = strtoul(endptr + 1, &endptr2, 0);
-				if (endptr2 == endptr + 1 || *endptr2 != '\0')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				if (set_mxid == 0)
-				{
-					fprintf(stderr, _("%s: multitransaction ID (-m) must not be 0\n"), progname);
-					exit(1);
-				}
-
-				/*
-				 * XXX It'd be nice to have more sanity checks here, e.g. so
-				 * that oldest is not wrapped around w.r.t. nextMulti.
-				 */
-				if (set_oldestmxid == 0)
-				{
-					fprintf(stderr, _("%s: oldest multitransaction ID (-m) must not be 0\n"),
-							progname);
-					exit(1);
-				}
-				break;
-
-			case 'O':
-				set_mxoff = strtoul(optarg, &endptr, 0);
-				if (endptr == optarg || *endptr != '\0')
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-O");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				if (set_mxoff == -1)
-				{
-					fprintf(stderr, _("%s: multitransaction offset (-O) must not be -1\n"), progname);
-					exit(1);
-				}
-				break;
-
-			case 'l':
-				if (strspn(optarg, "01234567890ABCDEFabcdef") != XLOG_FNAME_LEN)
-				{
-					fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-l");
-					fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-					exit(1);
-				}
-				XLogFromFileName(optarg, &minXlogTli, &minXlogSegNo);
-				break;
-
-			default:
-				fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-				exit(1);
-		}
-	}
-
-	if (DataDir == NULL && optind < argc)
-		DataDir = argv[optind++];
-
-	/* Complain if any arguments remain */
-	if (optind < argc)
-	{
-		fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
-				progname, argv[optind]);
-		fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
-				progname);
-		exit(1);
-	}
-
-	if (DataDir == NULL)
-	{
-		fprintf(stderr, _("%s: no data directory specified\n"), progname);
-		fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-		exit(1);
-	}
-
-	/*
-	 * Don't allow pg_resetxlog to be run as root, to avoid overwriting the
-	 * ownership of files in the data directory. We need only check for root
-	 * -- any other user won't have sufficient permissions to modify files in
-	 * the data directory.
-	 */
-#ifndef WIN32
-	if (geteuid() == 0)
-	{
-		fprintf(stderr, _("%s: cannot be executed by \"root\"\n"),
-				progname);
-		fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"),
-				progname);
-		exit(1);
-	}
-#endif
-
-	get_restricted_token(progname);
-
-	if (chdir(DataDir) < 0)
-	{
-		fprintf(stderr, _("%s: could not change directory to \"%s\": %s\n"),
-				progname, DataDir, strerror(errno));
-		exit(1);
-	}
-
-	/*
-	 * Check for a postmaster lock file --- if there is one, refuse to
-	 * proceed, on grounds we might be interfering with a live installation.
-	 */
-	if ((fd = open("postmaster.pid", O_RDONLY, 0)) < 0)
-	{
-		if (errno != ENOENT)
-		{
-			fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
-					progname, "postmaster.pid", strerror(errno));
-			exit(1);
-		}
-	}
-	else
-	{
-		fprintf(stderr, _("%s: lock file \"%s\" exists\n"
-						  "Is a server running?  If not, delete the lock file and try again.\n"),
-				progname, "postmaster.pid");
-		exit(1);
-	}
-
-	/*
-	 * Attempt to read the existing pg_control file
-	 */
-	if (!ReadControlFile())
-		GuessControlValues();
-
-	/*
-	 * Also look at existing segment files to set up newXlogSegNo
-	 */
-	FindEndOfXLOG();
-
-	/*
-	 * If we're not going to proceed with the reset, print the current control
-	 * file parameters.
-	 */
-	if ((guessed && !force) || noupdate)
-		PrintControlValues(guessed);
-
-	/*
-	 * Adjust fields if required by switches.  (Do this now so that printout,
-	 * if any, includes these values.)
-	 */
-	if (set_xid_epoch != -1)
-		ControlFile.checkPointCopy.nextXidEpoch = set_xid_epoch;
-
-	if (set_xid != 0)
-	{
-		ControlFile.checkPointCopy.nextXid = set_xid;
-
-		/*
-		 * For the moment, just set oldestXid to a value that will force
-		 * immediate autovacuum-for-wraparound.  It's not clear whether adding
-		 * user control of this is useful, so let's just do something that's
-		 * reasonably safe.  The magic constant here corresponds to the
-		 * maximum allowed value of autovacuum_freeze_max_age.
-		 */
-		ControlFile.checkPointCopy.oldestXid = set_xid - 2000000000;
-		if (ControlFile.checkPointCopy.oldestXid < FirstNormalTransactionId)
-			ControlFile.checkPointCopy.oldestXid += FirstNormalTransactionId;
-		ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
-	}
-
-	if (set_oldest_commit_ts_xid != 0)
-		ControlFile.checkPointCopy.oldestCommitTsXid = set_oldest_commit_ts_xid;
-	if (set_newest_commit_ts_xid != 0)
-		ControlFile.checkPointCopy.newestCommitTsXid = set_newest_commit_ts_xid;
-
-	if (set_oid != 0)
-		ControlFile.checkPointCopy.nextOid = set_oid;
-
-	if (set_mxid != 0)
-	{
-		ControlFile.checkPointCopy.nextMulti = set_mxid;
-
-		ControlFile.checkPointCopy.oldestMulti = set_oldestmxid;
-		if (ControlFile.checkPointCopy.oldestMulti < FirstMultiXactId)
-			ControlFile.checkPointCopy.oldestMulti += FirstMultiXactId;
-		ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
-	}
-
-	if (set_mxoff != -1)
-		ControlFile.checkPointCopy.nextMultiOffset = set_mxoff;
-
-	if (minXlogTli > ControlFile.checkPointCopy.ThisTimeLineID)
-	{
-		ControlFile.checkPointCopy.ThisTimeLineID = minXlogTli;
-		ControlFile.checkPointCopy.PrevTimeLineID = minXlogTli;
-	}
-
-	if (minXlogSegNo > newXlogSegNo)
-		newXlogSegNo = minXlogSegNo;
-
-	/*
-	 * If we had to guess anything, and -f was not given, just print the
-	 * guessed values and exit.  Also print if -n is given.
-	 */
-	if ((guessed && !force) || noupdate)
-	{
-		PrintNewControlValues();
-		if (!noupdate)
-		{
-			printf(_("\nIf these values seem acceptable, use -f to force reset.\n"));
-			exit(1);
-		}
-		else
-			exit(0);
-	}
-
-	/*
-	 * Don't reset from a dirty pg_control without -f, either.
-	 */
-	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"
-				 "If you want to proceed anyway, use -f to force reset.\n"));
-		exit(1);
-	}
-
-	/*
-	 * Else, do the dirty deed.
-	 */
-	RewriteControlFile();
-	KillExistingXLOG();
-	KillExistingArchiveStatus();
-	WriteEmptyXLOG();
-
-	printf(_("Transaction log reset\n"));
-	return 0;
-}
-
-
-/*
- * Try to read the existing pg_control file.
- *
- * This routine is also responsible for updating old pg_control versions
- * to the current format.  (Currently we don't do anything of the sort.)
- */
-static bool
-ReadControlFile(void)
-{
-	int			fd;
-	int			len;
-	char	   *buffer;
-	pg_crc32c	crc;
-
-	if ((fd = open(XLOG_CONTROL_FILE, O_RDONLY | PG_BINARY, 0)) < 0)
-	{
-		/*
-		 * If pg_control is not there at all, or we can't read it, the odds
-		 * are we've been handed a bad DataDir path, so give up. User can do
-		 * "touch pg_control" to force us to proceed.
-		 */
-		fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
-				progname, XLOG_CONTROL_FILE, strerror(errno));
-		if (errno == ENOENT)
-			fprintf(stderr, _("If you are sure the data directory path is correct, execute\n"
-							  "  touch %s\n"
-							  "and try again.\n"),
-					XLOG_CONTROL_FILE);
-		exit(1);
-	}
-
-	/* Use malloc to ensure we have a maxaligned buffer */
-	buffer = (char *) pg_malloc(PG_CONTROL_SIZE);
-
-	len = read(fd, buffer, PG_CONTROL_SIZE);
-	if (len < 0)
-	{
-		fprintf(stderr, _("%s: could not read file \"%s\": %s\n"),
-				progname, XLOG_CONTROL_FILE, strerror(errno));
-		exit(1);
-	}
-	close(fd);
-
-	if (len >= sizeof(ControlFileData) &&
-	  ((ControlFileData *) buffer)->pg_control_version == PG_CONTROL_VERSION)
-	{
-		/* Check the CRC. */
-		INIT_CRC32C(crc);
-		COMP_CRC32C(crc,
-					buffer,
-					offsetof(ControlFileData, crc));
-		FIN_CRC32C(crc);
-
-		if (EQ_CRC32C(crc, ((ControlFileData *) buffer)->crc))
-		{
-			/* Valid data... */
-			memcpy(&ControlFile, buffer, sizeof(ControlFile));
-			return true;
-		}
-
-		fprintf(stderr, _("%s: pg_control exists but has invalid CRC; proceed with caution\n"),
-				progname);
-		/* We will use the data anyway, but treat it as guessed. */
-		memcpy(&ControlFile, buffer, sizeof(ControlFile));
-		guessed = true;
-		return true;
-	}
-
-	/* Looks like it's a mess. */
-	fprintf(stderr, _("%s: pg_control exists but is broken or unknown version; ignoring it\n"),
-			progname);
-	return false;
-}
-
-
-/*
- * Guess at pg_control values when we can't read the old ones.
- */
-static void
-GuessControlValues(void)
-{
-	uint64		sysidentifier;
-	struct timeval tv;
-
-	/*
-	 * Set up a completely default set of pg_control values.
-	 */
-	guessed = true;
-	memset(&ControlFile, 0, sizeof(ControlFile));
-
-	ControlFile.pg_control_version = PG_CONTROL_VERSION;
-	ControlFile.catalog_version_no = CATALOG_VERSION_NO;
-
-	/*
-	 * Create a new unique installation identifier, since we can no longer use
-	 * any old XLOG records.  See notes in xlog.c about the algorithm.
-	 */
-	gettimeofday(&tv, NULL);
-	sysidentifier = ((uint64) tv.tv_sec) << 32;
-	sysidentifier |= ((uint64) tv.tv_usec) << 12;
-	sysidentifier |= getpid() & 0xFFF;
-
-	ControlFile.system_identifier = sysidentifier;
-
-	ControlFile.checkPointCopy.redo = SizeOfXLogLongPHD;
-	ControlFile.checkPointCopy.ThisTimeLineID = 1;
-	ControlFile.checkPointCopy.PrevTimeLineID = 1;
-	ControlFile.checkPointCopy.fullPageWrites = false;
-	ControlFile.checkPointCopy.nextXidEpoch = 0;
-	ControlFile.checkPointCopy.nextXid = FirstNormalTransactionId;
-	ControlFile.checkPointCopy.nextOid = FirstBootstrapObjectId;
-	ControlFile.checkPointCopy.nextMulti = FirstMultiXactId;
-	ControlFile.checkPointCopy.nextMultiOffset = 0;
-	ControlFile.checkPointCopy.oldestXid = FirstNormalTransactionId;
-	ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
-	ControlFile.checkPointCopy.oldestMulti = FirstMultiXactId;
-	ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
-	ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
-	ControlFile.checkPointCopy.oldestActiveXid = InvalidTransactionId;
-
-	ControlFile.state = DB_SHUTDOWNED;
-	ControlFile.time = (pg_time_t) time(NULL);
-	ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
-	ControlFile.unloggedLSN = 1;
-
-	/* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */
-
-	ControlFile.wal_level = WAL_LEVEL_MINIMAL;
-	ControlFile.wal_log_hints = false;
-	ControlFile.track_commit_timestamp = false;
-	ControlFile.MaxConnections = 100;
-	ControlFile.max_worker_processes = 8;
-	ControlFile.max_prepared_xacts = 0;
-	ControlFile.max_locks_per_xact = 64;
-
-	ControlFile.maxAlign = MAXIMUM_ALIGNOF;
-	ControlFile.floatFormat = FLOATFORMAT_VALUE;
-	ControlFile.blcksz = BLCKSZ;
-	ControlFile.relseg_size = RELSEG_SIZE;
-	ControlFile.xlog_blcksz = XLOG_BLCKSZ;
-	ControlFile.xlog_seg_size = XLOG_SEG_SIZE;
-	ControlFile.nameDataLen = NAMEDATALEN;
-	ControlFile.indexMaxKeys = INDEX_MAX_KEYS;
-	ControlFile.toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE;
-	ControlFile.loblksize = LOBLKSIZE;
-#ifdef HAVE_INT64_TIMESTAMP
-	ControlFile.enableIntTimes = true;
-#else
-	ControlFile.enableIntTimes = false;
-#endif
-	ControlFile.float4ByVal = FLOAT4PASSBYVAL;
-	ControlFile.float8ByVal = FLOAT8PASSBYVAL;
-
-	/*
-	 * XXX eventually, should try to grovel through old XLOG to develop more
-	 * accurate values for TimeLineID, nextXID, etc.
-	 */
-}
-
-
-/*
- * Print the guessed pg_control values when we had to guess.
- *
- * NB: this display should be just those fields that will not be
- * reset by RewriteControlFile().
- */
-static void
-PrintControlValues(bool guessed)
-{
-	char		sysident_str[32];
-
-	if (guessed)
-		printf(_("Guessed pg_control values:\n\n"));
-	else
-		printf(_("Current pg_control values:\n\n"));
-
-	/*
-	 * Format system_identifier separately to keep platform-dependent format
-	 * code out of the translatable message string.
-	 */
-	snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
-			 ControlFile.system_identifier);
-
-	printf(_("pg_control version number:            %u\n"),
-		   ControlFile.pg_control_version);
-	printf(_("Catalog version number:               %u\n"),
-		   ControlFile.catalog_version_no);
-	printf(_("Database system identifier:           %s\n"),
-		   sysident_str);
-	printf(_("Latest checkpoint's TimeLineID:       %u\n"),
-		   ControlFile.checkPointCopy.ThisTimeLineID);
-	printf(_("Latest checkpoint's full_page_writes: %s\n"),
-		   ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
-	printf(_("Latest checkpoint's NextXID:          %u:%u\n"),
-		   ControlFile.checkPointCopy.nextXidEpoch,
-		   ControlFile.checkPointCopy.nextXid);
-	printf(_("Latest checkpoint's NextOID:          %u\n"),
-		   ControlFile.checkPointCopy.nextOid);
-	printf(_("Latest checkpoint's NextMultiXactId:  %u\n"),
-		   ControlFile.checkPointCopy.nextMulti);
-	printf(_("Latest checkpoint's NextMultiOffset:  %u\n"),
-		   ControlFile.checkPointCopy.nextMultiOffset);
-	printf(_("Latest checkpoint's oldestXID:        %u\n"),
-		   ControlFile.checkPointCopy.oldestXid);
-	printf(_("Latest checkpoint's oldestXID's DB:   %u\n"),
-		   ControlFile.checkPointCopy.oldestXidDB);
-	printf(_("Latest checkpoint's oldestActiveXID:  %u\n"),
-		   ControlFile.checkPointCopy.oldestActiveXid);
-	printf(_("Latest checkpoint's oldestMultiXid:   %u\n"),
-		   ControlFile.checkPointCopy.oldestMulti);
-	printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
-		   ControlFile.checkPointCopy.oldestMultiDB);
-	printf(_("Latest checkpoint's oldestCommitTsXid:%u\n"),
-		   ControlFile.checkPointCopy.oldestCommitTsXid);
-	printf(_("Latest checkpoint's newestCommitTsXid:%u\n"),
-		   ControlFile.checkPointCopy.newestCommitTsXid);
-	printf(_("Maximum data alignment:               %u\n"),
-		   ControlFile.maxAlign);
-	/* we don't print floatFormat since can't say much useful about it */
-	printf(_("Database block size:                  %u\n"),
-		   ControlFile.blcksz);
-	printf(_("Blocks per segment of large relation: %u\n"),
-		   ControlFile.relseg_size);
-	printf(_("WAL block size:                       %u\n"),
-		   ControlFile.xlog_blcksz);
-	printf(_("Bytes per WAL segment:                %u\n"),
-		   ControlFile.xlog_seg_size);
-	printf(_("Maximum length of identifiers:        %u\n"),
-		   ControlFile.nameDataLen);
-	printf(_("Maximum columns in an index:          %u\n"),
-		   ControlFile.indexMaxKeys);
-	printf(_("Maximum size of a TOAST chunk:        %u\n"),
-		   ControlFile.toast_max_chunk_size);
-	printf(_("Size of a large-object chunk:         %u\n"),
-		   ControlFile.loblksize);
-	printf(_("Date/time type storage:               %s\n"),
-		   (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
-	printf(_("Float4 argument passing:              %s\n"),
-		   (ControlFile.float4ByVal ? _("by value") : _("by reference")));
-	printf(_("Float8 argument passing:              %s\n"),
-		   (ControlFile.float8ByVal ? _("by value") : _("by reference")));
-	printf(_("Data page checksum version:           %u\n"),
-		   ControlFile.data_checksum_version);
-}
-
-
-/*
- * Print the values to be changed.
- */
-static void
-PrintNewControlValues(void)
-{
-	char		fname[MAXFNAMELEN];
-
-	/* This will be always printed in order to keep format same. */
-	printf(_("\n\nValues to be changed:\n\n"));
-
-	XLogFileName(fname, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
-	printf(_("First log segment after reset:        %s\n"), fname);
-
-	if (set_mxid != 0)
-	{
-		printf(_("NextMultiXactId:                      %u\n"),
-			   ControlFile.checkPointCopy.nextMulti);
-		printf(_("OldestMultiXid:                       %u\n"),
-			   ControlFile.checkPointCopy.oldestMulti);
-		printf(_("OldestMulti's DB:                     %u\n"),
-			   ControlFile.checkPointCopy.oldestMultiDB);
-	}
-
-	if (set_mxoff != -1)
-	{
-		printf(_("NextMultiOffset:                      %u\n"),
-			   ControlFile.checkPointCopy.nextMultiOffset);
-	}
-
-	if (set_oid != 0)
-	{
-		printf(_("NextOID:                              %u\n"),
-			   ControlFile.checkPointCopy.nextOid);
-	}
-
-	if (set_xid != 0)
-	{
-		printf(_("NextXID:                              %u\n"),
-			   ControlFile.checkPointCopy.nextXid);
-		printf(_("OldestXID:                            %u\n"),
-			   ControlFile.checkPointCopy.oldestXid);
-		printf(_("OldestXID's DB:                       %u\n"),
-			   ControlFile.checkPointCopy.oldestXidDB);
-	}
-
-	if (set_xid_epoch != -1)
-	{
-		printf(_("NextXID epoch:                        %u\n"),
-			   ControlFile.checkPointCopy.nextXidEpoch);
-	}
-
-	if (set_oldest_commit_ts_xid != 0)
-	{
-		printf(_("oldestCommitTsXid:                    %u\n"),
-			   ControlFile.checkPointCopy.oldestCommitTsXid);
-	}
-	if (set_newest_commit_ts_xid != 0)
-	{
-		printf(_("newestCommitTsXid:                    %u\n"),
-			   ControlFile.checkPointCopy.newestCommitTsXid);
-	}
-}
-
-
-/*
- * Write out the new pg_control file.
- */
-static void
-RewriteControlFile(void)
-{
-	int			fd;
-	char		buffer[PG_CONTROL_SIZE];		/* need not be aligned */
-
-	/*
-	 * Adjust fields as needed to force an empty XLOG starting at
-	 * newXlogSegNo.
-	 */
-	XLogSegNoOffsetToRecPtr(newXlogSegNo, SizeOfXLogLongPHD,
-							ControlFile.checkPointCopy.redo);
-	ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
-
-	ControlFile.state = DB_SHUTDOWNED;
-	ControlFile.time = (pg_time_t) time(NULL);
-	ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
-	ControlFile.prevCheckPoint = 0;
-	ControlFile.minRecoveryPoint = 0;
-	ControlFile.minRecoveryPointTLI = 0;
-	ControlFile.backupStartPoint = 0;
-	ControlFile.backupEndPoint = 0;
-	ControlFile.backupEndRequired = false;
-
-	/*
-	 * Force the defaults for max_* settings. The values don't really matter
-	 * as long as wal_level='minimal'; the postmaster will reset these fields
-	 * anyway at startup.
-	 */
-	ControlFile.wal_level = WAL_LEVEL_MINIMAL;
-	ControlFile.wal_log_hints = false;
-	ControlFile.track_commit_timestamp = false;
-	ControlFile.MaxConnections = 100;
-	ControlFile.max_worker_processes = 8;
-	ControlFile.max_prepared_xacts = 0;
-	ControlFile.max_locks_per_xact = 64;
-
-	/* Now we can force the recorded xlog seg size to the right thing. */
-	ControlFile.xlog_seg_size = XLogSegSize;
-
-	/* Contents are protected with a CRC */
-	INIT_CRC32C(ControlFile.crc);
-	COMP_CRC32C(ControlFile.crc,
-				(char *) &ControlFile,
-				offsetof(ControlFileData, crc));
-	FIN_CRC32C(ControlFile.crc);
-
-	/*
-	 * We write out PG_CONTROL_SIZE bytes into pg_control, zero-padding the
-	 * excess over sizeof(ControlFileData).  This reduces the odds of
-	 * premature-EOF errors when reading pg_control.  We'll still fail when we
-	 * check the contents of the file, but hopefully with a more specific
-	 * error than "couldn't read pg_control".
-	 */
-	if (sizeof(ControlFileData) > PG_CONTROL_SIZE)
-	{
-		fprintf(stderr,
-				_("%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"),
-				progname);
-		exit(1);
-	}
-
-	memset(buffer, 0, PG_CONTROL_SIZE);
-	memcpy(buffer, &ControlFile, sizeof(ControlFileData));
-
-	unlink(XLOG_CONTROL_FILE);
-
-	fd = open(XLOG_CONTROL_FILE,
-			  O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
-			  S_IRUSR | S_IWUSR);
-	if (fd < 0)
-	{
-		fprintf(stderr, _("%s: could not create pg_control file: %s\n"),
-				progname, strerror(errno));
-		exit(1);
-	}
-
-	errno = 0;
-	if (write(fd, buffer, PG_CONTROL_SIZE) != PG_CONTROL_SIZE)
-	{
-		/* if write didn't set errno, assume problem is no disk space */
-		if (errno == 0)
-			errno = ENOSPC;
-		fprintf(stderr, _("%s: could not write pg_control file: %s\n"),
-				progname, strerror(errno));
-		exit(1);
-	}
-
-	if (fsync(fd) != 0)
-	{
-		fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
-		exit(1);
-	}
-
-	close(fd);
-}
-
-
-/*
- * Scan existing XLOG files and determine the highest existing WAL address
- *
- * On entry, ControlFile.checkPointCopy.redo and ControlFile.xlog_seg_size
- * are assumed valid (note that we allow the old xlog seg size to differ
- * from what we're using).  On exit, newXlogId and newXlogSeg are set to
- * suitable values for the beginning of replacement WAL (in our seg size).
- */
-static void
-FindEndOfXLOG(void)
-{
-	DIR		   *xldir;
-	struct dirent *xlde;
-	uint64		segs_per_xlogid;
-	uint64		xlogbytepos;
-
-	/*
-	 * Initialize the max() computation using the last checkpoint address from
-	 * old pg_control.  Note that for the moment we are working with segment
-	 * numbering according to the old xlog seg size.
-	 */
-	segs_per_xlogid = (UINT64CONST(0x0000000100000000) / ControlFile.xlog_seg_size);
-	newXlogSegNo = ControlFile.checkPointCopy.redo / ControlFile.xlog_seg_size;
-
-	/*
-	 * Scan the pg_wal directory to find existing WAL segment files. We
-	 * assume any present have been used; in most scenarios this should be
-	 * conservative, because of xlog.c's attempts to pre-create files.
-	 */
-	xldir = opendir(XLOGDIR);
-	if (xldir == NULL)
-	{
-		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
-				progname, XLOGDIR, strerror(errno));
-		exit(1);
-	}
-
-	while (errno = 0, (xlde = readdir(xldir)) != NULL)
-	{
-		if (IsXLogFileName(xlde->d_name) ||
-			IsPartialXLogFileName(xlde->d_name))
-		{
-			unsigned int tli,
-						log,
-						seg;
-			XLogSegNo	segno;
-
-			/*
-			 * Note: We don't use XLogFromFileName here, because we want to
-			 * use the segment size from the control file, not the size the
-			 * pg_resetxlog binary was compiled with
-			 */
-			sscanf(xlde->d_name, "%08X%08X%08X", &tli, &log, &seg);
-			segno = ((uint64) log) * segs_per_xlogid + seg;
-
-			/*
-			 * Note: we take the max of all files found, regardless of their
-			 * timelines.  Another possibility would be to ignore files of
-			 * timelines other than the target TLI, but this seems safer.
-			 * Better too large a result than too small...
-			 */
-			if (segno > newXlogSegNo)
-				newXlogSegNo = segno;
-		}
-	}
-
-	if (errno)
-	{
-		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
-				progname, XLOGDIR, strerror(errno));
-		exit(1);
-	}
-
-	if (closedir(xldir))
-	{
-		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
-				progname, XLOGDIR, strerror(errno));
-		exit(1);
-	}
-
-	/*
-	 * Finally, convert to new xlog seg size, and advance by one to ensure we
-	 * are in virgin territory.
-	 */
-	xlogbytepos = newXlogSegNo * ControlFile.xlog_seg_size;
-	newXlogSegNo = (xlogbytepos + XLogSegSize - 1) / XLogSegSize;
-	newXlogSegNo++;
-}
-
-
-/*
- * Remove existing XLOG files
- */
-static void
-KillExistingXLOG(void)
-{
-	DIR		   *xldir;
-	struct dirent *xlde;
-	char		path[MAXPGPATH];
-
-	xldir = opendir(XLOGDIR);
-	if (xldir == NULL)
-	{
-		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
-				progname, XLOGDIR, strerror(errno));
-		exit(1);
-	}
-
-	while (errno = 0, (xlde = readdir(xldir)) != NULL)
-	{
-		if (IsXLogFileName(xlde->d_name) ||
-			IsPartialXLogFileName(xlde->d_name))
-		{
-			snprintf(path, MAXPGPATH, "%s/%s", XLOGDIR, xlde->d_name);
-			if (unlink(path) < 0)
-			{
-				fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
-						progname, path, strerror(errno));
-				exit(1);
-			}
-		}
-	}
-
-	if (errno)
-	{
-		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
-				progname, XLOGDIR, strerror(errno));
-		exit(1);
-	}
-
-	if (closedir(xldir))
-	{
-		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
-				progname, XLOGDIR, strerror(errno));
-		exit(1);
-	}
-}
-
-
-/*
- * Remove existing archive status files
- */
-static void
-KillExistingArchiveStatus(void)
-{
-	DIR		   *xldir;
-	struct dirent *xlde;
-	char		path[MAXPGPATH];
-
-#define ARCHSTATDIR XLOGDIR "/archive_status"
-
-	xldir = opendir(ARCHSTATDIR);
-	if (xldir == NULL)
-	{
-		fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
-				progname, ARCHSTATDIR, strerror(errno));
-		exit(1);
-	}
-
-	while (errno = 0, (xlde = readdir(xldir)) != NULL)
-	{
-		if (strspn(xlde->d_name, "0123456789ABCDEF") == XLOG_FNAME_LEN &&
-			(strcmp(xlde->d_name + XLOG_FNAME_LEN, ".ready") == 0 ||
-			 strcmp(xlde->d_name + XLOG_FNAME_LEN, ".done") == 0 ||
-			 strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.ready") == 0 ||
-			 strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.done") == 0))
-		{
-			snprintf(path, MAXPGPATH, "%s/%s", ARCHSTATDIR, xlde->d_name);
-			if (unlink(path) < 0)
-			{
-				fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
-						progname, path, strerror(errno));
-				exit(1);
-			}
-		}
-	}
-
-	if (errno)
-	{
-		fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
-				progname, ARCHSTATDIR, strerror(errno));
-		exit(1);
-	}
-
-	if (closedir(xldir))
-	{
-		fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
-				progname, ARCHSTATDIR, strerror(errno));
-		exit(1);
-	}
-}
-
-
-/*
- * Write an empty XLOG file, containing only the checkpoint record
- * already set up in ControlFile.
- */
-static void
-WriteEmptyXLOG(void)
-{
-	char	   *buffer;
-	XLogPageHeader page;
-	XLogLongPageHeader longpage;
-	XLogRecord *record;
-	pg_crc32c	crc;
-	char		path[MAXPGPATH];
-	int			fd;
-	int			nbytes;
-	char	   *recptr;
-
-	/* Use malloc() to ensure buffer is MAXALIGNED */
-	buffer = (char *) pg_malloc(XLOG_BLCKSZ);
-	page = (XLogPageHeader) buffer;
-	memset(buffer, 0, XLOG_BLCKSZ);
-
-	/* Set up the XLOG page header */
-	page->xlp_magic = XLOG_PAGE_MAGIC;
-	page->xlp_info = XLP_LONG_HEADER;
-	page->xlp_tli = ControlFile.checkPointCopy.ThisTimeLineID;
-	page->xlp_pageaddr = ControlFile.checkPointCopy.redo - SizeOfXLogLongPHD;
-	longpage = (XLogLongPageHeader) page;
-	longpage->xlp_sysid = ControlFile.system_identifier;
-	longpage->xlp_seg_size = XLogSegSize;
-	longpage->xlp_xlog_blcksz = XLOG_BLCKSZ;
-
-	/* Insert the initial checkpoint record */
-	recptr = (char *) page + SizeOfXLogLongPHD;
-	record = (XLogRecord *) recptr;
-	record->xl_prev = 0;
-	record->xl_xid = InvalidTransactionId;
-	record->xl_tot_len = SizeOfXLogRecord + SizeOfXLogRecordDataHeaderShort + sizeof(CheckPoint);
-	record->xl_info = XLOG_CHECKPOINT_SHUTDOWN;
-	record->xl_rmid = RM_XLOG_ID;
-
-	recptr += SizeOfXLogRecord;
-	*(recptr++) = XLR_BLOCK_ID_DATA_SHORT;
-	*(recptr++) = sizeof(CheckPoint);
-	memcpy(recptr, &ControlFile.checkPointCopy,
-		   sizeof(CheckPoint));
-
-	INIT_CRC32C(crc);
-	COMP_CRC32C(crc, ((char *) record) + SizeOfXLogRecord, record->xl_tot_len - SizeOfXLogRecord);
-	COMP_CRC32C(crc, (char *) record, offsetof(XLogRecord, xl_crc));
-	FIN_CRC32C(crc);
-	record->xl_crc = crc;
-
-	/* Write the first page */
-	XLogFilePath(path, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
-
-	unlink(path);
-
-	fd = open(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
-			  S_IRUSR | S_IWUSR);
-	if (fd < 0)
-	{
-		fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
-				progname, path, strerror(errno));
-		exit(1);
-	}
-
-	errno = 0;
-	if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
-	{
-		/* if write didn't set errno, assume problem is no disk space */
-		if (errno == 0)
-			errno = ENOSPC;
-		fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
-				progname, path, strerror(errno));
-		exit(1);
-	}
-
-	/* Fill the rest of the file with zeroes */
-	memset(buffer, 0, XLOG_BLCKSZ);
-	for (nbytes = XLOG_BLCKSZ; nbytes < XLogSegSize; nbytes += XLOG_BLCKSZ)
-	{
-		errno = 0;
-		if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
-		{
-			if (errno == 0)
-				errno = ENOSPC;
-			fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
-					progname, path, strerror(errno));
-			exit(1);
-		}
-	}
-
-	if (fsync(fd) != 0)
-	{
-		fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
-		exit(1);
-	}
-
-	close(fd);
-}
-
-
-static void
-usage(void)
-{
-	printf(_("%s resets the PostgreSQL transaction 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"));
-	printf(_("                   (zero in either value means no change)\n"));
-	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(_("  -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"));
-	printf(_("  -O OFFSET        set next multitransaction offset\n"));
-	printf(_("  -V, --version    output version information, then exit\n"));
-	printf(_("  -x XID           set next transaction ID\n"));
-	printf(_("  -?, --help       show this help, then exit\n"));
-	printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
-}
diff --git a/src/bin/pg_resetxlog/po/cs.po b/src/bin/pg_resetxlog/po/cs.po
deleted file mode 100644
index 52ddcac..0000000
--- a/src/bin/pg_resetxlog/po/cs.po
+++ /dev/null
@@ -1,498 +0,0 @@
-# Czech message translation file for pg_resetxlog
-# Copyright (C) 2012 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-#
-# Tomas Vondra <tv@fuzzy.cz>, 2012, 2013.
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog-cs (PostgreSQL 9.3)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2013-09-23 20:18+0000\n"
-"PO-Revision-Date: 2013-12-01 20:46-0500\n"
-"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
-"Language-Team: Czech <info@cspug.cx>\n"
-"Language: cs\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Lokalize 1.5\n"
-
-#: pg_resetxlog.c:133
-#, c-format
-msgid "%s: invalid argument for option -e\n"
-msgstr "%s: neplatný argument pro volbu -e\n"
-
-#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
-#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
-#: pg_resetxlog.c:242
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Zkuste \"%s --help\" pro více informací.\n"
-
-#: pg_resetxlog.c:139
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: epocha ID transakce (-e) nesmí být -1\n"
-
-#: pg_resetxlog.c:148
-#, c-format
-msgid "%s: invalid argument for option -x\n"
-msgstr "%s: neplatný argument pro volbu -x\n"
-
-#: pg_resetxlog.c:154
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID transakce (-x) nesmí být 0\n"
-
-#: pg_resetxlog.c:163
-#, c-format
-msgid "%s: invalid argument for option -o\n"
-msgstr "%s: neplatný argument pro volbu -o\n"
-
-#: pg_resetxlog.c:169
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) nesmí být 0\n"
-
-#: pg_resetxlog.c:178 pg_resetxlog.c:186
-#, c-format
-msgid "%s: invalid argument for option -m\n"
-msgstr "%s: neplatný argument pro volbu -m\n"
-
-#: pg_resetxlog.c:192
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID transakce (-m) nesmí být 0\n"
-
-#: pg_resetxlog.c:202
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID nejstarší multitransakce (-m) nesmí být 0\n"
-
-#: pg_resetxlog.c:212
-#, c-format
-msgid "%s: invalid argument for option -O\n"
-msgstr "%s: neplatný argument pro volbu -O\n"
-
-#: pg_resetxlog.c:218
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: ID transakce (-O) nesmí být -1\n"
-
-#: pg_resetxlog.c:226
-#, c-format
-msgid "%s: invalid argument for option -l\n"
-msgstr "%s: neplatný argument pro volbu -l\n"
-
-#: pg_resetxlog.c:241
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: není specifikován datový adresář\n"
-
-#: pg_resetxlog.c:255
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: nemůže být spuštěn uživatelem \"root\"\n"
-
-#: pg_resetxlog.c:257
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Musíte spustit %s jako PostgreSQL superuživatel.\n"
-
-#: pg_resetxlog.c:267
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: nelze změnit adresář na \"%s\": %s\n"
-
-#: pg_resetxlog.c:280 pg_resetxlog.c:414
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: nelze otevřít soubor \"%s\" pro čtení: %s\n"
-
-#: pg_resetxlog.c:287
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: soubor se zámkem \"%s\" existuje\n"
-"Neběží již server?  Jestliže ne, smažte soubor se zámkem a zkuste to znova.\n"
-
-#: pg_resetxlog.c:362
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Jestliže tyto hodnoty vypadají akceptovatelně, použijte -f pro vynucený "
-"reset.\n"
-
-#: pg_resetxlog.c:374
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Databázový server nebyl ukončen standardně.\n"
-"Resetování transakčního logu může způsobit ztrátu dat.\n"
-"Jestliže i přesto chcete pokračovat, použijte -f pro vynucený reset.\n"
-
-#: pg_resetxlog.c:388
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Transakční log resetován\n"
-
-#: pg_resetxlog.c:417
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Máte-li jistotu, že je cesta k datovému adresáři správná, proveďte\n"
-"  touch %s\n"
-"a zkuste to znovu.\n"
-
-#: pg_resetxlog.c:430
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: nelze číst soubor \"%s\": %s\n"
-
-#: pg_resetxlog.c:453
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr ""
-"%s: pg_control existuje, ale s neplatným kontrolním součtem CRC; postupujte "
-"opatrně\n"
-
-#: pg_resetxlog.c:462
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr ""
-"%s: pg_control existuje, ale je poškozen nebo neznámé verze; ignoruji to\n"
-
-#: pg_resetxlog.c:561
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Odhadnuté hodnoty pg_controlu:\n"
-"\n"
-
-#: pg_resetxlog.c:563
-#, c-format
-msgid ""
-"pg_control values:\n"
-"\n"
-msgstr ""
-"Hodnoty pg_controlu:\n"
-"\n"
-
-#: pg_resetxlog.c:574
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "První log segment po resetu:  %s\n"
-
-#: pg_resetxlog.c:576
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "číslo verze pg_controlu:              %u\n"
-
-#: pg_resetxlog.c:578
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Číslo verze katalogu:               %u\n"
-
-#: pg_resetxlog.c:580
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Identifikátor databázového systému:   %s\n"
-
-#: pg_resetxlog.c:582
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineID posledního checkpointu:     %u\n"
-
-#: pg_resetxlog.c:584
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Poslední full_page_writes checkpointu:       %s\n"
-
-#: pg_resetxlog.c:585
-msgid "off"
-msgstr "vypnuto"
-
-#: pg_resetxlog.c:585
-msgid "on"
-msgstr "zapnuto"
-
-#: pg_resetxlog.c:586
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgstr "Poslední umístění NextXID checkpointu:          %u/%u\n"
-
-#: pg_resetxlog.c:589
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "Poslední umístění NextOID checkpointu:          %u\n"
-
-#: pg_resetxlog.c:591
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId posledního checkpointu:          %u\n"
-
-#: pg_resetxlog.c:593
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset posledního checkpointu:          %u\n"
-
-#: pg_resetxlog.c:595
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID posledního checkpointu:          %u\n"
-
-#: pg_resetxlog.c:597
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "DB k oldestXID posledního checkpointu:   %u\n"
-
-#: pg_resetxlog.c:599
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID posledního checkpointu:          %u\n"
-
-#: pg_resetxlog.c:601
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid posledního checkpointu:   %u\n"
-
-#: pg_resetxlog.c:603
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "oldestMulti's DB posledního checkpointu: %u\n"
-
-#: pg_resetxlog.c:605
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Maximální zarovnání dat:              %u\n"
-
-#: pg_resetxlog.c:608
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Velikost databázového bloku:                  %u\n"
-
-#: pg_resetxlog.c:610
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Bloků v segmentu velké relace: %u\n"
-
-#: pg_resetxlog.c:612
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Velikost WAL bloku:                   %u\n"
-
-#: pg_resetxlog.c:614
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Bytů ve WAL segmentu:                  %u\n"
-
-#: pg_resetxlog.c:616
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Maximální délka identifikátorů:        %u\n"
-
-#: pg_resetxlog.c:618
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Maximální počet sloupců v indexu:     %u\n"
-
-#: pg_resetxlog.c:620
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Maximální velikost úseku TOAST:       %u\n"
-
-#: pg_resetxlog.c:622
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Způsob uložení typu date/time:               %s\n"
-
-#: pg_resetxlog.c:623
-msgid "64-bit integers"
-msgstr "64-bitová čísla"
-
-#: pg_resetxlog.c:623
-msgid "floating-point numbers"
-msgstr "čísla s plovoucí řádovou čárkou"
-
-#: pg_resetxlog.c:624
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Způsob předávání float4 hodnot:        %s\n"
-
-#: pg_resetxlog.c:625 pg_resetxlog.c:627
-msgid "by reference"
-msgstr "odkazem"
-
-#: pg_resetxlog.c:625 pg_resetxlog.c:627
-msgid "by value"
-msgstr "hodnotou"
-
-#: pg_resetxlog.c:626
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Způsob předávání float8 hodnot:        %s\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-#| msgid "Catalog version number:               %u\n"
-msgid "Data page checksum version:           %u\n"
-msgstr "Verze kontrolních součtů datových stránek:           %u\n"
-
-#: pg_resetxlog.c:690
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: interní chyba -- sizeof(ControlFileData) je příliš velký ... opravte "
-"PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:705
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: nelze vytvořit pg_control soubor: %s\n"
-
-#: pg_resetxlog.c:716
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: nelze zapsat pg_control soubor: %s\n"
-
-#: pg_resetxlog.c:723 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync chyba: %s\n"
-
-#: pg_resetxlog.c:763 pg_resetxlog.c:834 pg_resetxlog.c:890
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: nelze otevřít adresář \"%s\": %s\n"
-
-#: pg_resetxlog.c:805 pg_resetxlog.c:867 pg_resetxlog.c:924
-#, c-format
-msgid "%s: could not read from directory \"%s\": %s\n"
-msgstr "%s: nelze číst z adresáře \"%s\": %s\n"
-
-#: pg_resetxlog.c:848 pg_resetxlog.c:905
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: nelze smazat soubor \"%s\": %s\n"
-
-#: pg_resetxlog.c:989
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: nelze otevřít soubor \"%s\": %s\n"
-
-#: pg_resetxlog.c:1000 pg_resetxlog.c:1014
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: nelze zapsat do souboru \"%s\": %s\n"
-
-#: pg_resetxlog.c:1033
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s resetuje PostgreSQL transakční log.\n"
-"\n"
-
-#: pg_resetxlog.c:1034
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Použití:\n"
-"  %s [VOLBA]... ADRESÁŘ\n"
-"\n"
-
-#: pg_resetxlog.c:1035
-#, c-format
-msgid "Options:\n"
-msgstr "Přepínače:\n"
-
-#: pg_resetxlog.c:1036
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      nastaví epochu následujícího ID transakce\n"
-
-#: pg_resetxlog.c:1037
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f              vynutí provedení update\n"
-
-#: pg_resetxlog.c:1038
-#, c-format
-msgid ""
-"  -l XLOGFILE      force minimum WAL starting location for new transaction "
-"log\n"
-msgstr ""
-"  -l XLOGFILE      vynutí minimální počáteční WAL pozici pro nový transakční "
-"log\n"
-
-#: pg_resetxlog.c:1039
-#, c-format
-#| msgid "  -x XID           set next transaction ID\n"
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     nastav další a nejstarší ID multitransakce\n"
-
-#: pg_resetxlog.c:1040
-#, c-format
-msgid ""
-"  -n               no update, just show extracted control values (for "
-"testing)\n"
-msgstr ""
-"  -n              bez změny, jen ukáže získané kontrolní hodnoty (pro "
-"testování)\n"
-
-#: pg_resetxlog.c:1041
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID          nastaví následující OID\n"
-
-#: pg_resetxlog.c:1042
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET       nastaví offset následující multitransakce\n"
-
-#: pg_resetxlog.c:1043
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    ukáže informace o verzi a skončí\n"
-
-#: pg_resetxlog.c:1044
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID          nastaví ID následující transakce\n"
-
-#: pg_resetxlog.c:1045
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       ukáže tuto nápovědu a skončí\n"
-
-#: pg_resetxlog.c:1046
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "First log file ID after reset:        %u\n"
-#~ msgstr "První ID log souboru po resetu:       %u\n"
diff --git a/src/bin/pg_resetxlog/po/de.po b/src/bin/pg_resetxlog/po/de.po
deleted file mode 100644
index fb6324d..0000000
--- a/src/bin/pg_resetxlog/po/de.po
+++ /dev/null
@@ -1,605 +0,0 @@
-# German message translation file for pg_resetxlog
-# Peter Eisentraut <peter_e@gmx.net>, 2002 - 2016.
-#
-# Use these quotes: »%s«
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.6\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-04-12 20:14+0000\n"
-"PO-Revision-Date: 2016-04-12 18:28-0400\n"
-"Last-Translator: Peter Eisentraut <peter_e@gmx.net>\n"
-"Language-Team: German <peter_e@gmx.net>\n"
-"Language: de\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: WARNUNG: auf dieser Plattform können keine beschränkten Token erzeugt werden\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: konnte Prozess-Token nicht öffnen: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: konnte SIDs nicht erzeugen: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: konnte beschränktes Token nicht erzeugen: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: konnte Prozess für Befehl »%s« nicht starten: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: konnte Prozess nicht mit beschränktem Token neu starten: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: konnte Statuscode des Subprozesses nicht ermitteln: Fehlercode %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: ungültiges Argument für Option %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: Transaktions-ID-Epoche (-e) darf nicht -1 sein\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: Transaktions-ID (-x) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: Transaktions-ID (-c) muss entweder 0 oder größer oder gleich 2 sein\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: Multitransaktions-ID (-m) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: älteste Multitransaktions-ID (-m) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: Multitransaktions-Offset (-O) darf nicht -1 sein\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: zu viele Kommandozeilenargumente (das erste ist »%s«)\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: kein Datenverzeichnis angegeben\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: kann nicht von »root« ausgeführt werden\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Sie müssen %s als PostgreSQL-Superuser ausführen.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: konnte nicht in Verzeichnis »%s« wechseln: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: konnte Datei »%s« nicht zum Lesen öffnen: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: Sperrdatei »%s« existiert bereits\n"
-"Läuft der Server?  Wenn nicht, dann Sperrdatei löschen und nochmal versuchen.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Wenn diese Werte akzeptabel scheinen, dann benutzen Sie -f um das\n"
-"Zurücksetzen zu erzwingen.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Der Datenbankserver wurde nicht sauber heruntergefahren.\n"
-"Beim Zurücksetzen des Transaktionslogs können Daten verloren gehen.\n"
-"Wenn Sie trotzdem weiter machen wollen, benutzen Sie -f, um das\n"
-"Zurücksetzen zu erzwingen.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Transaktionslog wurde zurück gesetzt\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Wenn Sie sicher sind, dass das Datenverzeichnis korrekt ist, führen Sie\n"
-"  touch %s\n"
-"aus und versuchen Sie es erneut.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: konnte Datei »%s« nicht lesen: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control existiert, aber mit ungültiger CRC; mit Vorsicht fortfahren\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control existiert, aber ist kaputt oder hat unbekannte Version; wird ignoriert\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Geschätzte pg_control-Werte:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Aktuelle pg_control-Werte:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "pg_control-Versionsnummer:                   %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Katalogversionsnummer:                       %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Datenbanksystemidentifikation:               %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineID des letzten Checkpoints:          %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes des letzten Checkpoints:    %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "aus"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "an"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "NextXID des letzten Checkpoints:             %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID des letzten Checkpoints:             %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId des letzten Checkpoints:     %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset des letzten Checkpoints:     %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID des letzten Checkpoints:           %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "DB der oldestXID des letzten Checkpoints:    %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID des letzten Checkpoints:     %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid des letzten Checkpoints:      %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB des oldestMulti des letzten Checkpoints:  %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid des letzten Checkpoints:   %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid des letzten Checkpoints:   %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Maximale Datenausrichtung (Alignment):       %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Datenbankblockgröße:                         %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blöcke pro Segment:                          %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "WAL-Blockgröße:                              %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Bytes pro WAL-Segment:                       %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Maximale Bezeichnerlänge:                    %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Maximale Spalten in einem Index:             %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Maximale Größe eines Stücks TOAST:           %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Größe eines Large-Object-Chunks:             %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Speicherung von Datum/Zeit-Typen:            %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-Bit-Ganzzahlen"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "Gleitkommazahlen"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Übergabe von Float4-Argumenten:              %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "Referenz"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "Wert"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Übergabe von Float8-Argumenten:              %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Datenseitenprüfsummenversion:                %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Zu ändernde Werte:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Erstes Logdateisegment nach Zurücksetzen:    %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                             %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                              %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "OldestMulti's DB:                            %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                             %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                                     %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                                     %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                                   %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "OldestXID's DB:                              %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "NextXID-Epoche:                              %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                           %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                           %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: interner Fehler -- sizeof(ControlFileData) ist zu groß ... PG_CONTROL_SIZE reparieren\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: konnte pg_control-Datei nicht erstellen: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%sL konnte pg_control-Datei nicht schreiben: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync-Fehler: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: konnte Verzeichnis »%s« nicht öffnen: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: konnte Verzeichnis »%s« nicht lesen: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: konnte Verzeichnis »%s« nicht schließen: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: konnte Datei »%s« nicht löschen: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: konnte Datei »%s« nicht öffnen: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: konnte Datei »%s« nicht schreiben: %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s setzt den PostgreSQL-Transaktionslog zurück.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Aufruf:\n"
-"  %s [OPTION]... DATENVERZEICHNIS\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Optionen:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
-msgstr "  -c XID,XID       älteste und neuste Transaktion mit Commit-Timestamp setzen\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   (Null in einem Wert bedeutet keine Änderung)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DATENVERZ    Datenbankverzeichnis\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCHE     nächste Transaktions-ID-Epoche setzen\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               Änderung erzwingen\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr "  -l XLOGDATEI     minimale WAL-Startposition für neuen Log erzwingen\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     nächste und älteste Multitransaktions-ID setzen\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr ""
-"  -n               keine Änderungen; nur zeigen, was gemacht werden würde (zum\n"
-"                   Testen)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           nächste OID setzen\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        nächsten Multitransaktions-Offset setzen\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    Versionsinformationen anzeigen, dann beenden\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           nächste Transaktions-ID setzen\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       diese Hilfe anzeigen, dann beenden\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Berichten Sie Fehler an <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/es.po b/src/bin/pg_resetxlog/po/es.po
deleted file mode 100644
index fec8ea9..0000000
--- a/src/bin/pg_resetxlog/po/es.po
+++ /dev/null
@@ -1,611 +0,0 @@
-# Spanish message translation file for pg_resetxlog
-#
-# Copyright (C) 2003-2012 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-#
-# Ivan Hernandez <ivanx@ciencias.unam.mx>, 2003.
-# Alvaro Herrera <alvherre@alvh.no-ip.org>, 2004-2014
-# Jaime Casanova <systemguards@gmail.com>, 2005
-# Martín Marqués <martin@2ndquadrant.com>, 2013-2014
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL 9.6)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-05-02 20:14+0000\n"
-"PO-Revision-Date: 2016-05-24 10:56-0500\n"
-"Last-Translator: Carlos Chapi <carlos.chapi@2ndquadrant.com>\n"
-"Language-Team: Español <pgsql-es-ayuda@postgresql.org>\n"
-"Language: es\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.7\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ATENCIÓN: no se pueden crear tokens restrigidos en esta plataforma\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: no se pudo abrir el token de proceso: código de error %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: no se pudo emplazar los SIDs: código de error %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: no se pudo crear el token restringido: código de error %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: no se pudo iniciar el proceso para la orden «%s»: código de error %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: no se pudo re-ejecutar con el token restringido: código de error %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: no se pudo obtener el código de salida del subproceso»: código de error %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: argumento no válido para la opción %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Prueba con «%s --help» para más información\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: el «epoch» de ID de transacción (-e) no debe ser -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: el ID de transacción (-x) no debe ser 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: el ID de transacción (-c) debe ser 0 o bien mayor o igual a 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) no debe ser cero\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: el ID de multitransacción (-m) no debe ser 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: el ID de multitransacción más antiguo (-m) no debe ser 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: la posición de multitransacción (-O) no debe ser -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: demasiados argumentos de línea de órdenes (el primero es «%s»)\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: directorio de datos no especificado\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: no puede ser ejecutado con el usuario «root»\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Debe ejecutar %s con el superusuario de PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: no se pudo cambiar al directorio «%s»: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: no se pudo abrir el archivo «%s» para lectura: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: el archivo candado «%s» existe\n"
-"¿Hay un servidor corriendo? Si no, borre el archivo candado e inténtelo de nuevo\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Si estos valores parecen aceptables, use -f para forzar reinicio.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"El servidor de base de datos no fue terminado limpiamente.\n"
-"Reiniciar la bitácora de transacciones puede causar pérdida de datos.\n"
-"Si de todas formas quiere proceder, use -f para forzar su reinicio.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Bitácora de transacciones reiniciada\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Si está seguro que la ruta al directorio de datos es correcta, ejecute\n"
-"   touch %s\n"
-"y pruebe de nuevo.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: no se pudo leer el archivo «%s»: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: existe pg_control pero tiene un CRC no válido, proceda con precaución\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: existe pg_control pero está roto o se desconoce su versión; ignorándolo\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valores de pg_control asumidos:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valores actuales de pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "Número de versión de pg_control:                 %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Número de versión de catálogo:                   %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Identificador de sistema:                        %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineID del checkpoint más reciente:          %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes del checkpoint más reciente:    %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "desactivado"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "activado"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "NextXID del checkpoint más reciente:             %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID del checkpoint más reciente:             %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId del checkpoint más reciente:     %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset del checkpoint más reciente:     %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID del checkpoint más reciente:           %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "BD del oldestXID del checkpoint más reciente:    %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID del checkpoint más reciente:     %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid del checkpoint más reciente:      %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "BD del oldestMultiXid del checkpt. más reciente: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid del último checkpoint:         %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid del último checkpoint:         %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Máximo alineamiento de datos:                    %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Tamaño del bloque de la base de datos:           %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Bloques por segmento de relación grande:         %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Tamaño del bloque de WAL:                        %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Bytes por segmento WAL:                          %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Longitud máxima de identificadores:              %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Máximo número de columnas en un índice:          %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Longitud máxima de un trozo TOAST:               %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Longitud máxima de un trozo de objeto grande:    %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Tipo de almacenamiento hora/fecha:               %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "enteros de 64 bits"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "números de coma flotante"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Paso de parámetros float4:                       %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "por referencia"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "por valor"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Paso de parámetros float8:                       %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Versión de suma de verificación de datos:        %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valores a cambiar:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Primer segmento de log después de reiniciar:     %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                      %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                       %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "Base de datos del OldestMulti:        %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                      %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                              %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                              %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                            %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "Base de datos del OldestXID:          %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "Epoch del NextXID:                    %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                    %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                    %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: error interno -- sizeof(ControlFileData) es demasiado grande ... corrija PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: no se pudo crear el archivo pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: no se pudo escribir el archivo pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: error de fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: no se pudo abrir el directorio «%s»: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: no se pudo leer el directorio «%s»: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: no se pudo cerrar el directorio «%s»: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: no se pudo borrar el archivo «%s»: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: no se pudo abrir el archivo «%s»: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: no se pudo escribir en el archivo «%s»: %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s reinicia la bitácora de transacciones de PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Uso:\n"
-"   %s [OPCIÓN]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opciones:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
-msgstr ""
-"  -c XID,XID      asigna los ID de transacciones más antiguo y más nuevo que llevan\n"
-"                  timestamp de commit\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                  (cero en cualquiera de ellos significa no cambiar)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DATADIR     directorio de datos\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH     asigna el siguiente «epoch» de ID de transacción\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f              fuerza que la actualización sea hecha\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr ""
-"  -l XLOGFILE     fuerza una posición mínima de inicio de WAL para una\n"
-"                  nueva transacción\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID    asigna el siguiente ID de multitransacción y el más antiguo\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr "  -n              no actualiza, sólo muestra lo que va a hacer (para pruebas)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID          asigna el siguiente OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET       asigna la siguiente posición de multitransacción\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version   muestra información de la versión, luego sale\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID          asigna el siguiente ID de transacción\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help      muestra esta ayuda, luego sale\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Reporte errores a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/fr.po b/src/bin/pg_resetxlog/po/fr.po
deleted file mode 100644
index 1a9a57f..0000000
--- a/src/bin/pg_resetxlog/po/fr.po
+++ /dev/null
@@ -1,644 +0,0 @@
-# translation of pg_resetxlog.po to fr_fr
-# french message translation file for pg_resetxlog
-#
-# Use these quotes: � %s �
-#
-# Guillaume Lelarge <guillaume@lelarge.info>, 2003-2009.
-# St�phane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.6\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-05-08 21:14+0000\n"
-"PO-Revision-Date: 2016-05-09 10:28+0200\n"
-"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
-"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
-"Language: fr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-15\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.7.1\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s : ATTENTION : ne peut pas cr�r les jetons restreints sur cette plateforme\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s : n'a pas pu ouvrir le jeton du processus : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s : n'a pas pu allouer les SID : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s : n'a pas pu cr�er le jeton restreint : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s : n'a pas pu d�marrer le processus pour la commande � %s � : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s : n'a pas pu r�-ex�cuter le jeton restreint : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s : n'a pas pu r�cup�rer le code de statut du sous-processus : code d'erreur %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s : argument invalide pour l'option %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Essayer � %s --help � pour plus d'informations.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr ""
-"%s : la valeur epoch de l'identifiant de transaction (-e) ne doit pas �tre\n"
-"-1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s : l'identifiant de la transaction (-x) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s : l'identifiant de transaction (-c) doit �tre 0 ou sup�rieur ou �gal � 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s : l'OID (-o) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s : l'identifiant de multi-transaction (-m) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s : l'identifiant de multi-transaction le plus ancien (-m) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s : le d�calage de multi-transaction (-O) ne doit pas �tre -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s : trop d'arguments en ligne de commande (le premier �tant � %s �)\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s : aucun r�pertoire de donn�es indiqu�\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s : ne peut pas �tre ex�cut� par � root �\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Vous devez ex�cuter %s en tant que super-utilisateur PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s : n'a pas pu acc�der au r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s : n'a pas pu ouvrir le fichier � %s � en lecture : %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s : le verrou � %s � existe\n"
-"Le serveur est-il d�marr� ? Sinon, supprimer le fichier verrou et r�essayer.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Si ces valeurs semblent acceptables, utiliser -f pour forcer la\n"
-"r�initialisation.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Le serveur de bases de donn�es n'a pas �t� arr�t� proprement.\n"
-"R�-initialiser le journal des transactions peut occasionner des pertes de\n"
-"donn�es.\n"
-"Pour continuer malgr� tout, utiliser -f pour forcer la\n"
-"r�initialisation.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "R�initialisation du journal des transactions\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Si le chemin du r�pertoire de donn�es est correct, ex�cuter\n"
-"  touch %s\n"
-"et r�essayer.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s : n'a pas pu lire le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s : pg_control existe mais son CRC est invalide ; agir avec pr�caution\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s : pg_control existe mais est corrompu ou de version inconnue ; ignor�\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valeurs de pg_control devin�es :\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valeurs actuelles de pg_control :\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "Num�ro de version de pg_control :                       %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Num�ro de version du catalogue :                        %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Identifiant du syst�me de base de donn�es :             %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "Dernier TimeLineID du point de contr�le :               %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Dernier full_page_writes du point de contr�le :         %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "d�sactiv�"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "activ�"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "Dernier NextXID du point de contr�le :                  %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "Dernier NextOID du point de contr�le :                  %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "Dernier NextMultiXactId du point de contr�le :          %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "Dernier NextMultiOffset du point de contr�le :          %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "Dernier oldestXID du point de contr�le :                %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "Dernier oldestXID du point de contr�le de la base :     %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "Dernier oldestActiveXID du point de contr�le :          %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "Dernier oldestMultiXID du point de contr�le :           %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "Dernier oldestMulti du point de contr�le de la base :     %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "Dernier oldestCommitTsXid du point de contr�le :        %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "Dernier newestCommitTsXid du point de contr�le :        %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Alignement maximal des donn�es :                        %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Taille du bloc de la base de donn�es :                  %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blocs par segment des relations volumineuses :          %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Taille de bloc du journal de transaction :              %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Octets par segment du journal de transaction :          %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Longueur maximale des identifiants :                    %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Nombre maximal de colonnes d'un index:                  %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Longueur maximale d'un morceau TOAST :                  %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Taille d'un morceau de Large Object :                   %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Stockage du type date/heure :                           %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "entiers 64-bits"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "nombres � virgule flottante"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Passage d'argument float4 :                             %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "par r�f�rence"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "par valeur"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Passage d'argument float8 :                             %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Version des sommes de contr�le des pages de donn�es : %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valeurs � changer :\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Premier segment du journal apr�s r�initialisation :     %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                      %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                       %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "OldestMulti's DB:                     %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                      %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                              %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                              %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                            %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "OldestXID's DB:                       %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "NextXID Epoch:                        %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                    %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                    %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr ""
-"%s : erreur interne -- sizeof(ControlFileData) est trop important...\n"
-"corrigez PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s : n'a pas pu cr�er le fichier pg_control : %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s : n'a pas pu �crire le fichier pg_control : %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s : erreur fsync : %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s : n'a pas pu ouvrir le r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s : n'a pas pu fermer le r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s : n'a pas pu supprimer le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s : n'a pas pu ouvrir le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s : n'a pas pu �crire le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s r�initialise le journal des transactions PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Usage :\n"
-"  %s [OPTION]... R�P_DONN�ES\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Options :\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
-msgstr "  -c XID,XID      configure la plus ancienne et la plus r�cente transaction\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                  (z�ro dans l'une des deux valeurs signifie aucun changement)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr "  [-D] R�PDONNEES r�pertoire de la base de donn�es\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr ""
-"  -e XIDEPOCH     fixe la valeur epoch du prochain identifiant de\n"
-"                  transaction\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f              force la mise � jour\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr ""
-"  -l FICHIERXLOG  force l'emplacement minimal de d�but des WAL du nouveau\n"
-"                  journal de transactions\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID    fixe le prochain identifiant multi-transaction\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr ""
-"  -n              pas de mise � jour, affiche simplement ce qui sera fait\n"
-"                  (pour test)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID          fixe le prochain OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O D�CALAGE     fixe le d�calage de la prochaine multi-transaction\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version  affiche la version et quitte\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID          fixe le prochain identifiant de transaction\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help     affiche cette aide et quitte\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Rapporter les bogues � <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s : argument invalide pour l'option -x\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s : argument invalide pour l'option -o\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s : argument invalide pour l'option -m\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s : argument invalide pour l'option -O\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s : argument invalide pour l'option -l\n"
-
-#~ msgid "%s: could not read from directory \"%s\": %s\n"
-#~ msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
-
-#~ msgid "  --help          show this help, then exit\n"
-#~ msgstr "  --help          affiche cette aide et quitte\n"
-
-#~ msgid "  --version       output version information, then exit\n"
-#~ msgstr "  --version       afficherla version et quitte\n"
-
-#~ msgid "First log file ID after reset:        %u\n"
-#~ msgstr "Premier identifiant du journal apr�s r�initialisation : %u\n"
diff --git a/src/bin/pg_resetxlog/po/it.po b/src/bin/pg_resetxlog/po/it.po
deleted file mode 100644
index 9fc4479..0000000
--- a/src/bin/pg_resetxlog/po/it.po
+++ /dev/null
@@ -1,620 +0,0 @@
-#
-# Translation of pg_resetxlog to Italian
-# PostgreSQL Project
-#
-# Associazione Culturale ITPUG - Italian PostgreSQL Users Group
-# http://www.itpug.org/ - info@itpug.org
-#
-# Traduttori:
-#  * Diego Cinelli <diego.cinelli@itpug.org>
-#  * Daniele Varrazzo <daniele.varrazzo@gmail.com>
-#
-# Revisori:
-#  * Emanuele Zamprogno <emanuele.zamprogno@itpug.org>
-#
-# Traduttori precedenti:
-#  * Fabrizio Mazzoni <veramente@libero.it>
-#  * Mirko Tebaldi <mirko.tebaldi@libero.it>
-#
-# Copyright (c) 2010, Associazione Culturale ITPUG
-# Distributed under the same license of the PostgreSQL project
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL) 9.6\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-04-17 00:14+0000\n"
-"PO-Revision-Date: 2016-04-17 20:51+0100\n"
-"Last-Translator: Daniele Varrazzo <daniele.varrazzo@gmail.com>\n"
-"Language-Team: Gruppo traduzioni ITPUG <traduzioni@itpug.org>\n"
-"Language: it\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-SourceCharset: utf-8\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 1.5.4\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ATTENZIONE: non è possibile creare token ristretti su questa piattaforma\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: apertura del token di processo fallita: codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: allocazione dei SID fallita: codice di errore: %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: creazione del token ristretto fallita: codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: avvio del processo fallito per il comando \"%s\": codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: ri-esecuzione con token ristretto fallita: codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: lettura del codice di uscita del sottoprocesso fallita: codice di errore %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: argomento non valido per l'opzione %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Prova \"%s --help\" per maggiori informazioni.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: l'ID epoch della transazione (-e) non deve essere -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: l'ID della transazione (-x) non deve essere 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: l'ID di transazione (-c) dev'essere 0 or maggiore o uguale a 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: l'OID (-o) non deve essere 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: l'ID della multitransazione (-m) non deve essere 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: l'ID multitransazione più vecchio (-m) non può essere 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: l'offset di una multitransazione (-O) non può essere -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: troppi argomenti di riga di comando (il primo è \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: non è stata specificata una directory per i dati\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s non può essere eseguito da \"root\"\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "È obbligatorio eseguire %s come superutente di PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: spostamento nella directory \"%s\" fallito: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: errore nell'apertura del file \"%s\" per la lettura: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: il file di lock \"%s\" esiste\n"
-"Il server è in esecuzione? Se non lo è, cancella il file di lock e riprova.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Se questi parametri sembrano accettabili, utilizza -f per forzare un reset.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Il server database non è stato arrestato correttamente.\n"
-"Resettare il registro delle transazioni può causare una perdita di dati.\n"
-"Se vuoi continuare comunque, utilizza -f per forzare il reset.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Registro delle transazioni riavviato\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Se sei sicuro che il percorso della directory dei dati è corretto, esegui\n"
-"  touch %s\n"
-"e riprova.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: lettura del file \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control esiste ma ha un CRC non valido; procedere con cautela\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control esiste ma è inutilizzabile o è una versione sconosciuta; verrà ignorato\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valori pg_control indovinati:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valori pg_control attuali:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "Numero di versione di pg_control:           %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Numero di versione del catalogo:            %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Identificatore di sistema del database:     %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineId dell'ultimo checkpoint:          %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes dell'ultimo checkpoint:    %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "disattivato"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "attivato"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "NextXID dell'ultimo checkpoint:             %u.%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID dell'ultimo checkpoint:             %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId dell'ultimo checkpoint:     %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset dell'ultimo checkpoint:     %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID dell'ultimo checkpoint:           %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "DB dell'oldestXID dell'ultimo checkpoint:   %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID dell'ultimo checkpoint:     %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXID dell'ultimo checkpoint:      %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB dell'oldestMulti dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid dell'ultimo checkpoint:   %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid dell'ultimo checkpoint:   %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Massimo allineamento dei dati:              %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Dimensione blocco database:                 %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blocchi per ogni segmento grosse tabelle:   %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Dimensione blocco WAL:                      %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Byte per segmento WAL:                      %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Lunghezza massima degli identificatori:     %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Massimo numero di colonne in un indice:     %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Massima dimensione di un segmento TOAST:    %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Dimensione di un blocco large-object:       %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Memorizzazione per tipi data/ora:           %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "interi a 64 bit"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "numeri in virgola mobile"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Passaggio di argomenti Float4:              %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "per riferimento"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "per valore"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "passaggio di argomenti Float8:              %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Versione somma di controllo dati pagine:    %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valori da cambiare:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Primo segmento di log dopo il reset:        %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                            %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                             %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "DB di OldestMulti:                          %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                            %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                                    %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                                    %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                                  %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "DB di OldestXID:                            %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "Epoca del NextXID:                          %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                          %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                          %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: errore interno -- sizeof(ControlFileData) è troppo grande ... correggere PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: creazione del file pg_control fallita: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: scrittura del file pg_control fallita: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: errore fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: apertura della directory \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: lettura della directory \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: chiusura della directory \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: cancellazione del file \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: apertura del file \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: errore nella scrittura del file \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s riavvia il registro delle transazioni di PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Utilizzo:\n"
-"  %s [OPZIONI]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opzioni:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
-msgstr "  -c XID,XID       imposta le transazione più vecchia e più nuova che portano l'ora di commit\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   (zero in uno dei dei valori vuol dire nessun cambiamento)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DATADIR      directory dei dati\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      imposta il prossimo ID epoch transazione\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               forza l'esecuzione dell'aggiornamento\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr "  -l XLOGFILE      forza la locazione di inizio WAL minima per il nuovo log transazioni\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     imposta gli ID multitransazione successivo e più vecchio\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr "  -n               nessuna modifica, mostra solo cosa sarebbe fatto (per prova)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           imposta il prossimo OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        imposta il prossimo offset multitransazione\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    mostra informazioni sulla versione ed esci\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           imposta il prossimo ID di transazione\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       mostra questo aiuto ed esci\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Puoi segnalare eventuali bug a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/ja.po b/src/bin/pg_resetxlog/po/ja.po
deleted file mode 100644
index 54a0f87..0000000
--- a/src/bin/pg_resetxlog/po/ja.po
+++ /dev/null
@@ -1,490 +0,0 @@
-# translation of initdb.
-# Shigehiro Honda <fwif0083@mb.infoweb.ne.jp>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.0 beta 3\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2013-08-18 12:05+0900\n"
-"PO-Revision-Date: 2013-08-18 12:10+0900\n"
-"Last-Translator: HOTTA Michihide <hotta@net-newbie.com>\n"
-"Language-Team: jpug-doc <jpug-doc@ml.postgresql.jp>\n"
-"Language: ja\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: pg_resetxlog.c:133
-#, c-format
-msgid "%s: invalid argument for option -e\n"
-msgstr "%s: オプション -e の引数が無効です\n"
-
-#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
-#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
-#: pg_resetxlog.c:242
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "詳細は\"%s --help\"を実行してください\n"
-
-#: pg_resetxlog.c:139
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: トランザクションID エポック(-e)は -1 であってはなりません\n"
-
-#: pg_resetxlog.c:148
-#, c-format
-msgid "%s: invalid argument for option -x\n"
-msgstr "%s: オプション-xの引数が無効です\n"
-
-#: pg_resetxlog.c:154
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: トランザクションID(-x)は非0でなければなりません\n"
-
-#: pg_resetxlog.c:163
-#, c-format
-msgid "%s: invalid argument for option -o\n"
-msgstr "%s: オプション-oの引数が無効です\n"
-
-#: pg_resetxlog.c:169
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID(-o)は非0でなければなりません\n"
-
-#: pg_resetxlog.c:178 pg_resetxlog.c:186
-#, c-format
-msgid "%s: invalid argument for option -m\n"
-msgstr "%s: オプション-mの引数が無効です\n"
-
-#: pg_resetxlog.c:192
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: マルチトランザクションID(-m)は非0でなければなりません\n"
-
-#: pg_resetxlog.c:202
-#, c-format
-#| msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: 最も古いマルチトランザクションID(-m)は非0でなければなりません\n"
-
-#: pg_resetxlog.c:212
-#, c-format
-msgid "%s: invalid argument for option -O\n"
-msgstr "%s: オプション-Oの引数が無効です\n"
-
-#: pg_resetxlog.c:218
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: マルチトランザクションオフセット(-O)は-1ではいけません\n"
-
-#: pg_resetxlog.c:226
-#, c-format
-msgid "%s: invalid argument for option -l\n"
-msgstr "%s: オプション-lの引数が無効です\n"
-
-#: pg_resetxlog.c:241
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: データディレクトリが指定されていません\n"
-
-#: pg_resetxlog.c:255
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: \"root\"では実行できません\n"
-
-#: pg_resetxlog.c:257
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "PostgreSQLのスーパーユーザで%sを実行しなければなりません\n"
-
-#: pg_resetxlog.c:267
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: ディレクトリ\"%s\"に移動できませんでした: %s\n"
-
-#: pg_resetxlog.c:280 pg_resetxlog.c:414
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: 読み取り用のファイル\"%s\"をオープンできませんでした: %s\n"
-
-#: pg_resetxlog.c:287
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: ロックファイル\"%s\"があります\n"
-"サーバが稼動していませんか? 稼動していなければロックファイルを削除し再実行してください。\n"
-
-#: pg_resetxlog.c:362
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"この値が適切だと思われるのであれば、-fを使用して強制リセットしてください。\n"
-
-#: pg_resetxlog.c:374
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"データベースサーバが正しくシャットダウンされていませんでした。\n"
-"トランザクションログのリセットにはデータ損失の恐れがあります。\n"
-"とにかく処理したいのであれば、-fを使用して強制的にリセットしてください。\n"
-
-#: pg_resetxlog.c:388
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "トランザクションログをリセットします。\n"
-
-#: pg_resetxlog.c:417
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"確実にデータディレクトリのパスが正しければ、\n"
-"  touch %s\n"
-"を実行し、再実行してください。\n"
-"\n"
-
-#: pg_resetxlog.c:430
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: ファイル\"%s\"を読み込めませんでした: %s\n"
-
-#: pg_resetxlog.c:453
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_controlがありましたが、CRCが無効でした。警告付きで続行します\n"
-
-#: pg_resetxlog.c:462
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_controlがありましたが、破損あるいは未知のバージョンでしたので無視します\n"
-
-#: pg_resetxlog.c:562
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"pg_controlの推測値:\n"
-"\n"
-
-#: pg_resetxlog.c:564
-#, c-format
-msgid ""
-"pg_control values:\n"
-"\n"
-msgstr ""
-"pg_controlの値:\n"
-"\n"
-
-#: pg_resetxlog.c:575
-#, c-format
-#| msgid "First log file segment after reset:   %u\n"
-msgid "First log segment after reset:        %s\n"
-msgstr "リセット後、最初のログセグメント:        %s\n"
-
-#: pg_resetxlog.c:577
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "pg_controlバージョン番号:                 %u\n"
-
-#: pg_resetxlog.c:579
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "カタログバージョン番号:                   %u\n"
-
-#: pg_resetxlog.c:581
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "データベースシステム識別子:               %s\n"
-
-#: pg_resetxlog.c:583
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "最終チェックポイントの時系列ID:           %u\n"
-
-#: pg_resetxlog.c:585
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "最終チェックポイントのfull_page_writes %s\n"
-
-#: pg_resetxlog.c:586
-msgid "off"
-msgstr "オフ"
-
-#: pg_resetxlog.c:586
-msgid "on"
-msgstr "オン"
-
-#: pg_resetxlog.c:587
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgstr "最終チェックポイントのNextXID:                    %u/%u\n"
-
-#: pg_resetxlog.c:590
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "最終チェックポイントのNextOID:            %u\n"
-
-#: pg_resetxlog.c:592
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "最終チェックポイントのNextMultiXactId:  %u\n"
-
-#: pg_resetxlog.c:594
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "最終チェックポイントのNextMultiOffset:   %u\n"
-
-#: pg_resetxlog.c:596
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "最終チェックポイントのoldestXID:      %u\n"
-
-#: pg_resetxlog.c:598
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "最終チェックポイントのoldestXIDのDB:  %u\n"
-
-#: pg_resetxlog.c:600
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "最終チェックポイントのoldestActiveXID: %u\n"
-
-#: pg_resetxlog.c:602
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "最終チェックポイントのoldestMultiXid:   %u\n"
-
-#: pg_resetxlog.c:604
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "最終チェックポイントのoldestMulti'sのDB: %u\n"
-
-#: pg_resetxlog.c:606
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "最大のデータアライメント:               %u\n"
-
-#: pg_resetxlog.c:609
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "データベースブロックサイズ:               %u\n"
-
-#: pg_resetxlog.c:611
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "ラージリレーションセグメントのブロック数: %u\n"
-
-#: pg_resetxlog.c:613
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "WALブロックのサイズ:                              %u\n"
-
-#: pg_resetxlog.c:615
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "WALセグメント当たりのバイト数:                  %u\n"
-
-#: pg_resetxlog.c:617
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "識別子の最大長:                           %u\n"
-
-#: pg_resetxlog.c:619
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "インデックス内の最大列数:                  %u\n"
-
-#: pg_resetxlog.c:621
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "TOAST チャンク一個の最大サイズ:       %u\n"
-
-#: pg_resetxlog.c:623
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "日付/時刻型の格納方式                     %s\n"
-
-#: pg_resetxlog.c:624
-msgid "64-bit integers"
-msgstr "64ビット整数"
-
-#: pg_resetxlog.c:624
-msgid "floating-point numbers"
-msgstr "浮動小数点数"
-
-#: pg_resetxlog.c:625
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Float4 引数の渡し方：                 %s\n"
-
-#: pg_resetxlog.c:626 pg_resetxlog.c:628
-msgid "by reference"
-msgstr "参照渡し"
-
-#: pg_resetxlog.c:626 pg_resetxlog.c:628
-msgid "by value"
-msgstr "値渡し"
-
-#: pg_resetxlog.c:627
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Float8  引数の渡し方：                %s\n"
-
-#: pg_resetxlog.c:629
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "データベージチェックサムのバージョン:           %u\n"
-
-#: pg_resetxlog.c:692
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: 内部エラー -- sizeof(ControlFileData)が大きすぎます \n"
-"... PG_CONTROL_SIZE を修正してください\n"
-
-#: pg_resetxlog.c:707
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: pg_controlファイルを作成できませんでした: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: pg_controlファイルを書き込めませんでした: %s\n"
-
-#: pg_resetxlog.c:725 pg_resetxlog.c:1024
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsyncエラー: %s\n"
-
-#: pg_resetxlog.c:765 pg_resetxlog.c:836 pg_resetxlog.c:892
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: ディレクトリ\"%s\"をオープンできませんでした: %s\n"
-
-#: pg_resetxlog.c:807 pg_resetxlog.c:869 pg_resetxlog.c:926
-#, c-format
-msgid "%s: could not read from directory \"%s\": %s\n"
-msgstr "%s: ディレクトリ\"%s\"から読み込めませんでした: %s\n"
-
-#: pg_resetxlog.c:850 pg_resetxlog.c:907
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: ファイル\"%s\"を削除できませんでした: %s\n"
-
-#: pg_resetxlog.c:991
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: ファイル\"%s\"をオープンできませんでした: %s\n"
-
-#: pg_resetxlog.c:1002 pg_resetxlog.c:1016
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: ファイル\"%s\"を書き込めませんでした: %s\n"
-
-#: pg_resetxlog.c:1035
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%sはPostgreSQLのトランザクションログをリセットします。\n"
-"\n"
-
-#: pg_resetxlog.c:1036
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"使用方法:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1037
-#, c-format
-msgid "Options:\n"
-msgstr "オプション:\n"
-
-#: pg_resetxlog.c:1038
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH     次のトランザクションIDエポックを設定します\n"
-
-#: pg_resetxlog.c:1039
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f              強制的に更新を実施します\n"
-
-#: pg_resetxlog.c:1040
-#, c-format
-#| msgid "  -l TLI,FILE,SEG  force minimum WAL starting location for new transaction log\n"
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr "  -l XLOGFILE      新しいトランザクションログの最小WAL開始ポイントを強制します\n\n"
-
-#: pg_resetxlog.c:1041
-#, c-format
-#| msgid "  -m XID           set next multitransaction ID\n"
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     次の最も古いマルチトランザクションIDを設定します\n"
-
-#: pg_resetxlog.c:1042
-#, c-format
-msgid "  -n               no update, just show extracted control values (for testing)\n"
-msgstr "  -n              更新をせず、単に取り出した制御値を表示します(試験用)\n"
-
-#: pg_resetxlog.c:1043
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID          次のOIDを設定します\n"
-
-#: pg_resetxlog.c:1044
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        次のマルチトランザクションオフセットを設定します\n"
-
-#: pg_resetxlog.c:1045
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version             バージョン情報を表示し、終了します\n"
-
-#: pg_resetxlog.c:1046
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID          次のトランザクションIDを設定します\n"
-
-#: pg_resetxlog.c:1047
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help                このヘルプを表示し、終了します\n"
-
-#: pg_resetxlog.c:1048
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"不具合は<pgsql-bugs@postgresql.org>まで報告してください。\n"
-
-#~ msgid "  --version       output version information, then exit\n"
-#~ msgstr "  --version       バージョン情報を表示し、終了します\n"
-
-#~ msgid "  --help          show this help, then exit\n"
-#~ msgstr "  --help          ヘルプを表示し、終了します\n"
-
-#~ msgid "First log file ID after reset:        %u\n"
-#~ msgstr "リセット後、現在のログファイルID:     %u\n"
diff --git a/src/bin/pg_resetxlog/po/ko.po b/src/bin/pg_resetxlog/po/ko.po
deleted file mode 100644
index 47d83c3..0000000
--- a/src/bin/pg_resetxlog/po/ko.po
+++ /dev/null
@@ -1,616 +0,0 @@
-# Korean message translation file for PostgreSQL pg_resetxlog
-# Ioseph Kim <ioseph@uri.sarang.net>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.5\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-01-27 10:03+0900\n"
-"PO-Revision-Date: 2016-01-29 13:45+0900\n"
-"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
-"Language-Team: Korean Team <pgsql-kr@postgresql.kr>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ko\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: 경고: 이 운영체제에서 restricted token을 만들 수 없음\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: 프로세스 토큰을 열 수 없음: 오류 코드 %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: SID를 할당할 수 없음: 오류 코드 %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: 상속된 토큰을 만들 수 없음: 오류 코드 %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: \"%s\" 명령용 프로세스를 시작할 수 없음: 오류 코드 %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: 상속된 토큰으로 재실행할 수 없음: 오류 코드 %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: 하위 프로세스의 종료 코드를 구할 수 없음: 오류 코드 %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: %s 옵션의 잘못된 인자\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "자세한 사용법은 \"%s --help\"\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: 트랜잭션 ID epoch (-e) 값은 -1이 아니여야함\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: 트랜잭션 ID (-x) 값은 0이 아니여야함\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid ""
-"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr ""
-"%s: -c 옵션으로 지정한 트랜잭션 ID는 0이거나 2이상이어야 함\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) 값은 0이 아니여야함\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: 멀티트랜잭션 ID (-m) 값은 0이 아니여야함\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: 제일 오래된 멀티트랜잭션 ID (-m) 값은 0이 아니여야함\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: 멀티트랜잭션 옵셋 (-O) 값은 -1이 아니여야함\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: 너무 많은 명령행 인수를 지정했습니다. (처음 \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: 데이터 디렉터리를 지정하지 않았음\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: 이 프로그램은 \"root\"로 실행될 수 없음\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "PostgreSQL superuser로 %s 프로그램을 실행하십시오.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: \"%s\" 디렉터리로 바꿀 수 없음: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: \"%s\" 파일을 읽기 모드로 열 수 없음: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: \"%s\" 잠금 파일이 있습니다.\n"
-"서버가 가동중인가요? 그렇지 않다면, 이 파일을 지우고 다시 시도하십시오.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"이 설정값들이 타당하다고 판단되면, 강제로 갱신하려면, -f 옵션을 쓰세요.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"이 데이터베이스 서버는 정상적으로 중지되지 못했습니다.\n"
-"트랜잭션 로그를 다시 설정하는 것은 자료 손실을 야기할 수 있습니다.\n"
-"그럼에도 불구하고 진행하려면, -f 옵션을 사용해서 강제 설정을 하십시오.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "트랜잭션 로그 재설정\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"지정한 데이터 디렉터리가 맞다면, 다음 명령을 실행하고, 다시 시도해\n"
-"보십시오.\n"
-"  touch %s\n"
-"(win32에서 어떻게 하나?)\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: \"%s\" 파일을 읽을 수 없음: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr ""
-"%s: pg_control파일이 있지만, CRC값이 잘못되었습니다; 경고과 함께 진행함\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control파일이 있지만, 손상되었거나 버전을 알 수 없음; 무시함\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"추측된 pg_control 설정값들:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"현재 pg_control 설정값들:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "pg_control 버전 번호:                 %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "카탈로그 버전 번호:                   %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "데이터베이스 시스템 식별자:           %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "마지막 체크포인트 TimeLineID:         %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "마지막 체크포인트 full_page_writes:   %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "off"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "on"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgstr "마지막 체크포인트 NextXID:            %u/%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "마지막 체크포인트 NextOID:            %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "마지막 체크포인트 NextMultiXactId:    %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "마지막 체크포인트 NextMultiOffset:    %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "마지막 체크포인트 제일 오래된 XID:    %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "마지막 체크포인트 제일 오래된 XID의 DB:%u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "마지막 체크포인트 제일 오래된 ActiveXID:%u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "마지막 체크포인트 제일 오래된 MultiXid:%u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "마지막 체크포인트 제일 오래된 MultiXid의 DB:%u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "마지막 체크포인트 제일 오래된 CommitTsXid:%u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "마지막 체크포인트 최신 CommitTsXid:   %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "최대 자료 정렬:                       %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "데이터베이스 블록 크기:               %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "대형 릴레이션의 세그먼트당 블럭 갯수: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "WAL 블록 크기:                        %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "WAL 세그먼트의 크기(byte):            %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "식별자 최대 길이:                     %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "인덱스에서 사용하는 최대 열 수:      %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "TOAST 청크의 최대 크기:        %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "대형객체 청크의 최대 크기:            %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "날짜/시간형 자료의 저장방식:          %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-비트 정수"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "부동소수"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Float4 인수 전달:                     %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "참조별"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "값별"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Float8 인수 전달:                     %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "데이터 페이지 체크섬 버전:            %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"변경될 값:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "리셋 뒤 첫 로그 세그먼트:             %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                      %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                       %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "OldestMultiXid의 DB:                  %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                      %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                              %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                              %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                            %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "OldestXID의 DB:                       %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "NextXID epoch:                        %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "제일 오래된 CommitTsXid:              %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "최근 CommitTsXid:                     %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: 내부 오류 -- sizeof(ControlFileData) 값이 너무 큼 ... PG_CONTROL_SIZE 고"
-"쳐야함\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: pg_control 파일 만들 수 없음: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: pg_control 파일 쓸 수 없음: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync 오류: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: \"%s\" 디렉터리 열 수 없음: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: \"%s\" 디렉터리를 읽을 수 없음: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: \"%s\" 디렉터리를 닫을 수 없음: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: \"%s\" 파일 삭제 할 수 없음: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: \"%s\" 파일 열 수 없음: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: \"%s\" 파일 쓸 수 없음: %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s 프로그램은 PostgreSQL 트랜잭션 로그를 다시 설정합니다.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"사용법:\n"
-"  %s [옵션]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "옵션들:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid ""
-"  -c XID,XID       set oldest and newest transactions bearing commit "
-"timestamp\n"
-msgstr ""
-"  -c XID,XID       커밋 시간을 도출하는 제일 오래된, 최신의 트랜잭션 지정\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   (0으로 지정하면 바꾸지 않음)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DATADIR      데이터 디렉터리\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      다음 트랙잭션 ID epoch 지정\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               강제로 갱신함\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid ""
-"  -l XLOGFILE      force minimum WAL starting location for new transaction "
-"log\n"
-msgstr ""
-"  -l XLOGFILE      새 트랜잭션 로그를 위한 WAL 최소 시작 위치를 강제로 지정\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     다음 제일 오래된 멀티트랜잭션 ID 지정\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid ""
-"  -n               no update, just show what would be done (for testing)\n"
-msgstr ""
-"  -n               갱신하지 않음, 컨트롤 값들을 보여주기만 함(테스트용)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           다음 OID 지정\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        다음 멀티트랜잭션 옵셋 지정\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    버전 정보 보여주고 마침\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           다음 XID(트랜잭션 ID) 지정\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       이 도움말을 보여주고 마침\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"오류보고: <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/pl.po b/src/bin/pg_resetxlog/po/pl.po
deleted file mode 100644
index d87214b..0000000
--- a/src/bin/pg_resetxlog/po/pl.po
+++ /dev/null
@@ -1,626 +0,0 @@
-# pg_resetxlog message translation file for pg_resetxlog
-# Copyright (C) 2011 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-# Begina Felicysym <begina.felicysym@wp.eu>, 2011, 2012, 2013.
-# grzegorz <begina.felicysym@wp.eu>, 2014, 2015, 2016.
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL 9.1)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-07-03 03:14+0000\n"
-"PO-Revision-Date: 2016-07-03 17:54+0200\n"
-"Last-Translator: grzegorz <begina.felicysym@wp.eu>\n"
-"Language-Team: begina.felicysym@wp.eu\n"
-"Language: pl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Virtaal 0.7.1\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: OSTRZEŻENIE nie można tworzyć ograniczonych tokenów na tej platformie\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: nie można otworzyć tokenu procesu: kod błędu %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: nie udało się przydzielić SIDów: kod błędu %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: nie udało się utworzyć ograniczonego tokena: kod błędu %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: nie udało się uruchomić procesu dla polecenia \"%s\": kod błędu %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: nie udało się ponownie wykonać ograniczonego tokena: %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: nie udało uzyskać kodu wyjścia z usługi podrzędnej: kod błędu %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: niepoprawny argument dla opcji %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Spróbuj \"%s --help\" aby uzyskać więcej informacji.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: epoka ID transakcji (-e) nie może być -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID transakcji (-x) nie może być 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: ID transakcji (-c) musi być albo 0 albo większa lub równa 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) nie może być 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID multitransakcji (-m) nie może być 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: najstarszy ID multitransakcji (-m) nie może być 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: offset multitransakcji (-O) nie może być -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: za duża ilość parametrów (pierwszy to \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: katalog danych nie został ustawiony\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: nie może być wykonywane pod \"rootem\"\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Musisz uruchomić %s jako superużytkownik PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: nie można zmienić katalogu na \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: nie można otworzyć pliku \"%s\" do odczytu: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: plik blokady \"%s\" istnieje\n"
-"Czy serwer działa? Jeśli nie, usuń plik blokady i spróbuj ponownie.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Jeśli te wartości wydają się do przyjęcia, użyj -f by wymusić reset.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Serwer bazy danych nie został poprawnie zamknięty.\n"
-"Zresetowanie dziennika transakcji może spowodować utratę danych.\n"
-"Jeśli chcesz kontynuować, użyj -f, aby wymusić reset.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Reset dziennika transakcji\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Jeśli jesteś pewien, że ścieżka folder u jest poprawna, wykonaj\n"
-"  touch %s\n"
-"i spróbuj ponownie.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: nie można odczytać z pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control istnieje ale ma niepoprawne CRC; postępuj ostrożnie\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control istnieje ale jest uszkodzony lub ma nieznaną wersję, zignorowano\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Odgadnięte wartości pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Bieżące wartości pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "pg_control w wersji numer:                       %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Katalog w wersji numer:                          %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Identyfikator systemu bazy danych:               %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineID najnowszego punktu kontrolnego:       %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes najnowszego punktu kontrolnego: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "wyłączone"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "włączone"
-
-#: pg_resetxlog.c:649
-#, c-format
-#| msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "NextXID najnowszego punktu kontrolnego:          %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID najnowszego punktu kontrolnego:          %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId najnowszego punktu kontrolnego:  %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset najnowszego punktu kontrolnego:  %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID najnowszego punktu kontrolnego:        %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "DB oldestXID'u najnowszego punktu kontrolnego:   %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "NextXID najnowszego punktu kontrolnego:          %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid najnowszego punktu kontrolnego:   %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB oldestMulti'u najnowszego punktu kontrolnego:  %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Maksymalne wyrównanie danych:                    %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Wielkość bloku bazy danych:                      %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Bloki na segment są w relacji:                   %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Wielkość bloku WAL:                              %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Bajtów na segment WAL:                           %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Maksymalna długość identyfikatorów:              %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Maksymalna liczba kolumn w indeksie:             %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Maksymalny rozmiar fragmentu TOAST:              %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Rozmiar fragmentu dużego obiektu:                %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Typ przechowywania daty/czasu:                   %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-bit'owe zmienne integer"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "liczby zmiennoprzecinkowe"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Przekazywanie parametru float4:                  %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "przez referencję"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "przez wartość"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Przekazywanie parametru float8:                  %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Suma kontrolna strony danych w wersji numer:     %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Wartości do zmiany:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Pierwszy segment dziennika po resecie:            %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                                  %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                                   %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "DB OldestMulti'u:                                 %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                                  %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                                          %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                                          %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                                        %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "DB OldestXIDu:                                    %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "Epoka NextXID:                                    %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                                %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                                %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: błąd wewnętrzny -- sizeof(ControlFileData) jest zbyt duża ... popraw PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: nie można utworzyć pliku pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: nie można pisać do pliku pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: błąd fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: nie można otworzyć katalogu \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: nie można odczytać katalogu \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: nie można zamknąć katalogu \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: nie można usunąć pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: nie można otworzyć pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: nie można zapisać pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s resetuje log transakcji PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Sposób użycia:\n"
-"  %s [OPCJA]... FOLDERDANYCH\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opcje:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
-msgstr "  -c XID,XID       ustawia najstarszy i najświeższy znacznik czasu wykonywanego zatwierdzenia\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   (zero w obu wartościach oznacza brak zmian)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DATADIR      folder bazy danych\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      ustawia epokę ID następnej transakcji\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               wymusza wykonanie modyfikacji\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr "  -l XLOGFILE      wymusza minimalne położenie początkowe WAL dla nowego komunikatu transakcji\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m XID,MXID      ustawia ID następnej i najstarszej multitransakcji\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr "  -n               bez modyfikacji, po prostu wyświetl co będzie zrobione (do testowania)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           ustawia następny OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        ustawia następny offset multitransakcji\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    wypisuje informacje o wersji i kończy\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           ustawia ID następnej transakcji\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       pokazuje ten ekran pomocy i kończy\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Błędy proszę przesyłać na adres <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -x\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -o\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -m\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -O\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -l\n"
-
-#~ msgid "%s: could not read from directory \"%s\": %s\n"
-#~ msgstr "%s: nie można odczytać katalogu \"%s\": %s\n"
-
-#~ msgid "First log file ID after reset:        %u\n"
-#~ msgstr "Pierwszy plik dziennika po resecie:              %u\n"
diff --git a/src/bin/pg_resetxlog/po/pt_BR.po b/src/bin/pg_resetxlog/po/pt_BR.po
deleted file mode 100644
index ca6e6d4..0000000
--- a/src/bin/pg_resetxlog/po/pt_BR.po
+++ /dev/null
@@ -1,603 +0,0 @@
-# Brazilian Portuguese message translation file for pg_resetxlog
-# Copyright (C) 2009 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-# Cesar Suga <sartre@linuxbr.com>, 2002.
-# Roberto Mello <rmello@fslc.usu.edu>, 2002.
-# Euler Taveira de Oliveira <euler@timbira.com>, 2003-2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.5\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-02-13 17:22-0300\n"
-"PO-Revision-Date: 2005-10-04 22:55-0300\n"
-"Last-Translator: Euler Taveira de Oliveira <euler@timbira.com>\n"
-"Language-Team: Brazilian Portuguese <pgbr-dev@listas.postgresql.org.br>\n"
-"Language: pt_BR\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: AVISO: não pode criar informações restritas nessa plataforma\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: não pôde abrir informação sobre processo: código de erro %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: não pôde alocar SIDs: código de erro %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: não pôde criar informação restrita: código de erro %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: não pôde iniciar processo para comando \"%s\": código de erro %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: não pôde executar novamente com informação restrita: código de erro %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: não pôde obter código de saída de subprocesso: código de erro %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: argumento inválido para opção %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Tente \"%s --help\" para obter informações adicionais.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: época do ID da transação (-e) não deve ser -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID da transação (-x) não deve ser 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: ID de transação (-c) deve ser 0 ou maior ou igual a 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) não deve ser 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID de transação múltipla (-m) não deve ser 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID de transação múltipla mais velho (-m) não deve ser 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: deslocamento da transação múltipla (-O) não deve ser -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: muitos argumentos de linha de comando (primeiro é \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: nenhum diretório de dados foi especificado\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: não pode ser executado pelo \"root\"\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Você deve executar %s como um super-usuário do PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: não pôde mudar diretório para \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: não pôde abrir arquivo \"%s\" para leitura: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: arquivo de bloqueio \"%s\" existe\n"
-"O servidor está executando? Se não, apague o arquivo de bloqueio e tente novamente.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Se estes valores lhe parecem aceitáveis, use -f para forçar o reinício.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"O servidor de banco de dados não foi desligado corretamente.\n"
-"Reiniciar o log de transação pode causar perda de dados.\n"
-"Se você quer continuar mesmo assim, use -f para forçar o reinício.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Log de transação reiniciado\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Se você tem certeza que o caminho do diretório de dados está correto, execute\n"
-"  touch %s\n"
-"e tente novamente.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: não pôde ler arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control existe mas tem CRC inválido: prossiga com cuidado\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control existe mas não funciona ou sua versão é desconhecida; ignorando-o\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valores supostos do pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valores atuais do pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "número da versão do pg_control:                    %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Número da versão do catálogo:                      %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Identificador do sistema de banco de dados:        %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineID do último ponto de controle:            %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes do último ponto de controle:      %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "desabilitado"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "habilitado"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgstr "NextXID do último ponto de controle:               %u/%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID do último ponto de controle:               %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId do último ponto de controle:       %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset do último ponto de controle:       %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID do último ponto de controle:             %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "BD do oldestXID do último ponto de controle:       %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID do último ponto de controle:       %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid do último ponto de controle:        %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "BD do oldestMulti do último ponto de controle:     %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid do último ponto de controle:     %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid do último ponto de controle:     %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Máximo alinhamento de dado:                        %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Tamanho do bloco do banco de dados:                %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blocos por segmento da relação grande:             %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Tamanho do bloco do WAL:                           %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Bytes por segmento do WAL:                         %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Tamanho máximo de identificadores:                 %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Máximo de colunas em um índice:                    %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Tamanho máximo do bloco TOAST:                     %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Tamanho do bloco de um objeto grande:              %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Tipo de data/hora do repositório:                  %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "inteiros de 64 bits"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "números de ponto flutuante"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Passagem de argumento float4:                      %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "por referência"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "por valor"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Passagem de argumento float8:                      %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Versão da verificação de páginas de dados:         %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valores a serem alterados:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Primeiro segmento do arquivo de log após reinício: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                                   %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                                    %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "BD do OldestMulti:                                 %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                                   %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                                           %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                                           %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                                         %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "BD do OldestXID:                                   %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "época do NextXID:                                  %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                                 %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                                 %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: erro interno -- sizeof(ControlFileData) é muito grande ... conserte o PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: não pôde criar arquivo do pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: não pôde escrever no arquivo do pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: erro ao executar fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: não pôde abrir diretório \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: não pôde ler diretório \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: não pôde fechar diretório \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: não pôde apagar arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: não pôde abrir arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: não pôde escrever no arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s reinicia o log de transação do PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Uso:\n"
-"  %s [OPÇÃO]... DIRDADOS\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opções:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid "  -c XID,XID       set oldest and newest transactions bearing commit timestamp\n"
-msgstr "  -c XID,XID       define transações mais velha e mais nova contendo timestamp de efetivação\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   (zero em qualquer valor significa nenhuma mudança)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DIRDADOS     diretório de dados\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e ÉPOCA_XID     define próxima época do ID de transação\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               força atualização ser feita\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr "  -l XLOGFILE      força local inicial mínimo do WAL para novo log de transação\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     define próximo e mais velho ID de transação múltipla\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr "  -n               sem atualização, mostra o que seria feito (para teste)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           define próximo OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        define próxima posição de transação múltipla\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    mostra informação sobre a versão e termina\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           define próximo ID de transação\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       mostra essa ajuda e termina\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Relate erros a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/ru.po b/src/bin/pg_resetxlog/po/ru.po
deleted file mode 100644
index 5a8e12e..0000000
--- a/src/bin/pg_resetxlog/po/ru.po
+++ /dev/null
@@ -1,677 +0,0 @@
-# PG_RESETXLOG Translated Messages into the Russian Language (UTF-8)
-#
-# Copyright (c) 2002-2005 Serguei A. Mokhov, mokhov@cs.concordia.ca
-# Copyright (c) 2012-2013 Alexander Lakhin, exclusion@gmail.com
-# Distributed under the same licensing terms as PostgreSQL itself.
-#
-# pgtranslation Id: pg_resetxlog.po,v 1.3 2009/10/14 21:08:40 petere Exp $
-#
-# translation of subject-specific terminology, see:
-# перевод некоторых специфичных терминов:
-# http://wiki.postgresql.org/wiki/NLS/ru/dict
-#
-# ChangeLog:
-#   - August 24, 2014: Updates for 9.4. Alexander Lakhin <exclusion@gmail.com>.
-#     - With corrections from Dmitriy Olshevskiy <olshevskiy87@bk.ru>
-#   - March 14, 2013: Updates for 9.3. Alexander Lakhin <exclusion@gmail.com>.
-#   - June 27, 2012: Updates for 9.2. Alexander Lakhin <exclusion@gmail.com>.
-#   - April 2, 2012: Bug fixes. Alexander Lakhin <exclusion@gmail.com>.
-#   - February 18, 2012: Complete translation for 9.1. Alexander Lakhin <exclusion@gmail.com>.
-#   - March 27, 2009: complete translation for 8.3, Sergey Burladyan <eshkinkot@gmail.com>.
-#   - January 17, 2005: Complete translation for 8.0, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-#   - December, 2004: Corrections and improvements by Oleg Bartunov <oleg@sai.msu.su>.
-#   - April 6 - August 11, 2004: Updates for 8.0; <mokhov@cs.concordia.ca>.
-#   - July 24 - August 23, 2003: Updates for 7.4.*; <mokhov@cs.concordia.ca>.
-#   - October 12, 2002: Complete post-7.3beta2 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-#   - September 7, 2002: Complete post-7.3beta1 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-#   - August 31, 2002: Initial Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9 current\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-05-27 16:14+0000\n"
-"PO-Revision-Date: 2015-12-31 14:56+0300\n"
-"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
-"Language-Team: Russian <pgsql-translators@postgresql.org>\n"
-"Language: ru\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Lokalize 2.0\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ПРЕДУПРЕЖДЕНИЕ: в этой ОС нельзя создавать ограниченные маркеры\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: не удалось открыть маркер процесса (код ошибки: %lu)\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: не удалось подготовить структуры SID (код ошибки: %lu)\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: не удалось создать ограниченный маркер (код ошибки: %lu)\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr ""
-"%s: не удалось запустить процесс для команды \"%s\" (код ошибки: %lu)\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr ""
-"%s: не удалось перезапуститься с ограниченным маркером (код ошибки: %lu)\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: не удалось получить код выхода от подпроцесса (код ошибки: %lu)\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: недопустимый аргумент параметра %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Для дополнительной информации попробуйте \"%s --help\".\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: эпоха ID транзакции (-e) не должна быть равна -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID транзакции (-x) не должен быть равен 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid ""
-"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: ID транзакции (-c) должен быть равен 0, либо больше или равен 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) не должен быть равен 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID мультитранзакции (-m) не должен быть равен 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID старейшей мультитранзакции (-m) не должен быть равен 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: смещение мультитранзакции (-O) не должно быть равно -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: слишком много аргументов командной строки (первый: \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: каталог данных не указан\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: программу не должен запускать root\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Запускать %s нужно от имени суперпользователя PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: не удалось перейти в каталог \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: не удалось открыть файл \"%s\" для чтения: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: обнаружен файл блокировки \"%s\"\n"
-"Возможно, сервер запущен? Если нет, удалите этот файл и попробуйте снова.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Если эти значения приемлемы, выполните сброс принудительно, добавив ключ -"
-"f.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Сервер баз данных был остановлен некорректно.\n"
-"Сброс журнала транзакций может привести к потере данных.\n"
-"Если вы хотите сбросить его, несмотря на это, добавьте ключ -f.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Журнал транзакций сброшен\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Если вы уверены, что путь к каталогу данных правильный, выполните\n"
-"  touch %s\n"
-"и повторите попытку.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: не удалось прочитать файл \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr ""
-"%s: pg_control существует, но его контрольная сумма неверна; продолжайте с "
-"осторожностью\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr ""
-"%s: pg_control испорчен или имеет неизвестную версию; игнорируется...\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Предполагаемые значения pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Текущие значения pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "Номер версии pg_control:              %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Номер версии каталога:                %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Идентификатор системы баз данных:     %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "Линия времени последней конт. точки:  %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Режим full_page_writes последней к.т: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "выкл."
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "вкл."
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "NextXID последней конт. точки:        %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID последней конт. точки:        %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId послед. конт. точки:  %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset послед. конт. точки:  %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID последней конт. точки:      %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "БД с oldestXID последней конт. точки: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID последней к.т.:       %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid последней конт. точки: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "БД с oldestMulti последней к.т.:      %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid последней к. т.:    %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid последней к. т.:    %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Макс. предел выравнивания данных:     %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Размер блока БД:                      %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Блоков в макс. сегменте отношений:    %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Размер блока WAL:                     %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Байт в сегменте WAL:                  %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Максимальная длина идентификаторов:   %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Максимальное число столбцов в индексе: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Максимальный размер порции TOAST:     %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Размер порции большого объекта:       %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Формат хранения даты/времени:         %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-битные целые"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "числа с плавающей точкой"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Передача аргумента Float4:            %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "по ссылке"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "по значению"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Передача аргумента Float8:            %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Версия контрольных сумм страниц:      %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Значения, которые будут изменены:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Первый сегмент журнала после сброса:  %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                      %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                       %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "БД с oldestMultiXid:                  %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                      %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                              %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                              %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                            %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "БД с oldestXID:                       %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "Эпоха NextXID:                        %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid:                    %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid:                    %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: внутренняя ошибка -- размер ControlFileData слишком велик -- исправьте "
-"PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: не удалось создать файл pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: не удалось записать файл pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: ошибка синхронизации с ФС: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: не удалось открыть каталог \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: не удалось прочитать каталог \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: не удалось закрыть каталог \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: ошибка при удалении файла \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: не удалось открыть файл \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: не удалось записать файл \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s сбрасывает журнал транзакций PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Usage:\n"
-"  %s [ПАРАМЕТР]... КАТ_ДАННЫХ\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Параметры:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid ""
-"  -c XID,XID       set oldest and newest transactions bearing commit "
-"timestamp\n"
-msgstr ""
-"  -c XID,XID       задать старейшую и новейшую транзакции, несущие метку "
-"времени фиксации\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   (0 в любом из аргументов игнорируется)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] КАТ_ДАННЫХ   каталог данных\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      задать эпоху в ID следующей транзакции\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               принудительное выполнение операции\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid ""
-"  -l XLOGFILE      force minimum WAL starting location for new transaction "
-"log\n"
-msgstr ""
-"  -l XLOGFILE      задать минимальное начальное положение WAL для нового\n"
-"                   журнала транзакций\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     задать ID следующей и старейшей мультитранзакции\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid ""
-"  -n               no update, just show what would be done (for testing)\n"
-msgstr ""
-"  -n               показать, какие действия будут выполнены, но не выполнять "
-"их\n"
-"                   (для проверки)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           задать следующий OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O СМЕЩЕНИЕ      задать смещение следующей мультитранзакции\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    показать версию и выйти\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           задать ID следующей транзакции\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       показать эту справку и выйти\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Об ошибках сообщайте по адресу <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s: недопустимый аргумент параметра -x\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s: недопустимый аргумент параметра -o\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s: недопустимый аргумент параметра -m\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s: недопустимый аргумент параметра -O\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s: недопустимый аргумент параметра -l\n"
-
-#~ msgid "  -m XID,OLDEST    set next multitransaction ID and oldest value\n"
-#~ msgstr ""
-#~ "  -m XID,СТАРЕЙШАЯ задать ID следующей мультитранзакции и ID старейшей\n"
-
-#~ msgid "disabled"
-#~ msgstr "отключен"
-
-#~ msgid "enabled"
-#~ msgstr "включен"
-
-#~ msgid "First log file ID after reset:        %u\n"
-#~ msgstr "ID первого журнала после сброса:      %u\n"
diff --git a/src/bin/pg_resetxlog/po/sv.po b/src/bin/pg_resetxlog/po/sv.po
deleted file mode 100644
index 528531b..0000000
--- a/src/bin/pg_resetxlog/po/sv.po
+++ /dev/null
@@ -1,550 +0,0 @@
-# Swedish message translation file for resetxlog.
-# Dennis Björklund <db@zigo.dhs.org>, 2002, 2003, 2004, 2005, 2006.
-# Peter Eisentraut <peter_e@gmx.net>, 2010.
-# Mats Erik Andersson <bsd@gisladisker.se>, 2014.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.4\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2014-11-25 16:12+0000\n"
-"PO-Revision-Date: 2014-11-29 18:32+0100\n"
-"Last-Translator: Mats Erik Andersson <bsd@gisladisker.se>\n"
-"Language-Team: Swedish <sv@li.org>\n"
-"Language: sv\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: pg_resetxlog.c:130
-#, c-format
-msgid "%s: invalid argument for option -e\n"
-msgstr "%s: Ogiltigt argument för växel -e.\n"
-
-#: pg_resetxlog.c:131 pg_resetxlog.c:146 pg_resetxlog.c:161 pg_resetxlog.c:176
-#: pg_resetxlog.c:184 pg_resetxlog.c:210 pg_resetxlog.c:224 pg_resetxlog.c:231
-#: pg_resetxlog.c:239
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Försök med \"%s --help\" för mer information.\n"
-
-#: pg_resetxlog.c:136
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: Epok (-e) för transaktions-ID får inte vara -1.\n"
-
-#: pg_resetxlog.c:145
-#, c-format
-msgid "%s: invalid argument for option -x\n"
-msgstr "%s: Ogiltigt argument för växel -x.\n"
-
-#: pg_resetxlog.c:151
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: Transaktions-ID (-x) får inte vara 0.\n"
-
-#: pg_resetxlog.c:160
-#, c-format
-msgid "%s: invalid argument for option -o\n"
-msgstr "%s: Ogiltigt argument för växel -o.\n"
-
-#: pg_resetxlog.c:166
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) får inte vara 0.\n"
-
-#: pg_resetxlog.c:175 pg_resetxlog.c:183
-#, c-format
-msgid "%s: invalid argument for option -m\n"
-msgstr "%s: Ogiltigt argument för växel -m.\n"
-
-#: pg_resetxlog.c:189
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: Multitransaktions-ID (-m) får inte vara 0.\n"
-
-#: pg_resetxlog.c:199
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: Äldsta multitransaktions-ID (-m) får inte vara 0.\n"
-
-#: pg_resetxlog.c:209
-#, c-format
-msgid "%s: invalid argument for option -O\n"
-msgstr "%s: Ogiltigt argument för växel -O.\n"
-
-#: pg_resetxlog.c:215
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: Multitransaktionsoffset (-O) får inte vara -1.\n"
-
-#: pg_resetxlog.c:223
-#, c-format
-msgid "%s: invalid argument for option -l\n"
-msgstr "%s: Ogiltigt argument för växel -l.\n"
-
-#: pg_resetxlog.c:238
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: Ingen datakatalog angiven.\n"
-
-#: pg_resetxlog.c:252
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: Får inte utföras av \"root\".\n"
-
-#: pg_resetxlog.c:254
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Du måste köra %s som PostgreSQL:s superanvändare.\n"
-
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: Kunde inte gå till katalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:277 pg_resetxlog.c:418
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: Kunde inte öppna filen \"%s\" för läsning: %s\n"
-
-#: pg_resetxlog.c:284
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: En låsfil \"%s\" finns på plats.\n"
-"Kör servern redan? Om inte, radera låsfilen och försök igen.\n"
-
-#: pg_resetxlog.c:366
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Om dessa värden verkar godtagbara, använd då -f för att\n"
-"framtvinga återställning.\n"
-
-#: pg_resetxlog.c:378
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Databasservern stängdes inte av ordentligt. Att återställa\n"
-"transaktionsloggen kan medföra att data förloras. Om du ändå\n"
-"vill fortsätta, använd -f för att framtvinga återställning.\n"
-
-#: pg_resetxlog.c:392
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Återställning av transaktionslogg.\n"
-
-#: pg_resetxlog.c:421
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"Om du är säker på att sökvägen till datakatalogen är riktig,\n"
-"utför då \"touch %s\" och försök sedan igen.\n"
-
-#: pg_resetxlog.c:434
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: Kunde inte läsa fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:457
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control existerar men har ogiltig CRC. Fortsätt med varsamhet.\n"
-
-#: pg_resetxlog.c:466
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control existerar men är trasig eller har okänd version. Den ignoreras.\n"
-
-#: pg_resetxlog.c:568
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Gissade värden för pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:570
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Nuvarande värden för pg_control:\n"
-"\n"
-
-# November 26th, 2014: Insert six additional space characters
-# for best alignment with Swedish translation.
-# Translations should be checked against those of pg_controldata.
-#: pg_resetxlog.c:579
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "Versionsnummer för pg_control:              %u\n"
-
-#: pg_resetxlog.c:581
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Katalogversion:                             %u\n"
-
-#: pg_resetxlog.c:583
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "Databasens systemidentifierare:             %s\n"
-
-#: pg_resetxlog.c:585
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "TimeLineID vid senaste kontrollpunkt:       %u\n"
-
-#: pg_resetxlog.c:587
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Senaste kontrollpunktens full_page_writes:  %s\n"
-
-#: pg_resetxlog.c:588
-msgid "off"
-msgstr "av"
-
-#: pg_resetxlog.c:588
-msgid "on"
-msgstr "på"
-
-#: pg_resetxlog.c:589
-#, c-format
-msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgstr "NextXID vid senaste kontrollpunkt:          %u/%u\n"
-
-#: pg_resetxlog.c:592
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "NextOID vid senaste kontrollpunkt:          %u\n"
-
-#: pg_resetxlog.c:594
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "NextMultiXactId vid senaste kontrollpunkt:  %u\n"
-
-#: pg_resetxlog.c:596
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "NextMultiOffset vid senaste kontrollpunkt:  %u\n"
-
-#: pg_resetxlog.c:598
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "oldestXID vid senaste kontrollpunkt:        %u\n"
-
-#: pg_resetxlog.c:600
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "DB för oldestXID vid senaste kontrollpunkt: %u\n"
-
-# FIXME: too wide
-#: pg_resetxlog.c:602
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "oldestActiveXID vid senaste kontrollpunkt:  %u\n"
-
-#: pg_resetxlog.c:604
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "oldestMultiXid vid senaste kontrollpunkt:   %u\n"
-
-#: pg_resetxlog.c:606
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB för oldestMulti vid senaste kontrollpkt: %u\n"
-
-#: pg_resetxlog.c:608
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "Maximal jämkning av data (alignment):       %u\n"
-
-#: pg_resetxlog.c:611
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "Databasens blockstorlek:                    %u\n"
-
-#: pg_resetxlog.c:613
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Block per segment i en stor relation:       %u\n"
-
-#: pg_resetxlog.c:615
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "Blockstorlek i transaktionsloggen:          %u\n"
-
-#: pg_resetxlog.c:617
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "Segmentstorlek i transaktionsloggen:        %u\n"
-
-#: pg_resetxlog.c:619
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "Maximal längd för identifierare:            %u\n"
-
-#: pg_resetxlog.c:621
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "Maximalt antal kolonner i ett index:        %u\n"
-
-#: pg_resetxlog.c:623
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "Maximal storlek för en TOAST-enhet:         %u\n"
-
-#: pg_resetxlog.c:625
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "Storlek för large-object-enheter:           %u\n"
-
-#: pg_resetxlog.c:627
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "Representation av dag och tid:              %s\n"
-
-#: pg_resetxlog.c:628
-msgid "64-bit integers"
-msgstr "64-bitars heltal"
-
-#: pg_resetxlog.c:628
-msgid "floating-point numbers"
-msgstr "flyttal"
-
-#: pg_resetxlog.c:629
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "Åtkomst till float4-argument:               %s\n"
-
-#: pg_resetxlog.c:630 pg_resetxlog.c:632
-msgid "by reference"
-msgstr "referens"
-
-#: pg_resetxlog.c:630 pg_resetxlog.c:632
-msgid "by value"
-msgstr "värdeåtkomst"
-
-#: pg_resetxlog.c:631
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "Åtkomst till float8-argument:               %s\n"
-
-#: pg_resetxlog.c:633
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "Checksummaversion för datasidor:            %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Värden att förändra:\n"
-"\n"
-
-# November 26th, 2014: Insert additional spacing to fit
-# with the first translated text, which uses most characters.
-#: pg_resetxlog.c:650
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "Första loggsegment efter återställning: %s\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "NextMultiXactId:                        %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "OldestMultiXid:                         %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "DB för OldestMulti:                     %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "NextMultiOffset:                        %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                                %u\n"
-
-#: pg_resetxlog.c:676
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                                %u\n"
-
-#: pg_resetxlog.c:678
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                              %u\n"
-
-#: pg_resetxlog.c:680
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "DB för OldestXID:                       %u\n"
-
-#: pg_resetxlog.c:686
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "Epok för NextXID:                       %u\n"
-
-
-#: pg_resetxlog.c:751
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: Internt fel: sizeof(ControlFileData) är alltför stor. Rätta till PG_CONTROL_SIZE.\n"
-
-#: pg_resetxlog.c:766
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: Kunde inte skapa fil för pg_control: %s\n"
-
-#: pg_resetxlog.c:777
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: Kunde inte skriva fil för pg_control: %s\n"
-
-#: pg_resetxlog.c:784 pg_resetxlog.c:1068
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: Misslyckad fsync: %s\n"
-
-#: pg_resetxlog.c:824 pg_resetxlog.c:890 pg_resetxlog.c:941
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: Kunde inte öppna filkatalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:855 pg_resetxlog.c:912 pg_resetxlog.c:964
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: Kunde inte läsa filkatalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:862 pg_resetxlog.c:919 pg_resetxlog.c:971
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: Kunde inte stänga filkatalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:903 pg_resetxlog.c:955
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: Kunde inte radera fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:1035
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: Kunde inte öppna fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:1046 pg_resetxlog.c:1060
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: Kunde inte skriva fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:1079
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s återställer transaktionslogg för PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1080
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Användning:\n"
-"  %s [FLAGGA]... DATAKATALOG\n"
-"\n"
-
-#: pg_resetxlog.c:1081
-#, c-format
-msgid "Options:\n"
-msgstr "Programväxlar:\n"
-
-#: pg_resetxlog.c:1082
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      sätter epok för nästa transaktions-ID\n"
-
-#: pg_resetxlog.c:1083
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               framtvinga återställning\n"
-
-#: pg_resetxlog.c:1084
-#, c-format
-msgid "  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"
-msgstr "  -l XLOGFIL       ny transaktionslogg måste vara detta namn eller ett senare\n"
-
-#: pg_resetxlog.c:1085
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID     sätt nästa och äldsta multitransaktions-ID\n"
-
-#: pg_resetxlog.c:1086
-#, c-format
-msgid "  -n               no update, just show what would be done (for testing)\n"
-msgstr "  -n               ingen updatering; visa planerade åtgärder (för testning)\n"
-
-#: pg_resetxlog.c:1087
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           sätt nästa OID\n"
-
-#: pg_resetxlog.c:1088
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        sätt nästa multitransaktionsoffset\n"
-
-#: pg_resetxlog.c:1089
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    visa versionsinformation, avsluta sedan\n"
-
-#: pg_resetxlog.c:1090
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           sätt nästa transaktions-ID\n"
-
-#: pg_resetxlog.c:1091
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       visa denna hjälp, avsluta sedan\n"
-
-#: pg_resetxlog.c:1092
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Reportera fel till <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/zh_CN.po b/src/bin/pg_resetxlog/po/zh_CN.po
deleted file mode 100644
index c199ac9..0000000
--- a/src/bin/pg_resetxlog/po/zh_CN.po
+++ /dev/null
@@ -1,661 +0,0 @@
-# simplified Chinese translation file for pg_resetxlog and friends
-# Bao Wei <weibao@forevertek.com>, 2002.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL 9.0)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-04-18 04:44+0000\n"
-"PO-Revision-Date: 2016-05-19 20:41+0800\n"
-"Last-Translator: Yuwei Peng <ywpeng@whu.edu.cn>\n"
-"Language-Team: Chinese (Simplified) <ywpeng@whu.edu.cn>\n"
-"Language: zh_CN\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.7\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: WARNING: 无法为该平台创建受限制的令牌\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s:无法打开进程令牌 (token): 错误码 %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: 无法分配SID: 错误码 %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: 无法创建受限令牌: 错误码为 %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: 无法为命令 \"%s\"创建进程: 错误码 %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: 无法使用受限令牌再次执行: 错误码 %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: 无法从子进程得到退出码: 错误码 %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s:：选项%s的参数无效\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "输入 \"%s --help\" 获取更多的信息.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: 事务ID epoch(-e) 不能为 -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: 事务 ID (-x) 不能为 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid ""
-"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s：事务ID (-c) 必须是0或者大于等于2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) 不能为 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s:  多事务 ID (-m) 不能为 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s:  最老的多事务 ID (-m) 不能为 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: 多事务 偏移 (-O) 不能为-1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: 命令行参数太多 (第一个是 \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: 没有指定数据目录\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s:不能由\"root\"执行\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "您现在作为PostgreSQL超级用户运行%s.\n"
-
-# command.c:256
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: 无法切换目录至 \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: 无法打开文件 \"%s\" 读取信息: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running?  If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: 锁文件 \"%s\" 已经存在\n"
-"是否有一个服务正在运行? 如果没有, 删除那个锁文件然后再试一次.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"如果这些值可接受, 用 -f 强制重置.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"数据库服务器没有彻底关闭.\n"
-"重置事务日志有可能会引起丢失数据.\n"
-"如果你仍想继续, 用 -f 强制重置.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "事务日志重置\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-"  touch %s\n"
-"and try again.\n"
-msgstr ""
-"如果你确定数据目录路径是正确的, 运行\n"
-"  touch %s\n"
-"然后再试一次.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: 无法读取文件 \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control 已经存在, 但有无效的CRC; 带有警告的继续运行\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control 已经存在, 但已破坏或无效版本; 忽略它\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"猜测的 pg_control 值:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"当前的 pg_control 值:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number:            %u\n"
-msgstr "pg_control 版本:                      %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number:               %u\n"
-msgstr "Catalog 版本:                         %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier:           %s\n"
-msgstr "数据库系统标识符:                     %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID:       %u\n"
-msgstr "最新检查点的 TimeLineID:              %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "最新检查点的full_page_writes: %s\n"
-
-# help.c:48
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "关闭"
-
-# help.c:48
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "开启"
-
-#: pg_resetxlog.c:649
-#, c-format
-#| msgid "Latest checkpoint's NextXID:          %u/%u\n"
-msgid "Latest checkpoint's NextXID:          %u:%u\n"
-msgstr "最新检查点的NextXID:          %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID:          %u\n"
-msgstr "最新检查点的 NextOID:                 %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId:  %u\n"
-msgstr "最新检查点的 NextMultiXactId:         %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset:  %u\n"
-msgstr "最新检查点的 NextMultiOffset:          %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID:        %u\n"
-msgstr "最新检查点的oldestXID:             %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB:   %u\n"
-msgstr "最新检查点的oldestXID所在的数据库: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID:  %u\n"
-msgstr "最新检查点的oldestActiveXID:      %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid:   %u\n"
-msgstr "最新检查点的oldestMultiXid:   %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "最新检查点的oldestMulti所在的数据库: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-#| msgid "Latest checkpoint's oldestCommitTs:   %u\n"
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "最新检查点的oldestCommitTsXid:%u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-#| msgid "Latest checkpoint's newestCommitTs:   %u\n"
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "最新检查点的newestCommitTsXid:%u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment:               %u\n"
-msgstr "最大的数据校准:                     %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size:                  %u\n"
-msgstr "数据库块大小:                         %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "大关系的每段块数:                     %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size:                       %u\n"
-msgstr "WAL块大小:                         %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment:                %u\n"
-msgstr "每一个 WAL 段字节数:                  %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers:        %u\n"
-msgstr "标示符的最大长度:                     %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index:          %u\n"
-msgstr "在索引中最多可用的列数:                   %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk:        %u\n"
-msgstr "一个TOAST区块的最大空间:                   %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk:         %u\n"
-msgstr "一个大对象区块的大小:     %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage:               %s\n"
-msgstr "日期/时间类型存储:                    %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64位整型"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "浮点数"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing:              %s\n"
-msgstr "正在传递Float4类型的参数:                    %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "由引用"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "由值"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing:              %s\n"
-msgstr "正在传递Float8类型的参数:                    %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version:           %u\n"
-msgstr "数据页检验和版本:        %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"将被改变的值:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset:        %s\n"
-msgstr "重置后的第一个日志段:        %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId:                      %u\n"
-msgstr "下一个MultiXactId值NextMultiXactId:         %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid:                       %u\n"
-msgstr "最老的MultiXid值OldestMultiXid:          %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB:                     %u\n"
-msgstr "最老的MultiXid对应的DB:     %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset:                      %u\n"
-msgstr "下一个偏移NextMultiOffset:           %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID:                              %u\n"
-msgstr "NextOID:                             %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID:                              %u\n"
-msgstr "NextXID:                              %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID:                            %u\n"
-msgstr "OldestXID:                            %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB:                       %u\n"
-msgstr "OldestXID's DB:                       %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch:                        %u\n"
-msgstr "NextXID 末端:                        %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-#| msgid "oldestCommitTs:                       %u\n"
-msgid "oldestCommitTsXid:                    %u\n"
-msgstr "oldestCommitTsXid：          %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-#| msgid "newestCommitTs:                       %u\n"
-msgid "newestCommitTsXid:                    %u\n"
-msgstr "newestCommitTsXid：          %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr "%s: 内部错误 -- sizeof(ControlFileData) 太大 ... 修复 xlog.c\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: 无法创建 pg_control 文件: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: 无法写 pg_control 文件: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync 错误: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: 无法打开目录 \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: 无法读取目录 \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: 无法关闭目录 \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: 无法删除文件 \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: 无法打开文件 \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: 无法写文件 \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s 重置 PostgreSQL 事务日志.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-"  %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"使用方法:\n"
-"  %s [选项]... 数据目录\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "选项:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid ""
-"  -c XID,XID       set oldest and newest transactions bearing commit "
-"timestamp\n"
-msgstr "  -c XID,XID       设置承受提交时间戳的最旧和最新事务\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid "                   (zero in either value means no change)\n"
-msgstr "                   （任一值中的零表示没有改变）\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR      data directory\n"
-msgstr " [-D] DATADIR      数据目录\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid "  -e XIDEPOCH      set next transaction ID epoch\n"
-msgstr "  -e XIDEPOCH      设置下一个事务ID时间单元（epoch）\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid "  -f               force update to be done\n"
-msgstr "  -f               强制更新\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid ""
-"  -l XLOGFILE      force minimum WAL starting location for new transaction "
-"log\n"
-msgstr "  -l XLOGFILE      为新的事务日志强制使用最小WAL日志起始位置\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid "  -m MXID,MXID     set next and oldest multitransaction ID\n"
-msgstr "  -m MXID,MXID    　设置下一个事务和最老的事务ID\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid ""
-"  -n               no update, just show what would be done (for testing)\n"
-msgstr "  -n               未更新, 只显示将要做什么 (测试用途)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid "  -o OID           set next OID\n"
-msgstr "  -o OID           设置下一个 OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid "  -O OFFSET        set next multitransaction offset\n"
-msgstr "  -O OFFSET        设置下一个多事务（multitransaction）偏移\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid "  -V, --version    output version information, then exit\n"
-msgstr "  -V, --version    输出版本信息，然后退出\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid "  -x XID           set next transaction ID\n"
-msgstr "  -x XID           设置下一个事务 ID\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid "  -?, --help       show this help, then exit\n"
-msgstr "  -?, --help       显示帮助信息，然后退出\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"报告错误至 <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s: 为 -x 选项的无效参数\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s: 为 -o 选项的无效参数\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s: 对于选项-m 参数无效\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s: 对于选项-O 参数无效\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s: 为 -l 选项的无效参数\n"
-
-#~ msgid "First log file ID after reset:        %u\n"
-#~ msgstr "重置后的第一个日志文件ID:               %u\n"
-
-#~ msgid "%s: invalid argument for -o option\n"
-#~ msgstr "%s: 为 -o 选项的无效参数\n"
-
-#~ msgid "%s: invalid argument for -x option\n"
-#~ msgstr "%s: 为 -x 选项的无效参数\n"
-
-#~ msgid "Latest checkpoint's StartUpID:        %u\n"
-#~ msgstr "最新检查点的 StartUpID:               %u\n"
-
-#~ msgid "Maximum number of function arguments: %u\n"
-#~ msgstr "函数参数的最大个数:                   %u\n"
-
-#~ msgid "%s: invalid LC_CTYPE setting\n"
-#~ msgstr "%s: 无效的 LC_CTYPE 设置\n"
-
-#~ msgid "%s: invalid LC_COLLATE setting\n"
-#~ msgstr "%s: 无效的 LC_COLLATE 设置\n"
-
-#~ msgid "  --version       output version information, then exit\n"
-#~ msgstr "  --version         输出版本信息, 然后退出\n"
-
-#~ msgid "  --help          show this help, then exit\n"
-#~ msgstr "  --help            显示此帮助信息, 然后退出\n"
-
-#~ msgid "%s: could not read from directory \"%s\": %s\n"
-#~ msgstr "%s: 无法从目录 \"%s\" 中读取: %s\n"
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index b9387ff..b075e26 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -18,16 +18,16 @@
  *
  * gets pg_control information in "ctrl". Assumes that bindir and
  * datadir are valid absolute paths to postgresql bin and pgdata
- * directories respectively *and* pg_resetxlog is version compatible
+ * directories respectively *and* pg_resetwal is version compatible
  * with datadir. The main purpose of this function is to get pg_control
  * data in a version independent manner.
  *
- * The approach taken here is to invoke pg_resetxlog with -n option
+ * The approach taken here is to invoke pg_resetwal with -n option
  * and then pipe its output. With little string parsing we get the
- * pg_control data.  pg_resetxlog cannot be run while the server is running
+ * pg_control data.  pg_resetwal cannot be run while the server is running
  * so we use pg_controldata;  pg_controldata doesn't provide all the fields
  * we need to actually perform the upgrade, but it provides enough for
- * check mode.  We do not implement pg_resetxlog -n because it is hard to
+ * check mode.  We do not implement pg_resetwal -n because it is hard to
  * return valid xid data for a running server.
  */
 void
@@ -73,7 +73,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
 
 
 	/*
-	 * Because we test the pg_resetxlog output as strings, it has to be in
+	 * Because we test the pg_resetwal output as strings, it has to be in
 	 * English.  Copied from pg_regress.c.
 	 */
 	if (getenv("LC_COLLATE"))
@@ -113,7 +113,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
 
 	snprintf(cmd, sizeof(cmd), "\"%s/%s \"%s\"",
 			 cluster->bindir,
-			 live_check ? "pg_controldata\"" : "pg_resetxlog\" -n",
+			 live_check ? "pg_controldata\"" : "pg_resetwal\" -n",
 			 cluster->pgdata);
 	fflush(stdout);
 	fflush(stderr);
@@ -139,7 +139,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
 			p = strchr(p, ':');
 
 			if (p == NULL || strlen(p) <= 1)
-				pg_fatal("%d: pg_resetxlog problem\n", __LINE__);
+				pg_fatal("%d: pg_resetwal problem\n", __LINE__);
 
 			p++;				/* remove ':' char */
 			cluster->controldata.ctrl_ver = str2uint(p);
@@ -440,7 +440,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
 	pg_free(lc_messages);
 
 	/*
-	 * Before 9.3, pg_resetxlog reported the xlogid and segno of the first log
+	 * Before 9.3, pg_resetwal reported the xlogid and segno of the first log
 	 * file after reset as separate lines. Starting with 9.3, it reports the
 	 * WAL file name. If the old cluster is older than 9.3, we construct the
 	 * WAL file name from the xlogid and segno.
diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c
index 3a30ea7..c74521f 100644
--- a/src/bin/pg_upgrade/exec.c
+++ b/src/bin/pg_upgrade/exec.c
@@ -335,7 +335,7 @@ check_bin_dir(ClusterInfo *cluster)
 
 	validate_exec(cluster->bindir, "postgres");
 	validate_exec(cluster->bindir, "pg_ctl");
-	validate_exec(cluster->bindir, "pg_resetxlog");
+	validate_exec(cluster->bindir, "pg_resetwal");
 	if (cluster == &new_cluster)
 	{
 		/* these are only needed in the new cluster */
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 797e36d..145d2da 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -147,7 +147,7 @@ main(int argc, char **argv)
 	 */
 	prep_status("Setting next OID for new cluster");
 	exec_prog(UTILITY_LOG_FILE, NULL, true,
-			  "\"%s/pg_resetxlog\" -o %u \"%s\"",
+			  "\"%s/pg_resetwal\" -o %u \"%s\"",
 			  new_cluster.bindir, old_cluster.controldata.chkpnt_nxtoid,
 			  new_cluster.pgdata);
 	check_ok();
@@ -408,16 +408,16 @@ copy_clog_xlog_xid(void)
 	/* set the next transaction id and epoch of the new cluster */
 	prep_status("Setting next transaction ID and epoch for new cluster");
 	exec_prog(UTILITY_LOG_FILE, NULL, true,
-			  "\"%s/pg_resetxlog\" -f -x %u \"%s\"",
+			  "\"%s/pg_resetwal\" -f -x %u \"%s\"",
 			  new_cluster.bindir, old_cluster.controldata.chkpnt_nxtxid,
 			  new_cluster.pgdata);
 	exec_prog(UTILITY_LOG_FILE, NULL, true,
-			  "\"%s/pg_resetxlog\" -f -e %u \"%s\"",
+			  "\"%s/pg_resetwal\" -f -e %u \"%s\"",
 			  new_cluster.bindir, old_cluster.controldata.chkpnt_nxtepoch,
 			  new_cluster.pgdata);
 	/* must reset commit timestamp limits also */
 	exec_prog(UTILITY_LOG_FILE, NULL, true,
-			  "\"%s/pg_resetxlog\" -f -c %u,%u \"%s\"",
+			  "\"%s/pg_resetwal\" -f -c %u,%u \"%s\"",
 			  new_cluster.bindir,
 			  old_cluster.controldata.chkpnt_nxtxid,
 			  old_cluster.controldata.chkpnt_nxtxid,
@@ -443,7 +443,7 @@ copy_clog_xlog_xid(void)
 		 * counters here and the oldest multi present on system.
 		 */
 		exec_prog(UTILITY_LOG_FILE, NULL, true,
-				  "\"%s/pg_resetxlog\" -O %u -m %u,%u \"%s\"",
+				  "\"%s/pg_resetwal\" -O %u -m %u,%u \"%s\"",
 				  new_cluster.bindir,
 				  old_cluster.controldata.chkpnt_nxtmxoff,
 				  old_cluster.controldata.chkpnt_nxtmulti,
@@ -471,7 +471,7 @@ copy_clog_xlog_xid(void)
 		 * next=MaxMultiXactId, but multixact.c can cope with that just fine.
 		 */
 		exec_prog(UTILITY_LOG_FILE, NULL, true,
-				  "\"%s/pg_resetxlog\" -m %u,%u \"%s\"",
+				  "\"%s/pg_resetwal\" -m %u,%u \"%s\"",
 				  new_cluster.bindir,
 				  old_cluster.controldata.chkpnt_nxtmulti + 1,
 				  old_cluster.controldata.chkpnt_nxtmulti,
@@ -483,7 +483,7 @@ copy_clog_xlog_xid(void)
 	prep_status("Resetting WAL archives");
 	exec_prog(UTILITY_LOG_FILE, NULL, true,
 	/* use timeline 1 to match controldata and no WAL history file */
-			  "\"%s/pg_resetxlog\" -l 00000001%s \"%s\"", new_cluster.bindir,
+			  "\"%s/pg_resetwal\" -l 00000001%s \"%s\"", new_cluster.bindir,
 			  old_cluster.controldata.nextxlogfile + 8,
 			  new_cluster.pgdata);
 	check_ok();
diff --git a/src/bin/pg_waldump/.gitignore b/src/bin/pg_waldump/.gitignore
new file mode 100644
index 0000000..0013a93
--- /dev/null
+++ b/src/bin/pg_waldump/.gitignore
@@ -0,0 +1,4 @@
+/pg_waldump
+# Source files copied from src/backend/access/rmgrdesc/
+/*desc.c
+/xlogreader.c
diff --git a/src/bin/pg_waldump/Makefile b/src/bin/pg_waldump/Makefile
new file mode 100644
index 0000000..f5957bd
--- /dev/null
+++ b/src/bin/pg_waldump/Makefile
@@ -0,0 +1,40 @@
+# src/bin/pg_waldump/Makefile
+
+PGFILEDESC = "pg_waldump - decode and display WAL"
+PGAPPICON=win32
+
+subdir = src/bin/pg_waldump
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+OBJS = pg_waldump.o compat.o xlogreader.o rmgrdesc.o \
+	$(RMGRDESCOBJS) $(WIN32RES)
+
+override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
+
+RMGRDESCSOURCES = $(sort $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)))
+RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
+
+
+all: pg_waldump
+
+pg_waldump: $(OBJS) | submake-libpgport
+	$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
+	rm -f $@ && $(LN_S) $< .
+
+$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/%
+	rm -f $@ && $(LN_S) $< .
+
+install: all installdirs
+	$(INSTALL_PROGRAM) pg_waldump$(X) '$(DESTDIR)$(bindir)/pg_waldump$(X)'
+
+installdirs:
+	$(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+	rm -f '$(DESTDIR)$(bindir)/pg_waldump$(X)'
+
+clean distclean maintainer-clean:
+	rm -f pg_waldump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c
diff --git a/src/bin/pg_waldump/compat.c b/src/bin/pg_waldump/compat.c
new file mode 100644
index 0000000..e9ceef5
--- /dev/null
+++ b/src/bin/pg_waldump/compat.c
@@ -0,0 +1,99 @@
+/*-------------------------------------------------------------------------
+ *
+ * compat.c
+ *		Reimplementations of various backend functions.
+ *
+ * Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		src/bin/pg_waldump/compat.c
+ *
+ * This file contains client-side implementations for various backend
+ * functions that the rm_desc functions in *desc.c files rely on.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* ugly hack, same as in e.g pg_controldata */
+#define FRONTEND 1
+#include "postgres.h"
+
+#include <time.h>
+
+#include "utils/datetime.h"
+#include "lib/stringinfo.h"
+
+/* copied from timestamp.c */
+pg_time_t
+timestamptz_to_time_t(TimestampTz t)
+{
+	pg_time_t	result;
+
+#ifdef HAVE_INT64_TIMESTAMP
+	result = (pg_time_t) (t / USECS_PER_SEC +
+				 ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
+#else
+	result = (pg_time_t) (t +
+				 ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
+#endif
+	return result;
+}
+
+/*
+ * Stopgap implementation of timestamptz_to_str that doesn't depend on backend
+ * infrastructure.  This will work for timestamps that are within the range
+ * of the platform time_t type.  (pg_time_t is compatible except for possibly
+ * being wider.)
+ *
+ * XXX the return value points to a static buffer, so beware of using more
+ * than one result value concurrently.
+ *
+ * XXX: The backend timestamp infrastructure should instead be split out and
+ * moved into src/common.  That's a large project though.
+ */
+const char *
+timestamptz_to_str(TimestampTz dt)
+{
+	static char buf[MAXDATELEN + 1];
+	char		ts[MAXDATELEN + 1];
+	char		zone[MAXDATELEN + 1];
+	time_t		result = (time_t) timestamptz_to_time_t(dt);
+	struct tm  *ltime = localtime(&result);
+
+	strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime);
+	strftime(zone, sizeof(zone), "%Z", ltime);
+
+#ifdef HAVE_INT64_TIMESTAMP
+	sprintf(buf, "%s.%06d %s", ts, (int) (dt % USECS_PER_SEC), zone);
+#else
+	sprintf(buf, "%s.%.6f %s", ts, fabs(dt - floor(dt)), zone);
+#endif
+
+	return buf;
+}
+
+/*
+ * Provide a hacked up compat layer for StringInfos so xlog desc functions can
+ * be linked/called.
+ */
+void
+appendStringInfo(StringInfo str, const char *fmt,...)
+{
+	va_list		args;
+
+	va_start(args, fmt);
+	vprintf(fmt, args);
+	va_end(args);
+}
+
+void
+appendStringInfoString(StringInfo str, const char *string)
+{
+	appendStringInfo(str, "%s", string);
+}
+
+void
+appendStringInfoChar(StringInfo str, char ch)
+{
+	appendStringInfo(str, "%c", ch);
+}
diff --git a/src/bin/pg_waldump/nls.mk b/src/bin/pg_waldump/nls.mk
new file mode 100644
index 0000000..52f06da
--- /dev/null
+++ b/src/bin/pg_waldump/nls.mk
@@ -0,0 +1,6 @@
+# src/bin/pg_waldump/nls.mk
+CATALOG_NAME     = pg_waldump
+AVAIL_LANGUAGES  =
+GETTEXT_FILES    = pg_waldump.c
+GETTEXT_TRIGGERS = fatal_error
+GETTEXT_FLAGS    = fatal_error:1:c-format
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
new file mode 100644
index 0000000..a7c9051
--- /dev/null
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -0,0 +1,1064 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_waldump.c - decode and display WAL
+ *
+ * Copyright (c) 2013-2017, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ *		  src/bin/pg_waldump/pg_waldump.c
+ *-------------------------------------------------------------------------
+ */
+
+#define FRONTEND 1
+#include "postgres.h"
+
+#include <dirent.h>
+#include <unistd.h>
+
+#include "access/xlogreader.h"
+#include "access/xlogrecord.h"
+#include "access/xlog_internal.h"
+#include "access/transam.h"
+#include "common/fe_memutils.h"
+#include "getopt_long.h"
+#include "rmgrdesc.h"
+
+
+static const char *progname;
+
+typedef struct XLogDumpPrivate
+{
+	TimeLineID	timeline;
+	char	   *inpath;
+	XLogRecPtr	startptr;
+	XLogRecPtr	endptr;
+	bool		endptr_reached;
+} XLogDumpPrivate;
+
+typedef struct XLogDumpConfig
+{
+	/* display options */
+	bool		bkp_details;
+	int			stop_after_records;
+	int			already_displayed_records;
+	bool		follow;
+	bool		stats;
+	bool		stats_per_record;
+
+	/* filter options */
+	int			filter_by_rmgr;
+	TransactionId filter_by_xid;
+	bool		filter_by_xid_enabled;
+} XLogDumpConfig;
+
+typedef struct Stats
+{
+	uint64		count;
+	uint64		rec_len;
+	uint64		fpi_len;
+} Stats;
+
+#define MAX_XLINFO_TYPES 16
+
+typedef struct XLogDumpStats
+{
+	uint64		count;
+	Stats		rmgr_stats[RM_NEXT_ID];
+	Stats		record_stats[RM_NEXT_ID][MAX_XLINFO_TYPES];
+} XLogDumpStats;
+
+static void fatal_error(const char *fmt,...) pg_attribute_printf(1, 2);
+
+/*
+ * Big red button to push when things go horribly wrong.
+ */
+static void
+fatal_error(const char *fmt,...)
+{
+	va_list		args;
+
+	fflush(stdout);
+
+	fprintf(stderr, _("%s: FATAL:  "), progname);
+	va_start(args, fmt);
+	vfprintf(stderr, _(fmt), args);
+	va_end(args);
+	fputc('\n', stderr);
+
+	exit(EXIT_FAILURE);
+}
+
+static void
+print_rmgr_list(void)
+{
+	int			i;
+
+	for (i = 0; i <= RM_MAX_ID; i++)
+	{
+		printf("%s\n", RmgrDescTable[i].rm_name);
+	}
+}
+
+/*
+ * Check whether directory exists and whether we can open it. Keep errno set so
+ * that the caller can report errors somewhat more accurately.
+ */
+static bool
+verify_directory(const char *directory)
+{
+	DIR		   *dir = opendir(directory);
+
+	if (dir == NULL)
+		return false;
+	closedir(dir);
+	return true;
+}
+
+/*
+ * Split a pathname as dirname(1) and basename(1) would.
+ *
+ * XXX this probably doesn't do very well on Windows.  We probably need to
+ * apply canonicalize_path(), at the very least.
+ */
+static void
+split_path(const char *path, char **dir, char **fname)
+{
+	char	   *sep;
+
+	/* split filepath into directory & filename */
+	sep = strrchr(path, '/');
+
+	/* directory path */
+	if (sep != NULL)
+	{
+		*dir = pg_strdup(path);
+		(*dir)[(sep - path) + 1] = '\0';		/* no strndup */
+		*fname = pg_strdup(sep + 1);
+	}
+	/* local directory */
+	else
+	{
+		*dir = NULL;
+		*fname = pg_strdup(path);
+	}
+}
+
+/*
+ * Try to find the file in several places:
+ * if directory == NULL:
+ *	 fname
+ *	 XLOGDIR / fname
+ *	 $PGDATA / XLOGDIR / fname
+ * else
+ *	 directory / fname
+ *	 directory / XLOGDIR / fname
+ *
+ * return a read only fd
+ */
+static int
+fuzzy_open_file(const char *directory, const char *fname)
+{
+	int			fd = -1;
+	char		fpath[MAXPGPATH];
+
+	if (directory == NULL)
+	{
+		const char *datadir;
+
+		/* fname */
+		fd = open(fname, O_RDONLY | PG_BINARY, 0);
+		if (fd < 0 && errno != ENOENT)
+			return -1;
+		else if (fd >= 0)
+			return fd;
+
+		/* XLOGDIR / fname */
+		snprintf(fpath, MAXPGPATH, "%s/%s",
+				 XLOGDIR, fname);
+		fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+		if (fd < 0 && errno != ENOENT)
+			return -1;
+		else if (fd >= 0)
+			return fd;
+
+		datadir = getenv("PGDATA");
+		/* $PGDATA / XLOGDIR / fname */
+		if (datadir != NULL)
+		{
+			snprintf(fpath, MAXPGPATH, "%s/%s/%s",
+					 datadir, XLOGDIR, fname);
+			fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+			if (fd < 0 && errno != ENOENT)
+				return -1;
+			else if (fd >= 0)
+				return fd;
+		}
+	}
+	else
+	{
+		/* directory / fname */
+		snprintf(fpath, MAXPGPATH, "%s/%s",
+				 directory, fname);
+		fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+		if (fd < 0 && errno != ENOENT)
+			return -1;
+		else if (fd >= 0)
+			return fd;
+
+		/* directory / XLOGDIR / fname */
+		snprintf(fpath, MAXPGPATH, "%s/%s/%s",
+				 directory, XLOGDIR, fname);
+		fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+		if (fd < 0 && errno != ENOENT)
+			return -1;
+		else if (fd >= 0)
+			return fd;
+	}
+	return -1;
+}
+
+/*
+ * Read count bytes from a segment file in the specified directory, for the
+ * given timeline, containing the specified record pointer; store the data in
+ * the passed buffer.
+ */
+static void
+XLogDumpXLogRead(const char *directory, TimeLineID timeline_id,
+				 XLogRecPtr startptr, char *buf, Size count)
+{
+	char	   *p;
+	XLogRecPtr	recptr;
+	Size		nbytes;
+
+	static int	sendFile = -1;
+	static XLogSegNo sendSegNo = 0;
+	static uint32 sendOff = 0;
+
+	p = buf;
+	recptr = startptr;
+	nbytes = count;
+
+	while (nbytes > 0)
+	{
+		uint32		startoff;
+		int			segbytes;
+		int			readbytes;
+
+		startoff = recptr % XLogSegSize;
+
+		if (sendFile < 0 || !XLByteInSeg(recptr, sendSegNo))
+		{
+			char		fname[MAXFNAMELEN];
+			int			tries;
+
+			/* Switch to another logfile segment */
+			if (sendFile >= 0)
+				close(sendFile);
+
+			XLByteToSeg(recptr, sendSegNo);
+
+			XLogFileName(fname, timeline_id, sendSegNo);
+
+			/*
+			 * In follow mode there is a short period of time after the
+			 * server has written the end of the previous file before the
+			 * new file is available. So we loop for 5 seconds looking
+			 * for the file to appear before giving up.
+			 */
+			for (tries = 0; tries < 10; tries++)
+			{
+				sendFile = fuzzy_open_file(directory, fname);
+				if (sendFile >= 0)
+					break;
+				if (errno == ENOENT)
+				{
+					int			save_errno = errno;
+
+					/* File not there yet, try again */
+					pg_usleep(500 * 1000);
+
+					errno = save_errno;
+					continue;
+				}
+				/* Any other error, fall through and fail */
+				break;
+			}
+
+			if (sendFile < 0)
+				fatal_error("could not find file \"%s\": %s",
+							fname, strerror(errno));
+			sendOff = 0;
+		}
+
+		/* Need to seek in the file? */
+		if (sendOff != startoff)
+		{
+			if (lseek(sendFile, (off_t) startoff, SEEK_SET) < 0)
+			{
+				int			err = errno;
+				char		fname[MAXPGPATH];
+
+				XLogFileName(fname, timeline_id, sendSegNo);
+
+				fatal_error("could not seek in log segment %s to offset %u: %s",
+							fname, startoff, strerror(err));
+			}
+			sendOff = startoff;
+		}
+
+		/* How many bytes are within this segment? */
+		if (nbytes > (XLogSegSize - startoff))
+			segbytes = XLogSegSize - startoff;
+		else
+			segbytes = nbytes;
+
+		readbytes = read(sendFile, p, segbytes);
+		if (readbytes <= 0)
+		{
+			int			err = errno;
+			char		fname[MAXPGPATH];
+
+			XLogFileName(fname, timeline_id, sendSegNo);
+
+			fatal_error("could not read from log segment %s, offset %d, length %d: %s",
+						fname, sendOff, segbytes, strerror(err));
+		}
+
+		/* Update state for read */
+		recptr += readbytes;
+
+		sendOff += readbytes;
+		nbytes -= readbytes;
+		p += readbytes;
+	}
+}
+
+/*
+ * XLogReader read_page callback
+ */
+static int
+XLogDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
+				 XLogRecPtr targetPtr, char *readBuff, TimeLineID *curFileTLI)
+{
+	XLogDumpPrivate *private = state->private_data;
+	int			count = XLOG_BLCKSZ;
+
+	if (private->endptr != InvalidXLogRecPtr)
+	{
+		if (targetPagePtr + XLOG_BLCKSZ <= private->endptr)
+			count = XLOG_BLCKSZ;
+		else if (targetPagePtr + reqLen <= private->endptr)
+			count = private->endptr - targetPagePtr;
+		else
+		{
+			private->endptr_reached = true;
+			return -1;
+		}
+	}
+
+	XLogDumpXLogRead(private->inpath, private->timeline, targetPagePtr,
+					 readBuff, count);
+
+	return count;
+}
+
+/*
+ * Store per-rmgr and per-record statistics for a given record.
+ */
+static void
+XLogDumpCountRecord(XLogDumpConfig *config, XLogDumpStats *stats,
+					XLogReaderState *record)
+{
+	RmgrId		rmid;
+	uint8		recid;
+	uint32		rec_len;
+	uint32		fpi_len;
+	int			block_id;
+
+	stats->count++;
+
+	rmid = XLogRecGetRmid(record);
+	rec_len = XLogRecGetDataLen(record) + SizeOfXLogRecord;
+
+	/*
+	 * Calculate the amount of FPI data in the record.
+	 *
+	 * XXX: We peek into xlogreader's private decoded backup blocks for the
+	 * bimg_len indicating the length of FPI data. It doesn't seem worth it to
+	 * add an accessor macro for this.
+	 */
+	fpi_len = 0;
+	for (block_id = 0; block_id <= record->max_block_id; block_id++)
+	{
+		if (XLogRecHasBlockImage(record, block_id))
+			fpi_len += record->blocks[block_id].bimg_len;
+	}
+
+	/* Update per-rmgr statistics */
+
+	stats->rmgr_stats[rmid].count++;
+	stats->rmgr_stats[rmid].rec_len += rec_len;
+	stats->rmgr_stats[rmid].fpi_len += fpi_len;
+
+	/*
+	 * Update per-record statistics, where the record is identified by a
+	 * combination of the RmgrId and the four bits of the xl_info field that
+	 * are the rmgr's domain (resulting in sixteen possible entries per
+	 * RmgrId).
+	 */
+
+	recid = XLogRecGetInfo(record) >> 4;
+
+	stats->record_stats[rmid][recid].count++;
+	stats->record_stats[rmid][recid].rec_len += rec_len;
+	stats->record_stats[rmid][recid].fpi_len += fpi_len;
+}
+
+/*
+ * Print a record to stdout
+ */
+static void
+XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
+{
+	const char *id;
+	const RmgrDescData *desc = &RmgrDescTable[XLogRecGetRmid(record)];
+	RelFileNode rnode;
+	ForkNumber	forknum;
+	BlockNumber blk;
+	int			block_id;
+	uint8		info = XLogRecGetInfo(record);
+	XLogRecPtr	xl_prev = XLogRecGetPrev(record);
+
+	id = desc->rm_identify(info);
+	if (id == NULL)
+		id = psprintf("UNKNOWN (%x)", info & ~XLR_INFO_MASK);
+
+	printf("rmgr: %-11s len (rec/tot): %6u/%6u, tx: %10u, lsn: %X/%08X, prev %X/%08X, ",
+		   desc->rm_name,
+		   XLogRecGetDataLen(record), XLogRecGetTotalLen(record),
+		   XLogRecGetXid(record),
+		   (uint32) (record->ReadRecPtr >> 32), (uint32) record->ReadRecPtr,
+		   (uint32) (xl_prev >> 32), (uint32) xl_prev);
+	printf("desc: %s ", id);
+
+	/* the desc routine will printf the description directly to stdout */
+	desc->rm_desc(NULL, record);
+
+	if (!config->bkp_details)
+	{
+		/* print block references (short format) */
+		for (block_id = 0; block_id <= record->max_block_id; block_id++)
+		{
+			if (!XLogRecHasBlockRef(record, block_id))
+				continue;
+
+			XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
+			if (forknum != MAIN_FORKNUM)
+				printf(", blkref #%u: rel %u/%u/%u fork %s blk %u",
+					   block_id,
+					   rnode.spcNode, rnode.dbNode, rnode.relNode,
+					   forkNames[forknum],
+					   blk);
+			else
+				printf(", blkref #%u: rel %u/%u/%u blk %u",
+					   block_id,
+					   rnode.spcNode, rnode.dbNode, rnode.relNode,
+					   blk);
+			if (XLogRecHasBlockImage(record, block_id))
+				printf(" FPW");
+		}
+		putchar('\n');
+	}
+	else
+	{
+		/* print block references (detailed format) */
+		putchar('\n');
+		for (block_id = 0; block_id <= record->max_block_id; block_id++)
+		{
+			if (!XLogRecHasBlockRef(record, block_id))
+				continue;
+
+			XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
+			printf("\tblkref #%u: rel %u/%u/%u fork %s blk %u",
+				   block_id,
+				   rnode.spcNode, rnode.dbNode, rnode.relNode,
+				   forkNames[forknum],
+				   blk);
+			if (XLogRecHasBlockImage(record, block_id))
+			{
+				if (record->blocks[block_id].bimg_info &
+					BKPIMAGE_IS_COMPRESSED)
+				{
+					printf(" (FPW); hole: offset: %u, length: %u, compression saved: %u\n",
+						   record->blocks[block_id].hole_offset,
+						   record->blocks[block_id].hole_length,
+						   BLCKSZ -
+						   record->blocks[block_id].hole_length -
+						   record->blocks[block_id].bimg_len);
+				}
+				else
+				{
+					printf(" (FPW); hole: offset: %u, length: %u\n",
+						   record->blocks[block_id].hole_offset,
+						   record->blocks[block_id].hole_length);
+				}
+			}
+			putchar('\n');
+		}
+	}
+}
+
+/*
+ * Display a single row of record counts and sizes for an rmgr or record.
+ */
+static void
+XLogDumpStatsRow(const char *name,
+				 uint64 n, uint64 total_count,
+				 uint64 rec_len, uint64 total_rec_len,
+				 uint64 fpi_len, uint64 total_fpi_len,
+				 uint64 tot_len, uint64 total_len)
+{
+	double		n_pct,
+				rec_len_pct,
+				fpi_len_pct,
+				tot_len_pct;
+
+	n_pct = 0;
+	if (total_count != 0)
+		n_pct = 100 * (double) n / total_count;
+
+	rec_len_pct = 0;
+	if (total_rec_len != 0)
+		rec_len_pct = 100 * (double) rec_len / total_rec_len;
+
+	fpi_len_pct = 0;
+	if (total_fpi_len != 0)
+		fpi_len_pct = 100 * (double) fpi_len / total_fpi_len;
+
+	tot_len_pct = 0;
+	if (total_len != 0)
+		tot_len_pct = 100 * (double) tot_len / total_len;
+
+	printf("%-27s "
+		   "%20" INT64_MODIFIER "u (%6.02f) "
+		   "%20" INT64_MODIFIER "u (%6.02f) "
+		   "%20" INT64_MODIFIER "u (%6.02f) "
+		   "%20" INT64_MODIFIER "u (%6.02f)\n",
+		   name, n, n_pct, rec_len, rec_len_pct, fpi_len, fpi_len_pct,
+		   tot_len, tot_len_pct);
+}
+
+
+/*
+ * Display summary statistics about the records seen so far.
+ */
+static void
+XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
+{
+	int			ri,
+				rj;
+	uint64		total_count = 0;
+	uint64		total_rec_len = 0;
+	uint64		total_fpi_len = 0;
+	uint64		total_len = 0;
+	double		rec_len_pct,
+				fpi_len_pct;
+
+	/* ---
+	 * Make a first pass to calculate column totals:
+	 * count(*),
+	 * sum(xl_len+SizeOfXLogRecord),
+	 * sum(xl_tot_len-xl_len-SizeOfXLogRecord), and
+	 * sum(xl_tot_len).
+	 * These are used to calculate percentages for each record type.
+	 * ---
+	 */
+
+	for (ri = 0; ri < RM_NEXT_ID; ri++)
+	{
+		total_count += stats->rmgr_stats[ri].count;
+		total_rec_len += stats->rmgr_stats[ri].rec_len;
+		total_fpi_len += stats->rmgr_stats[ri].fpi_len;
+	}
+	total_len = total_rec_len + total_fpi_len;
+
+	/*
+	 * 27 is strlen("Transaction/COMMIT_PREPARED"), 20 is strlen(2^64), 8 is
+	 * strlen("(100.00%)")
+	 */
+
+	printf("%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n"
+		   "%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n",
+		   "Type", "N", "(%)", "Record size", "(%)", "FPI size", "(%)", "Combined size", "(%)",
+		   "----", "-", "---", "-----------", "---", "--------", "---", "-------------", "---");
+
+	for (ri = 0; ri < RM_NEXT_ID; ri++)
+	{
+		uint64		count,
+					rec_len,
+					fpi_len,
+					tot_len;
+		const RmgrDescData *desc = &RmgrDescTable[ri];
+
+		if (!config->stats_per_record)
+		{
+			count = stats->rmgr_stats[ri].count;
+			rec_len = stats->rmgr_stats[ri].rec_len;
+			fpi_len = stats->rmgr_stats[ri].fpi_len;
+			tot_len = rec_len + fpi_len;
+
+			XLogDumpStatsRow(desc->rm_name,
+							 count, total_count, rec_len, total_rec_len,
+							 fpi_len, total_fpi_len, tot_len, total_len);
+		}
+		else
+		{
+			for (rj = 0; rj < MAX_XLINFO_TYPES; rj++)
+			{
+				const char *id;
+
+				count = stats->record_stats[ri][rj].count;
+				rec_len = stats->record_stats[ri][rj].rec_len;
+				fpi_len = stats->record_stats[ri][rj].fpi_len;
+				tot_len = rec_len + fpi_len;
+
+				/* Skip undefined combinations and ones that didn't occur */
+				if (count == 0)
+					continue;
+
+				/* the upper four bits in xl_info are the rmgr's */
+				id = desc->rm_identify(rj << 4);
+				if (id == NULL)
+					id = psprintf("UNKNOWN (%x)", rj << 4);
+
+				XLogDumpStatsRow(psprintf("%s/%s", desc->rm_name, id),
+								 count, total_count, rec_len, total_rec_len,
+								 fpi_len, total_fpi_len, tot_len, total_len);
+			}
+		}
+	}
+
+	printf("%-27s %20s %8s %20s %8s %20s %8s %20s\n",
+		   "", "--------", "", "--------", "", "--------", "", "--------");
+
+	/*
+	 * The percentages in earlier rows were calculated against the column
+	 * total, but the ones that follow are against the row total. Note that
+	 * these are displayed with a % symbol to differentiate them from the
+	 * earlier ones, and are thus up to 9 characters long.
+	 */
+
+	rec_len_pct = 0;
+	if (total_len != 0)
+		rec_len_pct = 100 * (double) total_rec_len / total_len;
+
+	fpi_len_pct = 0;
+	if (total_len != 0)
+		fpi_len_pct = 100 * (double) total_fpi_len / total_len;
+
+	printf("%-27s "
+		   "%20" INT64_MODIFIER "u %-9s"
+		   "%20" INT64_MODIFIER "u %-9s"
+		   "%20" INT64_MODIFIER "u %-9s"
+		   "%20" INT64_MODIFIER "u %-6s\n",
+		   "Total", stats->count, "",
+		   total_rec_len, psprintf("[%.02f%%]", rec_len_pct),
+		   total_fpi_len, psprintf("[%.02f%%]", fpi_len_pct),
+		   total_len, "[100%]");
+}
+
+static void
+usage(void)
+{
+	printf(_("%s decodes and displays PostgreSQL transaction logs for debugging.\n\n"),
+		   progname);
+	printf(_("Usage:\n"));
+	printf(_("  %s [OPTION]... [STARTSEG [ENDSEG]] \n"), progname);
+	printf(_("\nOptions:\n"));
+	printf(_("  -b, --bkp-details      output detailed information about backup blocks\n"));
+	printf(_("  -e, --end=RECPTR       stop reading at log position RECPTR\n"));
+	printf(_("  -f, --follow           keep retrying after reaching end of WAL\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"
+			 "                         directory with a ./pg_wal that contains such files\n"
+			 "                         (default: current directory, ./pg_wal, PGDATA/pg_wal)\n"));
+	printf(_("  -r, --rmgr=RMGR        only show records generated by resource manager RMGR\n"
+			 "                         use --rmgr=list to list valid resource manager names\n"));
+	printf(_("  -s, --start=RECPTR     start reading at log position RECPTR\n"));
+	printf(_("  -t, --timeline=TLI     timeline from which to read log records\n"
+			 "                         (default: 1 or the value used in STARTSEG)\n"));
+	printf(_("  -V, --version          output version information, then exit\n"));
+	printf(_("  -x, --xid=XID          only show records with TransactionId XID\n"));
+	printf(_("  -z, --stats[=record]   show statistics instead of records\n"
+			 "                         (optionally, show per-record statistics)\n"));
+	printf(_("  -?, --help             show this help, then exit\n"));
+}
+
+int
+main(int argc, char **argv)
+{
+	uint32		xlogid;
+	uint32		xrecoff;
+	XLogReaderState *xlogreader_state;
+	XLogDumpPrivate private;
+	XLogDumpConfig config;
+	XLogDumpStats stats;
+	XLogRecord *record;
+	XLogRecPtr	first_record;
+	char	   *errormsg;
+
+	static struct option long_options[] = {
+		{"bkp-details", no_argument, NULL, 'b'},
+		{"end", required_argument, NULL, 'e'},
+		{"follow", no_argument, NULL, 'f'},
+		{"help", no_argument, NULL, '?'},
+		{"limit", required_argument, NULL, 'n'},
+		{"path", required_argument, NULL, 'p'},
+		{"rmgr", required_argument, NULL, 'r'},
+		{"start", required_argument, NULL, 's'},
+		{"timeline", required_argument, NULL, 't'},
+		{"xid", required_argument, NULL, 'x'},
+		{"version", no_argument, NULL, 'V'},
+		{"stats", optional_argument, NULL, 'z'},
+		{NULL, 0, NULL, 0}
+	};
+
+	int			option;
+	int			optindex = 0;
+
+	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_waldump"));
+	progname = get_progname(argv[0]);
+
+	memset(&private, 0, sizeof(XLogDumpPrivate));
+	memset(&config, 0, sizeof(XLogDumpConfig));
+	memset(&stats, 0, sizeof(XLogDumpStats));
+
+	private.timeline = 1;
+	private.startptr = InvalidXLogRecPtr;
+	private.endptr = InvalidXLogRecPtr;
+	private.endptr_reached = false;
+
+	config.bkp_details = false;
+	config.stop_after_records = -1;
+	config.already_displayed_records = 0;
+	config.follow = false;
+	config.filter_by_rmgr = -1;
+	config.filter_by_xid = InvalidTransactionId;
+	config.filter_by_xid_enabled = false;
+	config.stats = false;
+	config.stats_per_record = false;
+
+	if (argc <= 1)
+	{
+		fprintf(stderr, _("%s: no arguments specified\n"), progname);
+		goto bad_argument;
+	}
+
+	while ((option = getopt_long(argc, argv, "be:?fn:p:r:s:t:Vx:z",
+								 long_options, &optindex)) != -1)
+	{
+		switch (option)
+		{
+			case 'b':
+				config.bkp_details = true;
+				break;
+			case 'e':
+				if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
+				{
+					fprintf(stderr, _("%s: could not parse end log position \"%s\"\n"),
+							progname, optarg);
+					goto bad_argument;
+				}
+				private.endptr = (uint64) xlogid << 32 | xrecoff;
+				break;
+			case 'f':
+				config.follow = true;
+				break;
+			case '?':
+				usage();
+				exit(EXIT_SUCCESS);
+				break;
+			case 'n':
+				if (sscanf(optarg, "%d", &config.stop_after_records) != 1)
+				{
+					fprintf(stderr, _("%s: could not parse limit \"%s\"\n"),
+							progname, optarg);
+					goto bad_argument;
+				}
+				break;
+			case 'p':
+				private.inpath = pg_strdup(optarg);
+				break;
+			case 'r':
+				{
+					int			i;
+
+					if (pg_strcasecmp(optarg, "list") == 0)
+					{
+						print_rmgr_list();
+						exit(EXIT_SUCCESS);
+					}
+
+					for (i = 0; i <= RM_MAX_ID; i++)
+					{
+						if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
+						{
+							config.filter_by_rmgr = i;
+							break;
+						}
+					}
+
+					if (config.filter_by_rmgr == -1)
+					{
+						fprintf(stderr, _("%s: resource manager \"%s\" does not exist\n"),
+								progname, optarg);
+						goto bad_argument;
+					}
+				}
+				break;
+			case 's':
+				if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
+				{
+					fprintf(stderr, _("%s: could not parse start log position \"%s\"\n"),
+							progname, optarg);
+					goto bad_argument;
+				}
+				else
+					private.startptr = (uint64) xlogid << 32 | xrecoff;
+				break;
+			case 't':
+				if (sscanf(optarg, "%d", &private.timeline) != 1)
+				{
+					fprintf(stderr, _("%s: could not parse timeline \"%s\"\n"),
+							progname, optarg);
+					goto bad_argument;
+				}
+				break;
+			case 'V':
+				puts("pg_waldump (PostgreSQL) " PG_VERSION);
+				exit(EXIT_SUCCESS);
+				break;
+			case 'x':
+				if (sscanf(optarg, "%u", &config.filter_by_xid) != 1)
+				{
+					fprintf(stderr, _("%s: could not parse \"%s\" as a valid xid\n"),
+							progname, optarg);
+					goto bad_argument;
+				}
+				config.filter_by_xid_enabled = true;
+				break;
+			case 'z':
+				config.stats = true;
+				config.stats_per_record = false;
+				if (optarg)
+				{
+					if (strcmp(optarg, "record") == 0)
+						config.stats_per_record = true;
+					else if (strcmp(optarg, "rmgr") != 0)
+					{
+						fprintf(stderr, _("%s: unrecognised argument to --stats: %s\n"),
+								progname, optarg);
+						goto bad_argument;
+					}
+				}
+				break;
+			default:
+				goto bad_argument;
+		}
+	}
+
+	if ((optind + 2) < argc)
+	{
+		fprintf(stderr,
+				_("%s: too many command-line arguments (first is \"%s\")\n"),
+				progname, argv[optind + 2]);
+		goto bad_argument;
+	}
+
+	if (private.inpath != NULL)
+	{
+		/* validate path points to directory */
+		if (!verify_directory(private.inpath))
+		{
+			fprintf(stderr,
+					_("%s: path \"%s\" cannot be opened: %s\n"),
+					progname, private.inpath, strerror(errno));
+			goto bad_argument;
+		}
+	}
+
+	/* parse files as start/end boundaries, extract path if not specified */
+	if (optind < argc)
+	{
+		char	   *directory = NULL;
+		char	   *fname = NULL;
+		int			fd;
+		XLogSegNo	segno;
+
+		split_path(argv[optind], &directory, &fname);
+
+		if (private.inpath == NULL && directory != NULL)
+		{
+			private.inpath = directory;
+
+			if (!verify_directory(private.inpath))
+				fatal_error("cannot open directory \"%s\": %s",
+							private.inpath, strerror(errno));
+		}
+
+		fd = fuzzy_open_file(private.inpath, fname);
+		if (fd < 0)
+			fatal_error("could not open file \"%s\"", fname);
+		close(fd);
+
+		/* parse position from file */
+		XLogFromFileName(fname, &private.timeline, &segno);
+
+		if (XLogRecPtrIsInvalid(private.startptr))
+			XLogSegNoOffsetToRecPtr(segno, 0, private.startptr);
+		else if (!XLByteInSeg(private.startptr, segno))
+		{
+			fprintf(stderr,
+					_("%s: start log position %X/%X is not inside file \"%s\"\n"),
+					progname,
+					(uint32) (private.startptr >> 32),
+					(uint32) private.startptr,
+					fname);
+			goto bad_argument;
+		}
+
+		/* no second file specified, set end position */
+		if (!(optind + 1 < argc) && XLogRecPtrIsInvalid(private.endptr))
+			XLogSegNoOffsetToRecPtr(segno + 1, 0, private.endptr);
+
+		/* parse ENDSEG if passed */
+		if (optind + 1 < argc)
+		{
+			XLogSegNo	endsegno;
+
+			/* ignore directory, already have that */
+			split_path(argv[optind + 1], &directory, &fname);
+
+			fd = fuzzy_open_file(private.inpath, fname);
+			if (fd < 0)
+				fatal_error("could not open file \"%s\"", fname);
+			close(fd);
+
+			/* parse position from file */
+			XLogFromFileName(fname, &private.timeline, &endsegno);
+
+			if (endsegno < segno)
+				fatal_error("ENDSEG %s is before STARTSEG %s",
+							argv[optind + 1], argv[optind]);
+
+			if (XLogRecPtrIsInvalid(private.endptr))
+				XLogSegNoOffsetToRecPtr(endsegno + 1, 0, private.endptr);
+
+			/* set segno to endsegno for check of --end */
+			segno = endsegno;
+		}
+
+
+		if (!XLByteInSeg(private.endptr, segno) &&
+			private.endptr != (segno + 1) * XLogSegSize)
+		{
+			fprintf(stderr,
+					_("%s: end log position %X/%X is not inside file \"%s\"\n"),
+					progname,
+					(uint32) (private.endptr >> 32),
+					(uint32) private.endptr,
+					argv[argc - 1]);
+			goto bad_argument;
+		}
+	}
+
+	/* we don't know what to print */
+	if (XLogRecPtrIsInvalid(private.startptr))
+	{
+		fprintf(stderr, _("%s: no start log position given.\n"), progname);
+		goto bad_argument;
+	}
+
+	/* done with argument parsing, do the actual work */
+
+	/* we have everything we need, start reading */
+	xlogreader_state = XLogReaderAllocate(XLogDumpReadPage, &private);
+	if (!xlogreader_state)
+		fatal_error("out of memory");
+
+	/* first find a valid recptr to start from */
+	first_record = XLogFindNextRecord(xlogreader_state, private.startptr);
+
+	if (first_record == InvalidXLogRecPtr)
+		fatal_error("could not find a valid record after %X/%X",
+					(uint32) (private.startptr >> 32),
+					(uint32) private.startptr);
+
+	/*
+	 * Display a message that we're skipping data if `from` wasn't a pointer
+	 * to the start of a record and also wasn't a pointer to the beginning of
+	 * a segment (e.g. we were used in file mode).
+	 */
+	if (first_record != private.startptr && (private.startptr % XLogSegSize) != 0)
+		printf(_("first record is after %X/%X, at %X/%X, skipping over %u bytes\n"),
+			   (uint32) (private.startptr >> 32), (uint32) private.startptr,
+			   (uint32) (first_record >> 32), (uint32) first_record,
+			   (uint32) (first_record - private.startptr));
+
+	for (;;)
+	{
+		/* try to read the next record */
+		record = XLogReadRecord(xlogreader_state, first_record, &errormsg);
+		if (!record)
+		{
+			if (!config.follow || private.endptr_reached)
+				break;
+			else
+			{
+				pg_usleep(1000000L);	/* 1 second */
+				continue;
+			}
+		}
+
+		/* after reading the first record, continue at next one */
+		first_record = InvalidXLogRecPtr;
+
+		/* apply all specified filters */
+		if (config.filter_by_rmgr != -1 &&
+			config.filter_by_rmgr != record->xl_rmid)
+			continue;
+
+		if (config.filter_by_xid_enabled &&
+			config.filter_by_xid != record->xl_xid)
+			continue;
+
+		/* process the record */
+		if (config.stats == true)
+			XLogDumpCountRecord(&config, &stats, xlogreader_state);
+		else
+			XLogDumpDisplayRecord(&config, xlogreader_state);
+
+		/* check whether we printed enough */
+		config.already_displayed_records++;
+		if (config.stop_after_records > 0 &&
+			config.already_displayed_records >= config.stop_after_records)
+			break;
+	}
+
+	if (config.stats == true)
+		XLogDumpDisplayStats(&config, &stats);
+
+	if (errormsg)
+		fatal_error("error in WAL record at %X/%X: %s\n",
+					(uint32) (xlogreader_state->ReadRecPtr >> 32),
+					(uint32) xlogreader_state->ReadRecPtr,
+					errormsg);
+
+	XLogReaderFree(xlogreader_state);
+
+	return EXIT_SUCCESS;
+
+bad_argument:
+	fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+	return EXIT_FAILURE;
+}
diff --git a/src/bin/pg_waldump/rmgrdesc.c b/src/bin/pg_waldump/rmgrdesc.c
new file mode 100644
index 0000000..506bf97
--- /dev/null
+++ b/src/bin/pg_waldump/rmgrdesc.c
@@ -0,0 +1,40 @@
+/*
+ * rmgrdesc.c
+ *
+ * pg_waldump resource managers definition
+ *
+ * src/bin/pg_waldump/rmgrdesc.c
+ */
+#define FRONTEND 1
+#include "postgres.h"
+
+#include "access/brin_xlog.h"
+#include "access/clog.h"
+#include "access/commit_ts.h"
+#include "access/generic_xlog.h"
+#include "access/gin.h"
+#include "access/gist_private.h"
+#include "access/hash_xlog.h"
+#include "access/heapam_xlog.h"
+#include "access/multixact.h"
+#include "access/nbtree.h"
+#include "access/rmgr.h"
+#include "access/spgist.h"
+#include "access/xact.h"
+#include "access/xlog_internal.h"
+#include "catalog/storage_xlog.h"
+#include "commands/dbcommands_xlog.h"
+#include "commands/sequence.h"
+#include "commands/tablespace.h"
+#include "replication/message.h"
+#include "replication/origin.h"
+#include "rmgrdesc.h"
+#include "storage/standbydefs.h"
+#include "utils/relmapper.h"
+
+#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
+	{ name, desc, identify},
+
+const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
+#include "access/rmgrlist.h"
+};
diff --git a/src/bin/pg_waldump/rmgrdesc.h b/src/bin/pg_waldump/rmgrdesc.h
new file mode 100644
index 0000000..2fa60d9
--- /dev/null
+++ b/src/bin/pg_waldump/rmgrdesc.h
@@ -0,0 +1,22 @@
+/*
+ * rmgrdesc.h
+ *
+ * pg_waldump resource managers declaration
+ *
+ * src/bin/pg_waldump/rmgrdesc.h
+ */
+#ifndef RMGRDESC_H
+#define RMGRDESC_H
+
+#include "lib/stringinfo.h"
+
+typedef struct RmgrDescData
+{
+	const char *rm_name;
+	void		(*rm_desc) (StringInfo buf, XLogReaderState *record);
+	const char *(*rm_identify) (uint8 info);
+} RmgrDescData;
+
+extern const RmgrDescData RmgrDescTable[];
+
+#endif   /* RMGRDESC_H */
diff --git a/src/bin/pg_xlogdump/.gitignore b/src/bin/pg_xlogdump/.gitignore
deleted file mode 100644
index c4783f1..0000000
--- a/src/bin/pg_xlogdump/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/pg_xlogdump
-# Source files copied from src/backend/access/rmgrdesc/
-/*desc.c
-/xlogreader.c
diff --git a/src/bin/pg_xlogdump/Makefile b/src/bin/pg_xlogdump/Makefile
deleted file mode 100644
index 11df47d..0000000
--- a/src/bin/pg_xlogdump/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# src/bin/pg_xlogdump/Makefile
-
-PGFILEDESC = "pg_xlogdump - decode and display WAL"
-PGAPPICON=win32
-
-subdir = src/bin/pg_xlogdump
-top_builddir = ../../..
-include $(top_builddir)/src/Makefile.global
-
-OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \
-	$(RMGRDESCOBJS) $(WIN32RES)
-
-override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
-
-RMGRDESCSOURCES = $(sort $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)))
-RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
-
-
-all: pg_xlogdump
-
-pg_xlogdump: $(OBJS) | submake-libpgport
-	$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
-
-xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
-	rm -f $@ && $(LN_S) $< .
-
-$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/%
-	rm -f $@ && $(LN_S) $< .
-
-install: all installdirs
-	$(INSTALL_PROGRAM) pg_xlogdump$(X) '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
-
-installdirs:
-	$(MKDIR_P) '$(DESTDIR)$(bindir)'
-
-uninstall:
-	rm -f '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
-
-clean distclean maintainer-clean:
-	rm -f pg_xlogdump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c
diff --git a/src/bin/pg_xlogdump/compat.c b/src/bin/pg_xlogdump/compat.c
deleted file mode 100644
index ff5acdc..0000000
--- a/src/bin/pg_xlogdump/compat.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * compat.c
- *		Reimplementations of various backend functions.
- *
- * Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		src/bin/pg_xlogdump/compat.c
- *
- * This file contains client-side implementations for various backend
- * functions that the rm_desc functions in *desc.c files rely on.
- *
- *-------------------------------------------------------------------------
- */
-
-/* ugly hack, same as in e.g pg_controldata */
-#define FRONTEND 1
-#include "postgres.h"
-
-#include <time.h>
-
-#include "utils/datetime.h"
-#include "lib/stringinfo.h"
-
-/* copied from timestamp.c */
-pg_time_t
-timestamptz_to_time_t(TimestampTz t)
-{
-	pg_time_t	result;
-
-#ifdef HAVE_INT64_TIMESTAMP
-	result = (pg_time_t) (t / USECS_PER_SEC +
-				 ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
-#else
-	result = (pg_time_t) (t +
-				 ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
-#endif
-	return result;
-}
-
-/*
- * Stopgap implementation of timestamptz_to_str that doesn't depend on backend
- * infrastructure.  This will work for timestamps that are within the range
- * of the platform time_t type.  (pg_time_t is compatible except for possibly
- * being wider.)
- *
- * XXX the return value points to a static buffer, so beware of using more
- * than one result value concurrently.
- *
- * XXX: The backend timestamp infrastructure should instead be split out and
- * moved into src/common.  That's a large project though.
- */
-const char *
-timestamptz_to_str(TimestampTz dt)
-{
-	static char buf[MAXDATELEN + 1];
-	char		ts[MAXDATELEN + 1];
-	char		zone[MAXDATELEN + 1];
-	time_t		result = (time_t) timestamptz_to_time_t(dt);
-	struct tm  *ltime = localtime(&result);
-
-	strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime);
-	strftime(zone, sizeof(zone), "%Z", ltime);
-
-#ifdef HAVE_INT64_TIMESTAMP
-	sprintf(buf, "%s.%06d %s", ts, (int) (dt % USECS_PER_SEC), zone);
-#else
-	sprintf(buf, "%s.%.6f %s", ts, fabs(dt - floor(dt)), zone);
-#endif
-
-	return buf;
-}
-
-/*
- * Provide a hacked up compat layer for StringInfos so xlog desc functions can
- * be linked/called.
- */
-void
-appendStringInfo(StringInfo str, const char *fmt,...)
-{
-	va_list		args;
-
-	va_start(args, fmt);
-	vprintf(fmt, args);
-	va_end(args);
-}
-
-void
-appendStringInfoString(StringInfo str, const char *string)
-{
-	appendStringInfo(str, "%s", string);
-}
-
-void
-appendStringInfoChar(StringInfo str, char ch)
-{
-	appendStringInfo(str, "%c", ch);
-}
diff --git a/src/bin/pg_xlogdump/nls.mk b/src/bin/pg_xlogdump/nls.mk
deleted file mode 100644
index 2b254c3..0000000
--- a/src/bin/pg_xlogdump/nls.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# src/bin/pg_xlogdump/nls.mk
-CATALOG_NAME     = pg_xlogdump
-AVAIL_LANGUAGES  =
-GETTEXT_FILES    = pg_xlogdump.c
-GETTEXT_TRIGGERS = fatal_error
-GETTEXT_FLAGS    = fatal_error:1:c-format
diff --git a/src/bin/pg_xlogdump/pg_xlogdump.c b/src/bin/pg_xlogdump/pg_xlogdump.c
deleted file mode 100644
index 590d2ad..0000000
--- a/src/bin/pg_xlogdump/pg_xlogdump.c
+++ /dev/null
@@ -1,1064 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_xlogdump.c - decode and display WAL
- *
- * Copyright (c) 2013-2017, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		  src/bin/pg_xlogdump/pg_xlogdump.c
- *-------------------------------------------------------------------------
- */
-
-#define FRONTEND 1
-#include "postgres.h"
-
-#include <dirent.h>
-#include <unistd.h>
-
-#include "access/xlogreader.h"
-#include "access/xlogrecord.h"
-#include "access/xlog_internal.h"
-#include "access/transam.h"
-#include "common/fe_memutils.h"
-#include "getopt_long.h"
-#include "rmgrdesc.h"
-
-
-static const char *progname;
-
-typedef struct XLogDumpPrivate
-{
-	TimeLineID	timeline;
-	char	   *inpath;
-	XLogRecPtr	startptr;
-	XLogRecPtr	endptr;
-	bool		endptr_reached;
-} XLogDumpPrivate;
-
-typedef struct XLogDumpConfig
-{
-	/* display options */
-	bool		bkp_details;
-	int			stop_after_records;
-	int			already_displayed_records;
-	bool		follow;
-	bool		stats;
-	bool		stats_per_record;
-
-	/* filter options */
-	int			filter_by_rmgr;
-	TransactionId filter_by_xid;
-	bool		filter_by_xid_enabled;
-} XLogDumpConfig;
-
-typedef struct Stats
-{
-	uint64		count;
-	uint64		rec_len;
-	uint64		fpi_len;
-} Stats;
-
-#define MAX_XLINFO_TYPES 16
-
-typedef struct XLogDumpStats
-{
-	uint64		count;
-	Stats		rmgr_stats[RM_NEXT_ID];
-	Stats		record_stats[RM_NEXT_ID][MAX_XLINFO_TYPES];
-} XLogDumpStats;
-
-static void fatal_error(const char *fmt,...) pg_attribute_printf(1, 2);
-
-/*
- * Big red button to push when things go horribly wrong.
- */
-static void
-fatal_error(const char *fmt,...)
-{
-	va_list		args;
-
-	fflush(stdout);
-
-	fprintf(stderr, _("%s: FATAL:  "), progname);
-	va_start(args, fmt);
-	vfprintf(stderr, _(fmt), args);
-	va_end(args);
-	fputc('\n', stderr);
-
-	exit(EXIT_FAILURE);
-}
-
-static void
-print_rmgr_list(void)
-{
-	int			i;
-
-	for (i = 0; i <= RM_MAX_ID; i++)
-	{
-		printf("%s\n", RmgrDescTable[i].rm_name);
-	}
-}
-
-/*
- * Check whether directory exists and whether we can open it. Keep errno set so
- * that the caller can report errors somewhat more accurately.
- */
-static bool
-verify_directory(const char *directory)
-{
-	DIR		   *dir = opendir(directory);
-
-	if (dir == NULL)
-		return false;
-	closedir(dir);
-	return true;
-}
-
-/*
- * Split a pathname as dirname(1) and basename(1) would.
- *
- * XXX this probably doesn't do very well on Windows.  We probably need to
- * apply canonicalize_path(), at the very least.
- */
-static void
-split_path(const char *path, char **dir, char **fname)
-{
-	char	   *sep;
-
-	/* split filepath into directory & filename */
-	sep = strrchr(path, '/');
-
-	/* directory path */
-	if (sep != NULL)
-	{
-		*dir = pg_strdup(path);
-		(*dir)[(sep - path) + 1] = '\0';		/* no strndup */
-		*fname = pg_strdup(sep + 1);
-	}
-	/* local directory */
-	else
-	{
-		*dir = NULL;
-		*fname = pg_strdup(path);
-	}
-}
-
-/*
- * Try to find the file in several places:
- * if directory == NULL:
- *	 fname
- *	 XLOGDIR / fname
- *	 $PGDATA / XLOGDIR / fname
- * else
- *	 directory / fname
- *	 directory / XLOGDIR / fname
- *
- * return a read only fd
- */
-static int
-fuzzy_open_file(const char *directory, const char *fname)
-{
-	int			fd = -1;
-	char		fpath[MAXPGPATH];
-
-	if (directory == NULL)
-	{
-		const char *datadir;
-
-		/* fname */
-		fd = open(fname, O_RDONLY | PG_BINARY, 0);
-		if (fd < 0 && errno != ENOENT)
-			return -1;
-		else if (fd >= 0)
-			return fd;
-
-		/* XLOGDIR / fname */
-		snprintf(fpath, MAXPGPATH, "%s/%s",
-				 XLOGDIR, fname);
-		fd = open(fpath, O_RDONLY | PG_BINARY, 0);
-		if (fd < 0 && errno != ENOENT)
-			return -1;
-		else if (fd >= 0)
-			return fd;
-
-		datadir = getenv("PGDATA");
-		/* $PGDATA / XLOGDIR / fname */
-		if (datadir != NULL)
-		{
-			snprintf(fpath, MAXPGPATH, "%s/%s/%s",
-					 datadir, XLOGDIR, fname);
-			fd = open(fpath, O_RDONLY | PG_BINARY, 0);
-			if (fd < 0 && errno != ENOENT)
-				return -1;
-			else if (fd >= 0)
-				return fd;
-		}
-	}
-	else
-	{
-		/* directory / fname */
-		snprintf(fpath, MAXPGPATH, "%s/%s",
-				 directory, fname);
-		fd = open(fpath, O_RDONLY | PG_BINARY, 0);
-		if (fd < 0 && errno != ENOENT)
-			return -1;
-		else if (fd >= 0)
-			return fd;
-
-		/* directory / XLOGDIR / fname */
-		snprintf(fpath, MAXPGPATH, "%s/%s/%s",
-				 directory, XLOGDIR, fname);
-		fd = open(fpath, O_RDONLY | PG_BINARY, 0);
-		if (fd < 0 && errno != ENOENT)
-			return -1;
-		else if (fd >= 0)
-			return fd;
-	}
-	return -1;
-}
-
-/*
- * Read count bytes from a segment file in the specified directory, for the
- * given timeline, containing the specified record pointer; store the data in
- * the passed buffer.
- */
-static void
-XLogDumpXLogRead(const char *directory, TimeLineID timeline_id,
-				 XLogRecPtr startptr, char *buf, Size count)
-{
-	char	   *p;
-	XLogRecPtr	recptr;
-	Size		nbytes;
-
-	static int	sendFile = -1;
-	static XLogSegNo sendSegNo = 0;
-	static uint32 sendOff = 0;
-
-	p = buf;
-	recptr = startptr;
-	nbytes = count;
-
-	while (nbytes > 0)
-	{
-		uint32		startoff;
-		int			segbytes;
-		int			readbytes;
-
-		startoff = recptr % XLogSegSize;
-
-		if (sendFile < 0 || !XLByteInSeg(recptr, sendSegNo))
-		{
-			char		fname[MAXFNAMELEN];
-			int			tries;
-
-			/* Switch to another logfile segment */
-			if (sendFile >= 0)
-				close(sendFile);
-
-			XLByteToSeg(recptr, sendSegNo);
-
-			XLogFileName(fname, timeline_id, sendSegNo);
-
-			/*
-			 * In follow mode there is a short period of time after the
-			 * server has written the end of the previous file before the
-			 * new file is available. So we loop for 5 seconds looking
-			 * for the file to appear before giving up.
-			 */
-			for (tries = 0; tries < 10; tries++)
-			{
-				sendFile = fuzzy_open_file(directory, fname);
-				if (sendFile >= 0)
-					break;
-				if (errno == ENOENT)
-				{
-					int			save_errno = errno;
-
-					/* File not there yet, try again */
-					pg_usleep(500 * 1000);
-
-					errno = save_errno;
-					continue;
-				}
-				/* Any other error, fall through and fail */
-				break;
-			}
-
-			if (sendFile < 0)
-				fatal_error("could not find file \"%s\": %s",
-							fname, strerror(errno));
-			sendOff = 0;
-		}
-
-		/* Need to seek in the file? */
-		if (sendOff != startoff)
-		{
-			if (lseek(sendFile, (off_t) startoff, SEEK_SET) < 0)
-			{
-				int			err = errno;
-				char		fname[MAXPGPATH];
-
-				XLogFileName(fname, timeline_id, sendSegNo);
-
-				fatal_error("could not seek in log segment %s to offset %u: %s",
-							fname, startoff, strerror(err));
-			}
-			sendOff = startoff;
-		}
-
-		/* How many bytes are within this segment? */
-		if (nbytes > (XLogSegSize - startoff))
-			segbytes = XLogSegSize - startoff;
-		else
-			segbytes = nbytes;
-
-		readbytes = read(sendFile, p, segbytes);
-		if (readbytes <= 0)
-		{
-			int			err = errno;
-			char		fname[MAXPGPATH];
-
-			XLogFileName(fname, timeline_id, sendSegNo);
-
-			fatal_error("could not read from log segment %s, offset %d, length %d: %s",
-						fname, sendOff, segbytes, strerror(err));
-		}
-
-		/* Update state for read */
-		recptr += readbytes;
-
-		sendOff += readbytes;
-		nbytes -= readbytes;
-		p += readbytes;
-	}
-}
-
-/*
- * XLogReader read_page callback
- */
-static int
-XLogDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
-				 XLogRecPtr targetPtr, char *readBuff, TimeLineID *curFileTLI)
-{
-	XLogDumpPrivate *private = state->private_data;
-	int			count = XLOG_BLCKSZ;
-
-	if (private->endptr != InvalidXLogRecPtr)
-	{
-		if (targetPagePtr + XLOG_BLCKSZ <= private->endptr)
-			count = XLOG_BLCKSZ;
-		else if (targetPagePtr + reqLen <= private->endptr)
-			count = private->endptr - targetPagePtr;
-		else
-		{
-			private->endptr_reached = true;
-			return -1;
-		}
-	}
-
-	XLogDumpXLogRead(private->inpath, private->timeline, targetPagePtr,
-					 readBuff, count);
-
-	return count;
-}
-
-/*
- * Store per-rmgr and per-record statistics for a given record.
- */
-static void
-XLogDumpCountRecord(XLogDumpConfig *config, XLogDumpStats *stats,
-					XLogReaderState *record)
-{
-	RmgrId		rmid;
-	uint8		recid;
-	uint32		rec_len;
-	uint32		fpi_len;
-	int			block_id;
-
-	stats->count++;
-
-	rmid = XLogRecGetRmid(record);
-	rec_len = XLogRecGetDataLen(record) + SizeOfXLogRecord;
-
-	/*
-	 * Calculate the amount of FPI data in the record.
-	 *
-	 * XXX: We peek into xlogreader's private decoded backup blocks for the
-	 * bimg_len indicating the length of FPI data. It doesn't seem worth it to
-	 * add an accessor macro for this.
-	 */
-	fpi_len = 0;
-	for (block_id = 0; block_id <= record->max_block_id; block_id++)
-	{
-		if (XLogRecHasBlockImage(record, block_id))
-			fpi_len += record->blocks[block_id].bimg_len;
-	}
-
-	/* Update per-rmgr statistics */
-
-	stats->rmgr_stats[rmid].count++;
-	stats->rmgr_stats[rmid].rec_len += rec_len;
-	stats->rmgr_stats[rmid].fpi_len += fpi_len;
-
-	/*
-	 * Update per-record statistics, where the record is identified by a
-	 * combination of the RmgrId and the four bits of the xl_info field that
-	 * are the rmgr's domain (resulting in sixteen possible entries per
-	 * RmgrId).
-	 */
-
-	recid = XLogRecGetInfo(record) >> 4;
-
-	stats->record_stats[rmid][recid].count++;
-	stats->record_stats[rmid][recid].rec_len += rec_len;
-	stats->record_stats[rmid][recid].fpi_len += fpi_len;
-}
-
-/*
- * Print a record to stdout
- */
-static void
-XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
-{
-	const char *id;
-	const RmgrDescData *desc = &RmgrDescTable[XLogRecGetRmid(record)];
-	RelFileNode rnode;
-	ForkNumber	forknum;
-	BlockNumber blk;
-	int			block_id;
-	uint8		info = XLogRecGetInfo(record);
-	XLogRecPtr	xl_prev = XLogRecGetPrev(record);
-
-	id = desc->rm_identify(info);
-	if (id == NULL)
-		id = psprintf("UNKNOWN (%x)", info & ~XLR_INFO_MASK);
-
-	printf("rmgr: %-11s len (rec/tot): %6u/%6u, tx: %10u, lsn: %X/%08X, prev %X/%08X, ",
-		   desc->rm_name,
-		   XLogRecGetDataLen(record), XLogRecGetTotalLen(record),
-		   XLogRecGetXid(record),
-		   (uint32) (record->ReadRecPtr >> 32), (uint32) record->ReadRecPtr,
-		   (uint32) (xl_prev >> 32), (uint32) xl_prev);
-	printf("desc: %s ", id);
-
-	/* the desc routine will printf the description directly to stdout */
-	desc->rm_desc(NULL, record);
-
-	if (!config->bkp_details)
-	{
-		/* print block references (short format) */
-		for (block_id = 0; block_id <= record->max_block_id; block_id++)
-		{
-			if (!XLogRecHasBlockRef(record, block_id))
-				continue;
-
-			XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
-			if (forknum != MAIN_FORKNUM)
-				printf(", blkref #%u: rel %u/%u/%u fork %s blk %u",
-					   block_id,
-					   rnode.spcNode, rnode.dbNode, rnode.relNode,
-					   forkNames[forknum],
-					   blk);
-			else
-				printf(", blkref #%u: rel %u/%u/%u blk %u",
-					   block_id,
-					   rnode.spcNode, rnode.dbNode, rnode.relNode,
-					   blk);
-			if (XLogRecHasBlockImage(record, block_id))
-				printf(" FPW");
-		}
-		putchar('\n');
-	}
-	else
-	{
-		/* print block references (detailed format) */
-		putchar('\n');
-		for (block_id = 0; block_id <= record->max_block_id; block_id++)
-		{
-			if (!XLogRecHasBlockRef(record, block_id))
-				continue;
-
-			XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
-			printf("\tblkref #%u: rel %u/%u/%u fork %s blk %u",
-				   block_id,
-				   rnode.spcNode, rnode.dbNode, rnode.relNode,
-				   forkNames[forknum],
-				   blk);
-			if (XLogRecHasBlockImage(record, block_id))
-			{
-				if (record->blocks[block_id].bimg_info &
-					BKPIMAGE_IS_COMPRESSED)
-				{
-					printf(" (FPW); hole: offset: %u, length: %u, compression saved: %u\n",
-						   record->blocks[block_id].hole_offset,
-						   record->blocks[block_id].hole_length,
-						   BLCKSZ -
-						   record->blocks[block_id].hole_length -
-						   record->blocks[block_id].bimg_len);
-				}
-				else
-				{
-					printf(" (FPW); hole: offset: %u, length: %u\n",
-						   record->blocks[block_id].hole_offset,
-						   record->blocks[block_id].hole_length);
-				}
-			}
-			putchar('\n');
-		}
-	}
-}
-
-/*
- * Display a single row of record counts and sizes for an rmgr or record.
- */
-static void
-XLogDumpStatsRow(const char *name,
-				 uint64 n, uint64 total_count,
-				 uint64 rec_len, uint64 total_rec_len,
-				 uint64 fpi_len, uint64 total_fpi_len,
-				 uint64 tot_len, uint64 total_len)
-{
-	double		n_pct,
-				rec_len_pct,
-				fpi_len_pct,
-				tot_len_pct;
-
-	n_pct = 0;
-	if (total_count != 0)
-		n_pct = 100 * (double) n / total_count;
-
-	rec_len_pct = 0;
-	if (total_rec_len != 0)
-		rec_len_pct = 100 * (double) rec_len / total_rec_len;
-
-	fpi_len_pct = 0;
-	if (total_fpi_len != 0)
-		fpi_len_pct = 100 * (double) fpi_len / total_fpi_len;
-
-	tot_len_pct = 0;
-	if (total_len != 0)
-		tot_len_pct = 100 * (double) tot_len / total_len;
-
-	printf("%-27s "
-		   "%20" INT64_MODIFIER "u (%6.02f) "
-		   "%20" INT64_MODIFIER "u (%6.02f) "
-		   "%20" INT64_MODIFIER "u (%6.02f) "
-		   "%20" INT64_MODIFIER "u (%6.02f)\n",
-		   name, n, n_pct, rec_len, rec_len_pct, fpi_len, fpi_len_pct,
-		   tot_len, tot_len_pct);
-}
-
-
-/*
- * Display summary statistics about the records seen so far.
- */
-static void
-XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
-{
-	int			ri,
-				rj;
-	uint64		total_count = 0;
-	uint64		total_rec_len = 0;
-	uint64		total_fpi_len = 0;
-	uint64		total_len = 0;
-	double		rec_len_pct,
-				fpi_len_pct;
-
-	/* ---
-	 * Make a first pass to calculate column totals:
-	 * count(*),
-	 * sum(xl_len+SizeOfXLogRecord),
-	 * sum(xl_tot_len-xl_len-SizeOfXLogRecord), and
-	 * sum(xl_tot_len).
-	 * These are used to calculate percentages for each record type.
-	 * ---
-	 */
-
-	for (ri = 0; ri < RM_NEXT_ID; ri++)
-	{
-		total_count += stats->rmgr_stats[ri].count;
-		total_rec_len += stats->rmgr_stats[ri].rec_len;
-		total_fpi_len += stats->rmgr_stats[ri].fpi_len;
-	}
-	total_len = total_rec_len + total_fpi_len;
-
-	/*
-	 * 27 is strlen("Transaction/COMMIT_PREPARED"), 20 is strlen(2^64), 8 is
-	 * strlen("(100.00%)")
-	 */
-
-	printf("%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n"
-		   "%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n",
-		   "Type", "N", "(%)", "Record size", "(%)", "FPI size", "(%)", "Combined size", "(%)",
-		   "----", "-", "---", "-----------", "---", "--------", "---", "-------------", "---");
-
-	for (ri = 0; ri < RM_NEXT_ID; ri++)
-	{
-		uint64		count,
-					rec_len,
-					fpi_len,
-					tot_len;
-		const RmgrDescData *desc = &RmgrDescTable[ri];
-
-		if (!config->stats_per_record)
-		{
-			count = stats->rmgr_stats[ri].count;
-			rec_len = stats->rmgr_stats[ri].rec_len;
-			fpi_len = stats->rmgr_stats[ri].fpi_len;
-			tot_len = rec_len + fpi_len;
-
-			XLogDumpStatsRow(desc->rm_name,
-							 count, total_count, rec_len, total_rec_len,
-							 fpi_len, total_fpi_len, tot_len, total_len);
-		}
-		else
-		{
-			for (rj = 0; rj < MAX_XLINFO_TYPES; rj++)
-			{
-				const char *id;
-
-				count = stats->record_stats[ri][rj].count;
-				rec_len = stats->record_stats[ri][rj].rec_len;
-				fpi_len = stats->record_stats[ri][rj].fpi_len;
-				tot_len = rec_len + fpi_len;
-
-				/* Skip undefined combinations and ones that didn't occur */
-				if (count == 0)
-					continue;
-
-				/* the upper four bits in xl_info are the rmgr's */
-				id = desc->rm_identify(rj << 4);
-				if (id == NULL)
-					id = psprintf("UNKNOWN (%x)", rj << 4);
-
-				XLogDumpStatsRow(psprintf("%s/%s", desc->rm_name, id),
-								 count, total_count, rec_len, total_rec_len,
-								 fpi_len, total_fpi_len, tot_len, total_len);
-			}
-		}
-	}
-
-	printf("%-27s %20s %8s %20s %8s %20s %8s %20s\n",
-		   "", "--------", "", "--------", "", "--------", "", "--------");
-
-	/*
-	 * The percentages in earlier rows were calculated against the column
-	 * total, but the ones that follow are against the row total. Note that
-	 * these are displayed with a % symbol to differentiate them from the
-	 * earlier ones, and are thus up to 9 characters long.
-	 */
-
-	rec_len_pct = 0;
-	if (total_len != 0)
-		rec_len_pct = 100 * (double) total_rec_len / total_len;
-
-	fpi_len_pct = 0;
-	if (total_len != 0)
-		fpi_len_pct = 100 * (double) total_fpi_len / total_len;
-
-	printf("%-27s "
-		   "%20" INT64_MODIFIER "u %-9s"
-		   "%20" INT64_MODIFIER "u %-9s"
-		   "%20" INT64_MODIFIER "u %-9s"
-		   "%20" INT64_MODIFIER "u %-6s\n",
-		   "Total", stats->count, "",
-		   total_rec_len, psprintf("[%.02f%%]", rec_len_pct),
-		   total_fpi_len, psprintf("[%.02f%%]", fpi_len_pct),
-		   total_len, "[100%]");
-}
-
-static void
-usage(void)
-{
-	printf(_("%s decodes and displays PostgreSQL transaction logs for debugging.\n\n"),
-		   progname);
-	printf(_("Usage:\n"));
-	printf(_("  %s [OPTION]... [STARTSEG [ENDSEG]] \n"), progname);
-	printf(_("\nOptions:\n"));
-	printf(_("  -b, --bkp-details      output detailed information about backup blocks\n"));
-	printf(_("  -e, --end=RECPTR       stop reading at log position RECPTR\n"));
-	printf(_("  -f, --follow           keep retrying after reaching end of WAL\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"
-			 "                         directory with a ./pg_wal that contains such files\n"
-			 "                         (default: current directory, ./pg_wal, PGDATA/pg_wal)\n"));
-	printf(_("  -r, --rmgr=RMGR        only show records generated by resource manager RMGR\n"
-			 "                         use --rmgr=list to list valid resource manager names\n"));
-	printf(_("  -s, --start=RECPTR     start reading at log position RECPTR\n"));
-	printf(_("  -t, --timeline=TLI     timeline from which to read log records\n"
-			 "                         (default: 1 or the value used in STARTSEG)\n"));
-	printf(_("  -V, --version          output version information, then exit\n"));
-	printf(_("  -x, --xid=XID          only show records with TransactionId XID\n"));
-	printf(_("  -z, --stats[=record]   show statistics instead of records\n"
-			 "                         (optionally, show per-record statistics)\n"));
-	printf(_("  -?, --help             show this help, then exit\n"));
-}
-
-int
-main(int argc, char **argv)
-{
-	uint32		xlogid;
-	uint32		xrecoff;
-	XLogReaderState *xlogreader_state;
-	XLogDumpPrivate private;
-	XLogDumpConfig config;
-	XLogDumpStats stats;
-	XLogRecord *record;
-	XLogRecPtr	first_record;
-	char	   *errormsg;
-
-	static struct option long_options[] = {
-		{"bkp-details", no_argument, NULL, 'b'},
-		{"end", required_argument, NULL, 'e'},
-		{"follow", no_argument, NULL, 'f'},
-		{"help", no_argument, NULL, '?'},
-		{"limit", required_argument, NULL, 'n'},
-		{"path", required_argument, NULL, 'p'},
-		{"rmgr", required_argument, NULL, 'r'},
-		{"start", required_argument, NULL, 's'},
-		{"timeline", required_argument, NULL, 't'},
-		{"xid", required_argument, NULL, 'x'},
-		{"version", no_argument, NULL, 'V'},
-		{"stats", optional_argument, NULL, 'z'},
-		{NULL, 0, NULL, 0}
-	};
-
-	int			option;
-	int			optindex = 0;
-
-	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_xlogdump"));
-	progname = get_progname(argv[0]);
-
-	memset(&private, 0, sizeof(XLogDumpPrivate));
-	memset(&config, 0, sizeof(XLogDumpConfig));
-	memset(&stats, 0, sizeof(XLogDumpStats));
-
-	private.timeline = 1;
-	private.startptr = InvalidXLogRecPtr;
-	private.endptr = InvalidXLogRecPtr;
-	private.endptr_reached = false;
-
-	config.bkp_details = false;
-	config.stop_after_records = -1;
-	config.already_displayed_records = 0;
-	config.follow = false;
-	config.filter_by_rmgr = -1;
-	config.filter_by_xid = InvalidTransactionId;
-	config.filter_by_xid_enabled = false;
-	config.stats = false;
-	config.stats_per_record = false;
-
-	if (argc <= 1)
-	{
-		fprintf(stderr, _("%s: no arguments specified\n"), progname);
-		goto bad_argument;
-	}
-
-	while ((option = getopt_long(argc, argv, "be:?fn:p:r:s:t:Vx:z",
-								 long_options, &optindex)) != -1)
-	{
-		switch (option)
-		{
-			case 'b':
-				config.bkp_details = true;
-				break;
-			case 'e':
-				if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
-				{
-					fprintf(stderr, _("%s: could not parse end log position \"%s\"\n"),
-							progname, optarg);
-					goto bad_argument;
-				}
-				private.endptr = (uint64) xlogid << 32 | xrecoff;
-				break;
-			case 'f':
-				config.follow = true;
-				break;
-			case '?':
-				usage();
-				exit(EXIT_SUCCESS);
-				break;
-			case 'n':
-				if (sscanf(optarg, "%d", &config.stop_after_records) != 1)
-				{
-					fprintf(stderr, _("%s: could not parse limit \"%s\"\n"),
-							progname, optarg);
-					goto bad_argument;
-				}
-				break;
-			case 'p':
-				private.inpath = pg_strdup(optarg);
-				break;
-			case 'r':
-				{
-					int			i;
-
-					if (pg_strcasecmp(optarg, "list") == 0)
-					{
-						print_rmgr_list();
-						exit(EXIT_SUCCESS);
-					}
-
-					for (i = 0; i <= RM_MAX_ID; i++)
-					{
-						if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
-						{
-							config.filter_by_rmgr = i;
-							break;
-						}
-					}
-
-					if (config.filter_by_rmgr == -1)
-					{
-						fprintf(stderr, _("%s: resource manager \"%s\" does not exist\n"),
-								progname, optarg);
-						goto bad_argument;
-					}
-				}
-				break;
-			case 's':
-				if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
-				{
-					fprintf(stderr, _("%s: could not parse start log position \"%s\"\n"),
-							progname, optarg);
-					goto bad_argument;
-				}
-				else
-					private.startptr = (uint64) xlogid << 32 | xrecoff;
-				break;
-			case 't':
-				if (sscanf(optarg, "%d", &private.timeline) != 1)
-				{
-					fprintf(stderr, _("%s: could not parse timeline \"%s\"\n"),
-							progname, optarg);
-					goto bad_argument;
-				}
-				break;
-			case 'V':
-				puts("pg_xlogdump (PostgreSQL) " PG_VERSION);
-				exit(EXIT_SUCCESS);
-				break;
-			case 'x':
-				if (sscanf(optarg, "%u", &config.filter_by_xid) != 1)
-				{
-					fprintf(stderr, _("%s: could not parse \"%s\" as a valid xid\n"),
-							progname, optarg);
-					goto bad_argument;
-				}
-				config.filter_by_xid_enabled = true;
-				break;
-			case 'z':
-				config.stats = true;
-				config.stats_per_record = false;
-				if (optarg)
-				{
-					if (strcmp(optarg, "record") == 0)
-						config.stats_per_record = true;
-					else if (strcmp(optarg, "rmgr") != 0)
-					{
-						fprintf(stderr, _("%s: unrecognised argument to --stats: %s\n"),
-								progname, optarg);
-						goto bad_argument;
-					}
-				}
-				break;
-			default:
-				goto bad_argument;
-		}
-	}
-
-	if ((optind + 2) < argc)
-	{
-		fprintf(stderr,
-				_("%s: too many command-line arguments (first is \"%s\")\n"),
-				progname, argv[optind + 2]);
-		goto bad_argument;
-	}
-
-	if (private.inpath != NULL)
-	{
-		/* validate path points to directory */
-		if (!verify_directory(private.inpath))
-		{
-			fprintf(stderr,
-					_("%s: path \"%s\" cannot be opened: %s\n"),
-					progname, private.inpath, strerror(errno));
-			goto bad_argument;
-		}
-	}
-
-	/* parse files as start/end boundaries, extract path if not specified */
-	if (optind < argc)
-	{
-		char	   *directory = NULL;
-		char	   *fname = NULL;
-		int			fd;
-		XLogSegNo	segno;
-
-		split_path(argv[optind], &directory, &fname);
-
-		if (private.inpath == NULL && directory != NULL)
-		{
-			private.inpath = directory;
-
-			if (!verify_directory(private.inpath))
-				fatal_error("cannot open directory \"%s\": %s",
-							private.inpath, strerror(errno));
-		}
-
-		fd = fuzzy_open_file(private.inpath, fname);
-		if (fd < 0)
-			fatal_error("could not open file \"%s\"", fname);
-		close(fd);
-
-		/* parse position from file */
-		XLogFromFileName(fname, &private.timeline, &segno);
-
-		if (XLogRecPtrIsInvalid(private.startptr))
-			XLogSegNoOffsetToRecPtr(segno, 0, private.startptr);
-		else if (!XLByteInSeg(private.startptr, segno))
-		{
-			fprintf(stderr,
-					_("%s: start log position %X/%X is not inside file \"%s\"\n"),
-					progname,
-					(uint32) (private.startptr >> 32),
-					(uint32) private.startptr,
-					fname);
-			goto bad_argument;
-		}
-
-		/* no second file specified, set end position */
-		if (!(optind + 1 < argc) && XLogRecPtrIsInvalid(private.endptr))
-			XLogSegNoOffsetToRecPtr(segno + 1, 0, private.endptr);
-
-		/* parse ENDSEG if passed */
-		if (optind + 1 < argc)
-		{
-			XLogSegNo	endsegno;
-
-			/* ignore directory, already have that */
-			split_path(argv[optind + 1], &directory, &fname);
-
-			fd = fuzzy_open_file(private.inpath, fname);
-			if (fd < 0)
-				fatal_error("could not open file \"%s\"", fname);
-			close(fd);
-
-			/* parse position from file */
-			XLogFromFileName(fname, &private.timeline, &endsegno);
-
-			if (endsegno < segno)
-				fatal_error("ENDSEG %s is before STARTSEG %s",
-							argv[optind + 1], argv[optind]);
-
-			if (XLogRecPtrIsInvalid(private.endptr))
-				XLogSegNoOffsetToRecPtr(endsegno + 1, 0, private.endptr);
-
-			/* set segno to endsegno for check of --end */
-			segno = endsegno;
-		}
-
-
-		if (!XLByteInSeg(private.endptr, segno) &&
-			private.endptr != (segno + 1) * XLogSegSize)
-		{
-			fprintf(stderr,
-					_("%s: end log position %X/%X is not inside file \"%s\"\n"),
-					progname,
-					(uint32) (private.endptr >> 32),
-					(uint32) private.endptr,
-					argv[argc - 1]);
-			goto bad_argument;
-		}
-	}
-
-	/* we don't know what to print */
-	if (XLogRecPtrIsInvalid(private.startptr))
-	{
-		fprintf(stderr, _("%s: no start log position given.\n"), progname);
-		goto bad_argument;
-	}
-
-	/* done with argument parsing, do the actual work */
-
-	/* we have everything we need, start reading */
-	xlogreader_state = XLogReaderAllocate(XLogDumpReadPage, &private);
-	if (!xlogreader_state)
-		fatal_error("out of memory");
-
-	/* first find a valid recptr to start from */
-	first_record = XLogFindNextRecord(xlogreader_state, private.startptr);
-
-	if (first_record == InvalidXLogRecPtr)
-		fatal_error("could not find a valid record after %X/%X",
-					(uint32) (private.startptr >> 32),
-					(uint32) private.startptr);
-
-	/*
-	 * Display a message that we're skipping data if `from` wasn't a pointer
-	 * to the start of a record and also wasn't a pointer to the beginning of
-	 * a segment (e.g. we were used in file mode).
-	 */
-	if (first_record != private.startptr && (private.startptr % XLogSegSize) != 0)
-		printf(_("first record is after %X/%X, at %X/%X, skipping over %u bytes\n"),
-			   (uint32) (private.startptr >> 32), (uint32) private.startptr,
-			   (uint32) (first_record >> 32), (uint32) first_record,
-			   (uint32) (first_record - private.startptr));
-
-	for (;;)
-	{
-		/* try to read the next record */
-		record = XLogReadRecord(xlogreader_state, first_record, &errormsg);
-		if (!record)
-		{
-			if (!config.follow || private.endptr_reached)
-				break;
-			else
-			{
-				pg_usleep(1000000L);	/* 1 second */
-				continue;
-			}
-		}
-
-		/* after reading the first record, continue at next one */
-		first_record = InvalidXLogRecPtr;
-
-		/* apply all specified filters */
-		if (config.filter_by_rmgr != -1 &&
-			config.filter_by_rmgr != record->xl_rmid)
-			continue;
-
-		if (config.filter_by_xid_enabled &&
-			config.filter_by_xid != record->xl_xid)
-			continue;
-
-		/* process the record */
-		if (config.stats == true)
-			XLogDumpCountRecord(&config, &stats, xlogreader_state);
-		else
-			XLogDumpDisplayRecord(&config, xlogreader_state);
-
-		/* check whether we printed enough */
-		config.already_displayed_records++;
-		if (config.stop_after_records > 0 &&
-			config.already_displayed_records >= config.stop_after_records)
-			break;
-	}
-
-	if (config.stats == true)
-		XLogDumpDisplayStats(&config, &stats);
-
-	if (errormsg)
-		fatal_error("error in WAL record at %X/%X: %s\n",
-					(uint32) (xlogreader_state->ReadRecPtr >> 32),
-					(uint32) xlogreader_state->ReadRecPtr,
-					errormsg);
-
-	XLogReaderFree(xlogreader_state);
-
-	return EXIT_SUCCESS;
-
-bad_argument:
-	fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
-	return EXIT_FAILURE;
-}
diff --git a/src/bin/pg_xlogdump/rmgrdesc.c b/src/bin/pg_xlogdump/rmgrdesc.c
deleted file mode 100644
index 8fe20ce..0000000
--- a/src/bin/pg_xlogdump/rmgrdesc.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * rmgrdesc.c
- *
- * pg_xlogdump resource managers definition
- *
- * src/bin/pg_xlogdump/rmgrdesc.c
- */
-#define FRONTEND 1
-#include "postgres.h"
-
-#include "access/brin_xlog.h"
-#include "access/clog.h"
-#include "access/commit_ts.h"
-#include "access/generic_xlog.h"
-#include "access/gin.h"
-#include "access/gist_private.h"
-#include "access/hash_xlog.h"
-#include "access/heapam_xlog.h"
-#include "access/multixact.h"
-#include "access/nbtree.h"
-#include "access/rmgr.h"
-#include "access/spgist.h"
-#include "access/xact.h"
-#include "access/xlog_internal.h"
-#include "catalog/storage_xlog.h"
-#include "commands/dbcommands_xlog.h"
-#include "commands/sequence.h"
-#include "commands/tablespace.h"
-#include "replication/message.h"
-#include "replication/origin.h"
-#include "rmgrdesc.h"
-#include "storage/standbydefs.h"
-#include "utils/relmapper.h"
-
-#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
-	{ name, desc, identify},
-
-const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
-#include "access/rmgrlist.h"
-};
diff --git a/src/bin/pg_xlogdump/rmgrdesc.h b/src/bin/pg_xlogdump/rmgrdesc.h
deleted file mode 100644
index 5440f94..0000000
--- a/src/bin/pg_xlogdump/rmgrdesc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * rmgrdesc.h
- *
- * pg_xlogdump resource managers declaration
- *
- * src/bin/pg_xlogdump/rmgrdesc.h
- */
-#ifndef RMGRDESC_H
-#define RMGRDESC_H
-
-#include "lib/stringinfo.h"
-
-typedef struct RmgrDescData
-{
-	const char *rm_name;
-	void		(*rm_desc) (StringInfo buf, XLogReaderState *record);
-	const char *(*rm_identify) (uint8 info);
-} RmgrDescData;
-
-extern const RmgrDescData RmgrDescTable[];
-
-#endif   /* RMGRDESC_H */
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 8ad4d47..9c50b78 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -9,7 +9,7 @@
  * So the XLogRecord typedef and associated stuff appear in xlogrecord.h.
  *
  * Note: This file must be includable in both frontend and backend contexts,
- * to allow stand-alone tools like pg_receivexlog to deal with WAL files.
+ * to allow stand-alone tools like pg_receivewal to deal with WAL files.
  *
  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
@@ -153,7 +153,7 @@ typedef XLogLongPageHeaderData *XLogLongPageHeader;
 	 strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN)
 
 /*
- * XLOG segment with .partial suffix.  Used by pg_receivexlog and at end of
+ * XLOG segment with .partial suffix.  Used by pg_receivewal and at end of
  * archive recovery, when we want to archive a WAL segment but it might not
  * be complete yet.
  */
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 4c697e2..07a32d6 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -237,7 +237,7 @@ extern void FreeAccessStrategy(BufferAccessStrategy strategy);
 
 /*
  * Although this header file is nominally backend-only, certain frontend
- * programs like pg_xlogdump include it.  For compilers that emit static
+ * programs like pg_waldump include it.  For compilers that emit static
  * inline functions even when they're unused, that leads to unsatisfied
  * external references; hence hide these with #ifndef FRONTEND.
  */
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index e04efe6..0aa1422 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -24,7 +24,7 @@ my @client_program_files = (
 	'dropdb',        'droplang',       'dropuser',   'ecpg',
 	'libecpg',       'libecpg_compat', 'libpgtypes', 'libpq',
 	'pg_basebackup', 'pg_config',      'pg_dump',    'pg_dumpall',
-	'pg_isready',    'pg_receivexlog', 'pg_recvlogical', 'pg_restore',
+	'pg_isready',    'pg_receivewal', 'pg_recvlogical', 'pg_restore',
 	'psql', 'reindexdb',     'vacuumdb',       @client_contribs);
 
 sub lcopy
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index db566f9..df06e73 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -54,11 +54,11 @@ my @frontend_uselibpq = ('pg_ctl', 'pg_upgrade', 'pgbench', 'psql', 'initdb');
 my @frontend_uselibpgport = (
 	'pg_archivecleanup', 'pg_test_fsync',
 	'pg_test_timing',    'pg_upgrade',
-	'pg_xlogdump',       'pgbench');
+	'pg_waldump',       'pgbench');
 my @frontend_uselibpgcommon = (
 	'pg_archivecleanup', 'pg_test_fsync',
 	'pg_test_timing',    'pg_upgrade',
-	'pg_xlogdump',       'pgbench');
+	'pg_waldump',       'pgbench');
 my $frontend_extralibs = {
 	'initdb'     => ['ws2_32.lib'],
 	'pg_restore' => ['ws2_32.lib'],
@@ -73,7 +73,7 @@ my $frontend_extrasource = {
 	  [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ] };
 my @frontend_excludes = (
 	'pgevent',     'pg_basebackup', 'pg_rewind', 'pg_dump',
-	'pg_xlogdump', 'scripts');
+	'pg_waldump', 'scripts');
 
 sub mkvcbuild
 {
@@ -324,10 +324,10 @@ sub mkvcbuild
 	$pgbasebackup->AddFile('src/bin/pg_basebackup/pg_basebackup.c');
 	$pgbasebackup->AddLibrary('ws2_32.lib');
 
-	my $pgreceivexlog = AddSimpleFrontend('pg_basebackup', 1);
-	$pgreceivexlog->{name} = 'pg_receivexlog';
-	$pgreceivexlog->AddFile('src/bin/pg_basebackup/pg_receivexlog.c');
-	$pgreceivexlog->AddLibrary('ws2_32.lib');
+	my $pgreceivewal = AddSimpleFrontend('pg_basebackup', 1);
+	$pgreceivewal->{name} = 'pg_receivewal';
+	$pgreceivewal->AddFile('src/bin/pg_basebackup/pg_receivewal.c');
+	$pgreceivewal->AddLibrary('ws2_32.lib');
 
 	my $pgrecvlogical = AddSimpleFrontend('pg_basebackup', 1);
 	$pgrecvlogical->{name} = 'pg_recvlogical';
@@ -631,15 +631,15 @@ sub mkvcbuild
 	$pgregress->AddDirResourceFile('src/test/regress');
 	$pgregress->AddReference($libpgcommon, $libpgport);
 
-	# fix up pg_xlogdump once it's been set up
+	# fix up pg_waldump once it's been set up
 	# files symlinked on Unix are copied on windows
-	my $pg_xlogdump = AddSimpleFrontend('pg_xlogdump');
-	$pg_xlogdump->AddDefine('FRONTEND');
+	my $pg_waldump = AddSimpleFrontend('pg_waldump');
+	$pg_waldump->AddDefine('FRONTEND');
 	foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c'))
 	{
-		$pg_xlogdump->AddFile($xf);
+		$pg_waldump->AddFile($xf);
 	}
-	$pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c');
+	$pg_waldump->AddFile('src/backend/access/transam/xlogreader.c');
 
 	$solution->Save();
 	return $solution->{vcver};
-- 
2.5.4 (Apple Git-61)

