Put new command-line option into sensible order in help output
authorPeter Eisentraut <[email protected]>
Mon, 17 Apr 2023 09:09:17 +0000 (11:09 +0200)
committerPeter Eisentraut <[email protected]>
Mon, 17 Apr 2023 09:09:17 +0000 (11:09 +0200)
We have two existing conventions for long options: either alphabetical
among short options, or all long options after all the short options.
But the convention apparently used here, next to a functionally
related option, is not one of them.

doc/src/sgml/ref/pg_waldump.sgml
src/bin/pg_waldump/pg_waldump.c

index 300edc9fc41fd0e0a848eb0ab56107a329dc4d69..e5f9637847e5f0773106679536c1ce1808cdfad5 100644 (file)
@@ -241,6 +241,37 @@ PostgreSQL documentation
        </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>
+
+       <para>
+        If <application>pg_waldump</application> is terminated by signal
+        <systemitem>SIGINT</systemitem>
+        (<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo>),
+        the summary of the statistics computed is displayed up to the
+        termination point. This operation is not supported on
+        <productname>Windows</productname>.
+       </para>
+      </listitem>
+     </varlistentry>
+
      <varlistentry>
        <term><option>--save-fullpage=<replaceable>save_path</replaceable></option></term>
        <listitem>
@@ -307,37 +338,6 @@ PostgreSQL documentation
        </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>
-
-       <para>
-        If <application>pg_waldump</application> is terminated by signal
-        <systemitem>SIGINT</systemitem>
-        (<keycombo action="simul"><keycap>Control</keycap><keycap>C</keycap></keycombo>),
-        the summary of the statistics computed is displayed up to the
-        termination point. This operation is not supported on
-        <productname>Windows</productname>.
-       </para>
-      </listitem>
-     </varlistentry>
-
      <varlistentry>
       <term><option>-?</option></term>
       <term><option>--help</option></term>
index 8630000ef0b6c23a66d73415cbe7c3df20e4e4dc..c6d3ae63445da96f0b84012a361a462d199e0027 100644 (file)
@@ -774,11 +774,10 @@ usage(void)
             "                         (default: 1 or the value used in STARTSEG)\n"));
    printf(_("  -V, --version          output version information, then exit\n"));
    printf(_("  -w, --fullpage         only show records with a full page write\n"));
-   printf(_("      --save-fullpage=PATH\n"
-            "                         save full page images\n"));
    printf(_("  -x, --xid=XID          only show records with transaction ID XID\n"));
    printf(_("  -z, --stats[=record]   show statistics instead of records\n"
             "                         (optionally, show per-record statistics)\n"));
+   printf(_("  --save-fullpage=DIR    save full page images to DIR\n"));
    printf(_("  -?, --help             show this help, then exit\n"));
    printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
    printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);