As I did last 2 years, I reviewed docs for v14...

This year I've started early, since it takes more than a little effort and it's
not much fun to argue the change in each individual hunk.

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581
>From 5b5fec23af33b25f261a875dcd26c60564df0d89 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 18:28:36 -0500
Subject: [PATCH] pgindent typos

Note that there's two changes to one line in lexi.c
---
 io.c   | 4 ++--
 lexi.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/io.c b/io.c
index fbaa5dd..a4812b6 100644
--- a/io.c
+++ b/io.c
@@ -452,8 +452,8 @@ fill_buffer(void)
  *
  * ALGORITHM: Put tabs and/or blanks into pobuf, then write pobuf.
  *
- * PARAMETERS: current         integer         The current column target
- * nteger              The desired column
+ * PARAMETERS: current         integer         The current column
+ * target                       integer                The desired column
  *
  * RETURNS: Integer value of the new column.  (If current >= target, no action 
is
  * taken, and current is returned.
diff --git a/lexi.c b/lexi.c
index d43723c..f01596a 100644
--- a/lexi.c
+++ b/lexi.c
@@ -442,7 +442,7 @@ lexi(struct parser_state *state)
                                         * then following sign is unary */
            state->last_u_d = true;     /* will make "int a -1" work */
        return (ident);         /* the ident is not in the list */
-    }                          /* end of procesing for alpanum character */
+    }                          /* end of processing for alphanum character */
 
     /* Scan a non-alphanumeric token */
 
-- 
2.17.0

>From 478a412b6475c1a7527cc58593f79c7ae5ba21cb Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 14 Nov 2020 23:09:21 -0600
Subject: [PATCH 01/17] typos in master

---
 doc/src/sgml/datatype.sgml           | 2 +-
 src/backend/access/transam/xlog.c    | 2 +-
 src/backend/partitioning/partprune.c | 4 ++--
 src/tools/msvc/README                | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 58d168c763..55d79c02f5 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -639,7 +639,7 @@ NUMERIC
 
     <para>
      The <literal>NaN</literal> (not a number) value is used to represent
-     undefined calculational results.  In general, any operation with
+     undefined computational results.  In general, any operation with
      a <literal>NaN</literal> input yields another <literal>NaN</literal>.
      The only exception is when the operation's other inputs are such that
      the same output would be obtained if the <literal>NaN</literal> were to
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 158d5fdedc..3fb3a4c107 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -10439,7 +10439,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())
diff --git a/src/backend/partitioning/partprune.c b/src/backend/partitioning/partprune.c
index 8e1187e31f..e7c7a6deb6 100644
--- a/src/backend/partitioning/partprune.c
+++ b/src/backend/partitioning/partprune.c
@@ -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)
diff --git a/src/tools/msvc/README b/src/tools/msvc/README
index d22fff331d..f1547594fd 100644
--- a/src/tools/msvc/README
+++ b/src/tools/msvc/README
@@ -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.
-- 
2.17.0

>From 356f9834845e6f8e7fd2304e743f34c8cf7fe609 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 13:53:08 -0500
Subject: [PATCH 02/17] producement?  fcec6caafa2346b6c9d3ad5065e417733bd63cd9

Previously discussed at
https://www.postgresql.org/message-id/20201102062203.GA15770%40paquier.xyz

Should backpatch
---
 src/backend/utils/adt/xml.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 4c299057a6..ab3151cefb 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -4535,11 +4535,11 @@ XmlTableFetchRow(TableFuncScanState *state)
 	xtCxt = GetXmlTableBuilderPrivateData(state, "XmlTableFetchRow");
 
 	/*
-	 * XmlTable returns table - set of composite values. The error context, is
-	 * used for producement more values, between two calls, there can be
-	 * created and used another libxml2 error context. It is libxml2 global
-	 * value, so it should be refreshed any time before any libxml2 usage,
-	 * that is finished by returning some value.
+	 * XmlTable returns a table-set of composite values. The error context is
+	 * used for providing more detail. Between two calls, other libxml2
+	 * error contexts might have been created and used ; since they're libxml2 
+	 * global values, they should be refreshed each time before any libxml2 usage
+	 * that finishes by returning some value.
 	 */
 	xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
 
-- 
2.17.0

>From 4952649d41a0936cc727666556a3c5e4e2062655 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 15 Nov 2020 10:23:32 -0600
Subject: [PATCH 03/17] cannot

---
 doc/src/sgml/catalogs.sgml            | 2 +-
 doc/src/sgml/protocol.sgml            | 4 ++--
 doc/src/sgml/ref/pg_verifybackup.sgml | 2 +-
 doc/src/sgml/wal.sgml                 | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index e0192822ff..1a23bf37ac 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -4489,7 +4489,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>
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 4899bacda7..8fc1427d0a 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1532,8 +1532,8 @@ SELCT 1/0;<!-- this typo is intentional -->
     support to <productname>PostgreSQL</productname>.  In this case the
     connection must be closed, but the frontend might choose to open a fresh
     connection and proceed without requesting <acronym>GSSAPI</acronym>
-    encryption.  Given the length limits specified above, the ErrorMessage can
-    not be confused with a proper response from the server with an appropriate
+    encryption.  Given the length limits specified above, the ErrorMessage
+    cannot be confused with a proper response from the server with an appropriate
     length.
    </para>
 
diff --git a/doc/src/sgml/ref/pg_verifybackup.sgml b/doc/src/sgml/ref/pg_verifybackup.sgml
index a0989d3cd1..5f83c98706 100644
--- a/doc/src/sgml/ref/pg_verifybackup.sgml
+++ b/doc/src/sgml/ref/pg_verifybackup.sgml
@@ -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
diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml
index f2de982626..18a0855c2a 100644
--- a/doc/src/sgml/wal.sgml
+++ b/doc/src/sgml/wal.sgml
@@ -677,7 +677,7 @@
    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>
-- 
2.17.0

>From 34e34f6793f1914824f00d07d5219612c0afe09c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 29 Nov 2020 12:48:26 -0600
Subject: [PATCH 04/17] Spaces after function arguments

See also: c5f42daa6077a4c309c5280a47d0e114c12dc572

https://www.postgresql.org/message-id/flat/5937341605894405%40mail.yandex.ru#c2a4bd4c587354896daf07e7646fe211
---
 doc/src/sgml/cube.sgml | 2 +-
 doc/src/sgml/func.sgml | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/cube.sgml b/doc/src/sgml/cube.sgml
index 3b39147d14..3dd89bb14d 100644
--- a/doc/src/sgml/cube.sgml
+++ b/doc/src/sgml/cube.sgml
@@ -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>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index fb469500be..e7bba65182 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -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>
-- 
2.17.0

>From 0e04b2b34baa74e93d73accce81c552eb90c49bd Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Wed, 2 Dec 2020 17:22:49 -0600
Subject: [PATCH 05/17] Fix partially-updated comment

f0e44751d: implements partitioning and changed query to exclude partitioned tables
44c528810: Change the way pg_dump retrieves partitioning info (but failed to update comment)
0896ae561: Partially updated comment
---
 src/bin/pg_dump/pg_dump.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 8b1e5cc2b5..1ab98a2286 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -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);
-- 
2.17.0

>From 0f8a643c73e16d719c6b39abc16530a4fcbc6ebc Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Thu, 28 Mar 2019 18:50:03 -0500
Subject: [PATCH 06/17] review docs for pg12dev (broken commas)

---
 doc/src/sgml/sources.sgml  | 2 +-
 src/bin/pg_upgrade/check.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index 38a516080c..62cf2fded4 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -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.
diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c
index 6685d517ff..f3afea9d56 100644
--- a/src/bin/pg_upgrade/check.c
+++ b/src/bin/pg_upgrade/check.c
@@ -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)
-- 
2.17.0

>From d3143bb77a796253cd7ebd1e9983ae0eb723cb3d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 5 Dec 2020 22:43:12 -0600
Subject: [PATCH 07/17] pg_restore: "must be specified" and --list

This was discussed here, but the idea got lost.
https://www.postgresql.org/message-id/flat/20190612170201.GA11881%40alvherre.pgsql#2984347ab074e6f198bd294fa41884df

Note that -d and -f are exclusive.
Perhaps we should also reject -d and -l ?
---
 src/bin/pg_dump/pg_restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 589b4aed53..742e4140eb 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -305,7 +305,7 @@ main(int argc, char **argv)
 	/* Complain if neither -f nor -d was specified (except if dumping TOC) */
 	if (!opts->cparams.dbname && !opts->filename && !opts->tocSummary)
 	{
-		pg_log_error("one of -d/--dbname and -f/--file must be specified");
+		pg_log_error("one of -d/--dbname, -f/--file or -l/--list must be specified");
 		exit_nicely(1);
 	}
 
-- 
2.17.0

>From 5113e2dd28000b5c19ce6765dab80161e8f71849 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Mon, 21 Dec 2020 00:32:32 -0600
Subject: [PATCH 08/17] pg_dump: fix pre-existing docs/comments

---
 doc/src/sgml/ref/pg_dump.sgml         | 2 +-
 src/bin/pg_dump/pg_backup_directory.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 0aa35cf0c3..dcb25dc3cd 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -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
diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c
index 48fa7cb1a3..650b542fce 100644
--- a/src/bin/pg_dump/pg_backup_directory.c
+++ b/src/bin/pg_dump/pg_backup_directory.c
@@ -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
-- 
2.17.0

>From 2e08805ffcb088e2a53edbd7f917ac04405af83a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 12 Dec 2020 00:11:37 -0600
Subject: [PATCH 09/17] Fix malformed comment..

broken since bf50caf10.
---
 src/bin/pg_dump/pg_backup_archiver.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h
index 177360ed6e..6a5a22637b 100644
--- a/src/bin/pg_dump/pg_backup_archiver.h
+++ b/src/bin/pg_dump/pg_backup_archiver.h
@@ -329,9 +329,12 @@ 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
+	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 */
-- 
2.17.0

>From d8c88d949a7d165d89f928fbb21847213416f06a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 03:30:25 -0600
Subject: [PATCH 10/17] Doc review for min_dynamic_shared_memory: 84b1c63ad

---
 doc/src/sgml/config.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 7c9045fda0..87d72f814b 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1939,13 +1939,13 @@ include_dir 'conf.d'
       <listitem>
        <para>
         Specifies the amount of memory that should be allocated at server
-        startup time for use by parallel queries.  When this memory region is
+        startup for use by parallel queries.  When this memory region is
         insufficient or exhausted by concurrent queries, new parallel queries
         try to allocate extra shared memory temporarily from the operating
         system using the method configured with
         <varname>dynamic_shared_memory_type</varname>, which may be slower due
         to memory management overheads.  Memory that is allocated at startup
-        time with <varname>min_dynamic_shared_memory</varname> is affected by
+        with <varname>min_dynamic_shared_memory</varname> is affected by
         the <varname>huge_pages</varname> setting on operating systems where
         that is supported, and may be more likely to benefit from larger pages
         on operating systems where that is managed automatically.
-- 
2.17.0

>From d2d06b49e9d1dac229421dd9be83196328720345 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 04:26:03 -0600
Subject: [PATCH 11/17] Doc review for pg_stat_replication_slots: 986816750

---
 doc/src/sgml/monitoring.sgml | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index ea5a56f66d..5fa8c351e6 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -317,7 +317,7 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
      <row>
       <entry><structname>pg_stat_replication_slots</structname><indexterm><primary>pg_stat_replication_slots</primary></indexterm></entry>
       <entry>One row per replication slot, showing statistics about
-       replication slot usage.
+       the replication slot's usage.
        See <link linkend="monitoring-pg-stat-replication-slots-view">
        <structname>pg_stat_replication_slots</structname></link> for details.
       </entry>
@@ -2600,10 +2600,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
         <structfield>spill_txns</structfield> <type>bigint</type>
        </para>
        <para>
-        Number of transactions spilled to disk after the memory used by
-        logical decoding of changes from WAL for this slot exceeds
+        Number of transactions spilled to disk because the memory used by
+        logical decoding of changes from WAL for this slot exceeded
         <literal>logical_decoding_work_mem</literal>. The counter gets
-        incremented both for toplevel transactions and subtransactions.
+        incremented for both toplevel transactions and subtransactions.
       </para></entry>
      </row>
 
@@ -2613,8 +2613,8 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        </para>
        <para>
         Number of times transactions were spilled to disk while decoding changes
-        from WAL for this slot. Transactions may get spilled repeatedly, and
-        this counter gets incremented on every such invocation.
+        from WAL for this slot. A given transaction may be spilled multiple times, and
+        this counter is incremented each time.
       </para></entry>
      </row>
 
@@ -2636,10 +2636,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        </para>
        <para>
         Number of in-progress transactions streamed to the decoding output plugin
-        after the memory used by logical decoding of changes from WAL for this
-        slot exceeds <literal>logical_decoding_work_mem</literal>. Streaming only
+        because the memory used by logical decoding of changes from WAL for this
+        slot exceeded <literal>logical_decoding_work_mem</literal>. Streaming only
         works with toplevel transactions (subtransactions can't be streamed
-        independently), so the counter does not get incremented for subtransactions.
+        independently), so the counter is not incremented for subtransactions.
        </para></entry>
      </row>
 
@@ -2650,8 +2650,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        <para>
         Number of times in-progress transactions were streamed to the decoding
         output plugin while decoding changes from WAL for this slot. Transactions
-        may get streamed repeatedly, and this counter gets incremented on every
-        such invocation.
+        may be streamed multiple times, and this counter is incremented each time.
       </para></entry>
      </row>
 
@@ -4970,10 +4969,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        </para>
        <para>
          Resets statistics to zero for a single replication slot, or for all
-         replication slots in the cluster.  The argument can be either the name
-         of the slot to reset the stats or NULL.  If the argument is NULL, all
-         counters shown in the <structname>pg_stat_replication_slots</structname>
-         view for all replication slots are reset.
+         replication slots in the cluster.  The argument can be either NULL or the name
+         of a slot for which stats are to be reset.  If the argument is NULL, all
+         counters in the <structname>pg_stat_replication_slots</structname>
+         view are reset for all replication slots.
        </para>
        <para>
          This function is restricted to superusers by default, but other users
-- 
2.17.0

>From cee81f1d29ea7c7ee0a4bc7da80ee10903865229 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 04:06:43 -0600
Subject: [PATCH 12/17] Doc review for pg_stat_wal: 8d9a93596

---
 doc/src/sgml/monitoring.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 5fa8c351e6..941cf1877b 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -3476,7 +3476,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>
 
-- 
2.17.0

>From 760f6ecff89194571524d610e5ece2dbeec6d373 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 03:27:23 -0600
Subject: [PATCH 13/17] Doc review for logical decoding stream methods:
 45fdc9738

See also:
9e0f87a4955ede0769d2f9a93171145b6ddab901
8e90ec5580d5345fef31005d7cc2215ba2125070
---
 doc/src/sgml/logicaldecoding.sgml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 813a037fac..ca78a81e9c 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -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>
-- 
2.17.0

>From 8d039f846a3d82d152a4b46aeec8593d760d73b5 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 05:01:24 -0600
Subject: [PATCH 14/17] Doc review for amcheck: access .. is performed
 866e24d47db1743dfcff5bd595b57e3a143f2cb1

See also 4c49d8fc15eeb1dc69b0ddb2d986a1884a5d7f5f
---
 doc/src/sgml/amcheck.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index 99fad708bf..8dfb01a77b 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -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>
 
-- 
2.17.0

>From 2e5cbad993c3f972709f148688dc7acb34a0999f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 05:27:07 -0600
Subject: [PATCH 15/17] Doc review for prepared statements:
 4a36eab79a193700b7b65baf6c09c795c90c02c6

---
 doc/src/sgml/ref/prepare.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/prepare.sgml b/doc/src/sgml/ref/prepare.sgml
index 22ce28e517..aae91946c7 100644
--- a/doc/src/sgml/ref/prepare.sgml
+++ b/doc/src/sgml/ref/prepare.sgml
@@ -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
-- 
2.17.0

>From 2ee65cf6eacd78be3eef6a2478b83804870f0e95 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Dec 2020 05:32:16 -0600
Subject: [PATCH 16/17] Doc review for WAL counters: "amount of bytes"

6b466bf5f pg_stat_statements (should backpatch to v13)
01469241b pg_stat_wal

It's correct to say "number of bytes" or "amount of WAL in bytes" but not
"amount of bytes".

I suggested "number of bytes" in April but didn't argue for it.
https://www.postgresql.org/message-id/20200406163420.GE2228%40telsasoft.com
https://www.postgresql.org/message-id/CAOBaU_Z6BKS01-DvSU30UMOKLHJGdrvehJbhqfOXcMq%3DYzHXUA%40mail.gmail.com
---
 contrib/pg_stat_statements/pg_stat_statements.c | 2 +-
 doc/src/sgml/monitoring.sgml                    | 2 +-
 doc/src/sgml/pgstatstatements.sgml              | 2 +-
 doc/src/sgml/ref/explain.sgml                   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 00eeaf1057..ac83a2c571 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -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 number of WAL bytes generated */
 } Counters;
 
 /*
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 941cf1877b..d26fb57ab6 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -3467,7 +3467,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>
 
diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml
index 126ee31d9f..3de4a2f754 100644
--- a/doc/src/sgml/pgstatstatements.sgml
+++ b/doc/src/sgml/pgstatstatements.sgml
@@ -360,7 +360,7 @@
        <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 (bytes)
       </para></entry>
      </row>
     </tbody>
diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml
index b0ccdd26e7..9eaff92682 100644
--- a/doc/src/sgml/ref/explain.sgml
+++ b/doc/src/sgml/ref/explain.sgml
@@ -198,7 +198,7 @@ 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
+      number of records, number of full page images (fpi) and number 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
       enabled.  It defaults to <literal>FALSE</literal>.
-- 
2.17.0

>From e5b4e3829de309ace1d0e867deb24aa240a83eb1 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 20 Dec 2020 00:04:17 -0600
Subject: [PATCH 17/17] Doc review for multiranges: 6df7a9698

---
 doc/src/sgml/rangetypes.sgml      | 2 +-
 doc/src/sgml/ref/create_type.sgml | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/rangetypes.sgml b/doc/src/sgml/rangetypes.sgml
index 83aa9bc4e9..859079c69c 100644
--- a/doc/src/sgml/rangetypes.sgml
+++ b/doc/src/sgml/rangetypes.sgml
@@ -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>
diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml
index 7d2d6aa0af..0b24a55505 100644
--- a/doc/src/sgml/ref/create_type.sgml
+++ b/doc/src/sgml/ref/create_type.sgml
@@ -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>
-- 
2.17.0

Reply via email to