initdb: document that -K requires an argument
authorBruce Momjian <[email protected]>
Sat, 26 Dec 2020 15:00:05 +0000 (10:00 -0500)
committerBruce Momjian <[email protected]>
Sat, 26 Dec 2020 15:00:05 +0000 (10:00 -0500)
Reported-by: "Shinoda, Noriyoshi"
Discussion: https://postgr.es/m/TU4PR8401MB1152E92B4D44C81E496D6032EEDB0@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM

Author: "Shinoda, Noriyoshi"

Backpatch-through: msater

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

index 44a2d69d326be1ff8a4d4f8590f955afdf9e993e..d994f407faaa1adeaf585812fd4287ff6f608350 100644 (file)
@@ -236,8 +236,8 @@ PostgreSQL documentation
 
      <varlistentry id="app-initdb-file-encryption-keylen"
       xreflabel="file encryption">
-      <term><option>-K</option></term>
-      <term><option>--file-encryption-keylen</option></term>
+      <term><option>-K <replaceable class="parameter">length</replaceable></option></term>
+      <term><option>--file-encryption-keylen=<replaceable class="parameter">length</replaceable></option></term>
       <listitem>
        <para>
         Specifies the number of bits for the file encryption keys.  The
index 4d07ce6e3ffbfc2f929476e803653ae0cdbfa452..33a11e0d2bf788444becbbd63ea81db9adf7093a 100644 (file)
@@ -2318,7 +2318,7 @@ usage(const char *progname)
             "                            to obtain the cluster key\n"));
    printf(_("  -d, --debug               generate lots of debugging output\n"));
    printf(_("  -k, --data-checksums      use data page checksums\n"));
-   printf(_("  -K, --file-encryption-keylen\n"
+   printf(_("  -K, --file-encryption-keylen=LENGTH\n"
             "                            bit length of the file encryption key\n"));
    printf(_("  -L DIRECTORY              where to find the input files\n"));
    printf(_("  -n, --no-clean            do not clean up after errors\n"));
@@ -3008,7 +3008,7 @@ main(int argc, char *argv[])
        {"wal-segsize", required_argument, NULL, 12},
        {"data-checksums", no_argument, NULL, 'k'},
        {"authprompt", no_argument, NULL, 'R'},
-       {"file-encryption-keylen", no_argument, NULL, 'K'},
+       {"file-encryption-keylen", required_argument, NULL, 'K'},
        {"allow-group-access", no_argument, NULL, 'g'},
        {"cluster-key-command", required_argument, NULL, 'c'},
        {"copy-encryption-keys", required_argument, NULL, 'u'},