Fix typos and grammar in docs and comments
authorMichael Paquier <[email protected]>
Thu, 24 Dec 2020 08:05:49 +0000 (17:05 +0900)
committerMichael Paquier <[email protected]>
Thu, 24 Dec 2020 08:05:49 +0000 (17:05 +0900)
This fixes several areas of the documentation and some comments in
matters of style, grammar, or even format.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20201222041153[email protected]

23 files changed:
contrib/pg_stat_statements/pg_stat_statements.c
doc/src/sgml/amcheck.sgml
doc/src/sgml/catalogs.sgml
doc/src/sgml/cube.sgml
doc/src/sgml/func.sgml
doc/src/sgml/logicaldecoding.sgml
doc/src/sgml/monitoring.sgml
doc/src/sgml/pgstatstatements.sgml
doc/src/sgml/rangetypes.sgml
doc/src/sgml/ref/create_type.sgml
doc/src/sgml/ref/explain.sgml
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_verifybackup.sgml
doc/src/sgml/ref/prepare.sgml
doc/src/sgml/sources.sgml
doc/src/sgml/wal.sgml
src/backend/access/transam/xlog.c
src/backend/partitioning/partprune.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_directory.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_upgrade/check.c
src/tools/msvc/README

index 00eeaf10576188bd8f2f5a8fc7cb1685dbbe96a9..196e1e214204fc1709c7dc521d58cacd4e585417 100644 (file)
@@ -191,7 +191,7 @@ typedef struct Counters
    double      usage;          /* usage factor */
    int64       wal_records;    /* # of WAL records generated */
    int64       wal_fpi;        /* # of WAL full page images generated */
-   uint64      wal_bytes;      /* total amount of WAL bytes generated */
+   uint64      wal_bytes;      /* total amount of WAL generated in bytes */
 } Counters;
 
 /*
index 99fad708bf7399848189e5461feaa69a032d8e9c..8dfb01a77be09a6b1ba0104f89643f232460b67c 100644 (file)
@@ -525,7 +525,7 @@ SET client_min_messages = DEBUG1;
   designed to diagnose corruption without undue risk.  It cannot guard
   against all causes of backend crashes, as even executing the calling
   query could be unsafe on a badly corrupted system.   Access to <link
-  linkend="catalogs-overview">catalog tables</link> are performed and could
+  linkend="catalogs-overview">catalog tables</link> is performed and could
   be problematic if the catalogs themselves are corrupted.
  </para>
 
index d98863604673a7629c4b787120d8d748664080fc..3a2266526c4af0c24fa1a3a66eb22220ac2c0d59 100644 (file)
@@ -4478,7 +4478,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
        inherited columns are to be arranged.  The count starts at 1.
       </para>
       <para>
-       Indexes can not have multiple inheritance, since they can only inherit
+       Indexes cannot have multiple inheritance, since they can only inherit
        when using declarative partitioning.
       </para></entry>
      </row>
index 3b39147d14d9d1644d899324e0ff0e88b677c124..3dd89bb14d739ab0f486c0adda12fe9ee220c6a1 100644 (file)
@@ -321,7 +321,7 @@ SELECT c FROM test ORDER BY c ~&gt; 3 DESC LIMIT 5;
         Makes a one dimensional cube.
        </para>
        <para>
-        <literal>cube(1,2)</literal>
+        <literal>cube(1, 2)</literal>
         <returnvalue>(1),(2)</returnvalue>
        </para></entry>
       </row>
index 2707e757ca08f91af9faac31b3e86983543c0287..93d17e4b558afce969ec0eab424850848c2f4d1d 100644 (file)
@@ -1274,7 +1274,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
         (truncates towards zero)
        </para>
        <para>
-        <literal>div(9,4)</literal>
+        <literal>div(9, 4)</literal>
         <returnvalue>2</returnvalue>
        </para></entry>
       </row>
@@ -1493,7 +1493,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
         <type>bigint</type>, and <type>numeric</type>
        </para>
        <para>
-        <literal>mod(9,4)</literal>
+        <literal>mod(9, 4)</literal>
         <returnvalue>1</returnvalue>
        </para></entry>
       </row>
@@ -1975,7 +1975,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
         result in radians
        </para>
        <para>
-        <literal>atan2(1,0)</literal>
+        <literal>atan2(1, 0)</literal>
         <returnvalue>1.5707963267948966</returnvalue>
        </para></entry>
       </row>
@@ -1995,7 +1995,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
         result in degrees
        </para>
        <para>
-        <literal>atan2d(1,0)</literal>
+        <literal>atan2d(1, 0)</literal>
         <returnvalue>90</returnvalue>
        </para></entry>
       </row>
index 813a037facec39442d7c2b3f4ab360ba33afaf07..ca78a81e9c545a42e0d375ba55bca8fdc5ee18a2 100644 (file)
@@ -953,11 +953,11 @@ stream_commit_cb(...);  &lt;-- commit of the streamed transaction
    <para>
     Similar to spill-to-disk behavior, streaming is triggered when the total
     amount of changes decoded from the WAL (for all in-progress transactions)
-    exceeds limit defined by <varname>logical_decoding_work_mem</varname> setting.
-    At that point the largest toplevel transaction (measured by amount of memory
+    exceeds the limit defined by <varname>logical_decoding_work_mem</varname> setting.
+    At that point, the largest toplevel transaction (measured by the amount of memory
     currently used for decoded changes) is selected and streamed.  However, in
-    some cases we still have to spill to the disk even if streaming is enabled
-    because if we cross the memory limit but we still have not decoded the
+    some cases we still have to spill to disk even if streaming is enabled
+    because we exceed the memory threshold but still have not decoded the
     complete tuple e.g., only decoded toast table insert but not the main table
     insert.
    </para>
index 52a69a536604a517f0b7f186086239c91d3e8b23..3d6c901306777caa56b6dfa6276d501f09b3d763 100644 (file)
@@ -3470,7 +3470,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        <structfield>wal_bytes</structfield> <type>numeric</type>
       </para>
       <para>
-       Total amount of WAL bytes generated
+       Total amount of WAL generated in bytes
       </para></entry>
      </row>
 
@@ -3479,7 +3479,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        <structfield>wal_buffers_full</structfield> <type>bigint</type>
       </para>
       <para>
-       Number of times WAL data was written to the disk because WAL buffers got full
+       Number of times WAL data was written to disk because WAL buffers became full
       </para></entry>
      </row>
 
index 126ee31d9fdd22255a752d412d9567b86d2f729e..464bf0e5aedbc940287bf35a6009558a3dbce23e 100644 (file)
        <structfield>wal_bytes</structfield> <type>numeric</type>
       </para>
       <para>
-       Total amount of WAL bytes generated by the statement
+       Total amount of WAL generated by the statement in bytes
       </para></entry>
      </row>
     </tbody>
index 83aa9bc4e9e40d5a0aa7c162134ea49de77e8955..859079c69cad948458931ed1aa5c78d70d7a810a 100644 (file)
@@ -29,7 +29,7 @@
 
  <para>
   Every range type has a corresponding multirange type. A multirange is
-  an ordered list of non-continguous, non-empty, non-null ranges. Most
+  an ordered list of non-contiguous, non-empty, non-null ranges. Most
   range operators also work on multiranges, and they have a few functions
   of their own.
  </para>
index 7d2d6aa0af846bf6ce8beac3674aa689fbb17be9..0b24a55505af66d16fbb56b5ad95cec75f05cb18 100644 (file)
@@ -180,10 +180,10 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
     The optional <replaceable class="parameter">multirange_type_name</replaceable>
     parameter specifies the name of the corresponding multirange type.  If not
     specified, this name is chosen automatically as follows.
-    If range type name contains <literal>range</literal> substring, then
-    multirange type name is formed by replacement of the <literal>range</literal>
-    substring with <literal>multirange</literal> substring in the range
-    type name.  Otherwise, multirange type name is formed by appending
+    If the range type name contains the substring <literal>range</literal>, then
+    the multirange type name is formed by replacement of the <literal>range</literal>
+    substring with <literal>multirange</literal> in the range
+    type name.  Otherwise, the multirange type name is formed by appending a
     <literal>_multirange</literal> suffix to the range type name.
    </para>
   </refsect2>
index b0ccdd26e7306b96257725a0bf7d0338372a8ab4..c4512332a068b57dcfc001c7abd5835db2597b64 100644 (file)
@@ -198,9 +198,9 @@ ROLLBACK;
     <listitem>
      <para>
       Include information on WAL record generation. Specifically, include the
-      number of records, number of full page images (fpi) and amount of WAL
-      bytes generated.  In text format, only non-zero values are printed.  This
-      parameter may only be used when <literal>ANALYZE</literal> is also
+      number of records, number of full page images (fpi) and the amount of WAL
+      generated in bytes. In text format, only non-zero values are printed.
+      This parameter may only be used when <literal>ANALYZE</literal> is also
       enabled.  It defaults to <literal>FALSE</literal>.
      </para>
     </listitem>
index 0aa35cf0c3b4c8f73a770b03cfd16a77b0ae5e18..dcb25dc3cd43f8c8aba574223c3979bc6f69ff58 100644 (file)
@@ -621,7 +621,7 @@ PostgreSQL documentation
       <listitem>
        <para>
         Specify the compression level to use.  Zero means no compression.
-        For the custom archive format, this specifies compression of
+        For the custom and directory archive formats, this specifies compression of
         individual table-data segments, and the default is to compress
         at a moderate level.
         For plain text output, setting a nonzero compression level causes
index a0989d3cd165fbe2641eded52e854c6babf6fc54..5f83c987063d930eb14cbc9f8d492bb55f9569e5 100644 (file)
@@ -40,7 +40,7 @@ PostgreSQL documentation
 
   <para>
    It is important to note that the validation which is performed by
-   <application>pg_verifybackup</application> does not and can not include
+   <application>pg_verifybackup</application> does not and cannot include
    every check which will be performed by a running server when attempting
    to make use of the backup. Even if you use this tool, you should still
    perform test restores and verify that the resulting databases work as
index 22ce28e517cde1b204c5f6bfb17abe154bb2b18c..aae91946c75760cb04e3415f38979e8bec0894ef 100644 (file)
@@ -184,7 +184,7 @@ EXPLAIN EXECUTE <replaceable>name</replaceable>(<replaceable>parameter_values</r
    analysis and planning of the statement, <productname>PostgreSQL</productname> will
    force re-analysis and re-planning of the statement before using it
    whenever database objects used in the statement have undergone
-   definitional (DDL) changes or the planner statistics of them have
+   definitional (DDL) changes or their planner statistics have
    been updated since the previous use of the prepared
    statement.  Also, if the value of <xref linkend="guc-search-path"/> changes
    from one use to the next, the statement will be re-parsed using the new
index 38a516080c189ac760940c5406a92190d5925027..62cf2fded401a6a8697dea075e872685a68dd153 100644 (file)
@@ -103,7 +103,7 @@ less -x4
     message text.  In addition there are optional elements, the most
     common of which is an error identifier code that follows the SQL spec's
     SQLSTATE conventions.
-    <function>ereport</function> itself is just a shell macro, that exists
+    <function>ereport</function> itself is just a shell macro that exists
     mainly for the syntactic convenience of making message generation
     look like a single function call in the C source code.  The only parameter
     accepted directly by <function>ereport</function> is the severity level.
index d1c3893b147ca50c8eda31024f073521a1692b4d..f4bc147b10684feb3f44a49867fe0375a0e21bb1 100644 (file)
    Independently of <varname>max_wal_size</varname>,
    the most recent <xref linkend="guc-wal-keep-size"/> megabytes of
    WAL files plus one additional WAL file are
-   kept at all times. Also, if WAL archiving is used, old segments can not be
+   kept at all times. Also, if WAL archiving is used, old segments cannot be
    removed or recycled until they are archived. If WAL archiving cannot keep up
    with the pace that WAL is generated, or if <varname>archive_command</varname>
    fails repeatedly, old WAL files will accumulate in <filename>pg_wal</filename>
index b1e5d2dbffd3bdd737f2e74105db0dde4704b25b..9867e1b4039cde1f25c2c97fdeb7f9ab2a5bc3b6 100644 (file)
@@ -10418,7 +10418,7 @@ get_sync_bit(int method)
     *
     * Never use O_DIRECT in walreceiver process for similar reasons; the WAL
     * written by walreceiver is normally read by the startup process soon
-    * after its written. Also, walreceiver performs unaligned writes, which
+    * after it's written. Also, walreceiver performs unaligned writes, which
     * don't work with O_DIRECT, so it is required for correctness too.
     */
    if (!XLogIsNeeded() && !AmWalReceiverProcess())
index 8e1187e31f55f29e58409defdc5d3b8c573c50b4..e7c7a6deb6a54de24c46d0814658d55bfa7099c8 100644 (file)
@@ -3119,7 +3119,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
    /*
     * If the smallest partition to return has MINVALUE (negative infinity) as
     * its lower bound, increment it to point to the next finite bound
-    * (supposedly its upper bound), so that we don't advertently end up
+    * (supposedly its upper bound), so that we don't inadvertently end up
     * scanning the default partition.
     */
    if (minoff < boundinfo->ndatums && partindices[minoff] < 0)
@@ -3138,7 +3138,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
     * If the previous greatest partition has MAXVALUE (positive infinity) as
     * its upper bound (something only possible to do with multi-column range
     * partitioning), we scan switch to it as the greatest partition to
-    * return.  Again, so that we don't advertently end up scanning the
+    * return.  Again, so that we don't inadvertently end up scanning the
     * default partition.
     */
    if (maxoff >= 1 && partindices[maxoff] < 0)
index 177360ed6e6fb5a896256444073f16da735b9f44..0847573339bfa2d9055d58421f5bdd62e8cb5db4 100644 (file)
@@ -329,10 +329,15 @@ struct _archiveHandle
    DumpId     *tableDataId;    /* TABLE DATA ids, indexed by table dumpId */
 
    struct _tocEntry *currToc;  /* Used when dumping data */
-   int         compression;    /* Compression requested on open Possible
-                                * values for compression: -1
-                                * Z_DEFAULT_COMPRESSION 0  COMPRESSION_NONE
-                                * 1-9 levels for gzip compression */
+   int         compression;    /*---------
+                                * Compression requested on open().
+                                * Possible values for compression:
+                                * -2   ZSTD_COMPRESSION
+                                * -1   Z_DEFAULT_COMPRESSION
+                                *  0   COMPRESSION_NONE
+                                * 1-9 levels for gzip compression
+                                *---------
+                                */
    bool        dosync;         /* data requested to be synced on sight */
    ArchiveMode mode;           /* File mode - r or w */
    void       *formatData;     /* Header data specific to file format */
index 48fa7cb1a38c368d12afeef6a19e2b0d6d7f9f28..650b542fce15d905ff0675d86bce51a49d57eb17 100644 (file)
@@ -4,7 +4,7 @@
  *
  * A directory format dump is a directory, which contains a "toc.dat" file
  * for the TOC, and a separate file for each data entry, named "<oid>.dat".
- * Large objects (BLOBs) are stored in separate files named "blob_<uid>.dat",
+ * Large objects (BLOBs) are stored in separate files named "blob_<oid>.dat",
  * and there's a plain-text TOC file for them called "blobs.toc". If
  * compression is used, each data file is individually compressed and the
  * ".gz" suffix is added to the filenames. The TOC files are never
index 8b1e5cc2b59d30c113408600651645dbd413d45a..1ab98a2286e2a83d81843515689db7bbf371ea5c 100644 (file)
@@ -7018,10 +7018,7 @@ getInherits(Archive *fout, int *numInherits)
    int         i_inhrelid;
    int         i_inhparent;
 
-   /*
-    * Find all the inheritance information, excluding implicit inheritance
-    * via partitioning.
-    */
+   /* find all the inheritance information */
    appendPQExpBufferStr(query, "SELECT inhrelid, inhparent FROM pg_inherits");
 
    res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
index 6685d517ffb27022db5f4634db084dcac727f800..f3afea9d56117af523f7224136443afccc50ef35 100644 (file)
@@ -247,8 +247,8 @@ output_completion_banner(char *deletion_script_file_name)
    }
 
    pg_log(PG_REPORT,
-          "Optimizer statistics are not transferred by pg_upgrade so,\n"
-          "once you start the new server, consider running:\n"
+          "Optimizer statistics are not transferred by pg_upgrade.\n"
+          "Once you start the new server, consider running:\n"
           "    %s/vacuumdb %s--all --analyze-in-stages\n\n", new_cluster.bindir, user_specification.data);
 
    if (deletion_script_file_name)
index d22fff331d67c752249561a84058f3627d6ea795..f1547594fd6891aa655608f86b1f06a5cdf4ceea 100644 (file)
@@ -81,7 +81,7 @@ VSObjectFactory.pm     factory module providing the code to create the
 Description of the internals of the Visual Studio build process
 ---------------------------------------------------------------
 By typing 'build' the user starts the build.bat wrapper which simply passes
-it's arguments to build.pl.
+its arguments to build.pl.
 In build.pl the user's buildenv.pl is used to set up the build environment
 (i. e. path to bison and flex). In addition his config.pl file is merged into
 config_default.pl to create the configuration arguments.