pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Typos
54+ messages / 15 participants
[nested] [flat]

* Typos
@ 2011-03-30 05:34  Fujii Masao <masao.fujii@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Fujii Masao @ 2011-03-30 05:34 UTC (permalink / raw)
  To: pgsql-hackers

Hi,

The attached patch fixes two typos.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachments:

  [application/octet-stream] typos_v1.patch (1.1K, ../../AANLkTinfy1XP38pNdKNC4qF758cRF0UgBx3m_w6Jds-2@mail.gmail.com/2-typos_v1.patch)
  download | inline diff:
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index f76b5b0..2e2659a 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -506,7 +506,7 @@ ProcessRepliesIfAny(void)
 			default:
 				ereport(FATAL,
 						(errcode(ERRCODE_PROTOCOL_VIOLATION),
-						 errmsg("invalid standby closing message type %d",
+						 errmsg("invalid standby message type %d",
 								firstchar)));
 		}
 	}
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index dcdb1a9..42da1a8 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -2869,7 +2869,7 @@ PQparamtype(const PGresult *res, int param_num)
 
 /* PQsetnonblocking:
  *	sets the PGconn's database connection non-blocking if the arg is TRUE
- *	or makes it non-blocking if the arg is FALSE, this will not protect
+ *	or makes it blocking if the arg is FALSE, this will not protect
  *	you from PQexec(), you'll only be safe when using the non-blocking API.
  *	Needs to be called only on a connected database connection.
  */


^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: Typos
@ 2011-03-30 05:59  Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
  parent: Fujii Masao <masao.fujii@gmail.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Heikki Linnakangas @ 2011-03-30 05:59 UTC (permalink / raw)
  To: Fujii Masao <masao.fujii@gmail.com>; +Cc: pgsql-hackers

On 30.03.2011 08:34, Fujii Masao wrote:
> The attached patch fixes two typos.

Thanks, applied.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* typos
@ 2014-03-24 06:40  Erik Rijkers <er@xs4all.nl>
  0 siblings, 1 reply; 54+ messages in thread

From: Erik Rijkers @ 2014-03-24 06:40 UTC (permalink / raw)
  To: pgsql-hackers

A few 'the the' typos in code & docs.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

  [text/x-diff] thethe.patch (1.9K, ../../8baa40942b7a19618668ada3779e209a.squirrel@webmail.xs4all.nl/2-thethe.patch)
  download | inline diff:
--- src/backend/access/transam/xlog.c.orig	2014-03-23 22:43:44.864504319 +0100
+++ src/backend/access/transam/xlog.c	2014-03-23 22:44:02.735634100 +0100
@@ -1089,7 +1089,7 @@
 	 * has progressed. There is a small fixed number of insertion locks,
 	 * determined by the num_xloginsert_locks GUC. When an inserter crosses a
 	 * page boundary, it updates the value stored in the lock to the how far it
-	 * has inserted, to allow the the previous buffer to be flushed.
+	 * has inserted, to allow the previous buffer to be flushed.
 	 *
 	 * Holding onto an insertion lock also protects RedoRecPtr and
 	 * fullPageWrites from changing until the insertion is finished.
--- doc/src/sgml/json.sgml.orig	2014-03-23 22:44:19.622807673 +0100
+++ doc/src/sgml/json.sgml	2014-03-23 22:44:37.082954235 +0100
@@ -24,7 +24,7 @@
   There are two JSON data types: <type>json</> and <type>jsonb</>.
   Both accept <emphasis>almost</emphasis> identical sets of values as
   input.  The major practical difference is one of efficiency.  The
-  <type>json</> data type stores an exact copy of the the input text,
+  <type>json</> data type stores an exact copy of the input text,
   which processing functions must continually reparse, while
   <type>jsonb</> data is stored in a decomposed binary format that
   makes it slightly less efficient to input due to added serialization
--- doc/src/sgml/logicaldecoding.sgml.orig	2014-03-23 22:44:54.198118825 +0100
+++ doc/src/sgml/logicaldecoding.sgml	2014-03-23 22:45:14.746112339 +0100
@@ -169,7 +169,7 @@
     </indexterm>
     <title>Logical Decoding</title>
     <para>
-     Logical decoding is the the process of extracting all persistent changes
+     Logical decoding is the process of extracting all persistent changes
      to a database's tables into a coherent, easy to understand format which
      can be interpreted without detailed knowledge of the database's internal
      state.

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2014-03-24 06:42  Heikki Linnakangas <hlinnakangas@vmware.com>
  parent: Erik Rijkers <er@xs4all.nl>
  0 siblings, 0 replies; 54+ messages in thread

From: Heikki Linnakangas @ 2014-03-24 06:42 UTC (permalink / raw)
  To: Erik Rijkers <er@xs4all.nl>; +Cc: pgsql-hackers

On 03/24/2014 08:40 AM, Erik Rijkers wrote:
> A few 'the the' typos in code & docs.

Thanks, fixed.

- Heikki


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* [PATCH 3/4] typos
@ 2020-11-28 22:58  Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Justin Pryzby @ 2020-11-28 22:58 UTC (permalink / raw)

---
 src/bin/pg_dump/pg_dump.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 990f890ff4..43e3a022d5 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -316,9 +316,9 @@ static void read_options_from_file(char *filename,
 #define OPTIONS_FILE_OPT_NUMBER			12
 
 /*
- * It assign the values of options to related DumpOption fields or to
- * some global values. It is called from twice. First, for processing
- * the command line argumens. Second, for processing an options from
+ * It assigns the values of options to related DumpOption fields or to
+ * some global values. It is called twice. First, for processing
+ * the command line arguments. Second, for processing options from
  * options file.
  */
 static bool
@@ -18711,8 +18711,8 @@ exit_invalid_optfile_format(FILE *fp,
 }
 
 /*
- * Reads an option argument from file. Supports double qoutes
- * bounded strings. In this case multi lines strings are supported.
+ * Reads an option argument from file. Supports double-quoted
+ * strings. In this case multi-line strings are supported.
  */
 static void
 read_optarg(FILE *fp,
@@ -18796,7 +18796,7 @@ read_optarg(FILE *fp,
 		}
 	}
 
-	/* check garbage after optarg, but ignore white spaces */
+	/* check garbage after optarg, but ignore white-space */
 	while (isspace(*str))
 		str++;
 
-- 
2.17.0


--7CZp05NP8/gJM8Cl
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0004-Allow-option-file-to-include-options-files.patch"



^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* typos
@ 2021-09-24 21:58  Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Justin Pryzby @ 2021-09-24 21:58 UTC (permalink / raw)
  To: pgsql-hackers

A compilation of fixes for master.

The first patch should be applied to v13 - the typo was already fixed in master
but not backpatched.
From 8496bfa328d40cce9afdc4b491243a3ab9b0b528 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 24 Sep 2021 16:19:54 -0500
Subject: [PATCH] unused COLUMNS (plural)

This was fixed in master since 1ed6b8956, but the typo should be backpatched
since it's user-facing documentation publicized on the website for the next 5
years
---
 doc/src/sgml/catalogs.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 304196c216..0e4d7617c4 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -4704,7 +4704,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
 
   <para>
-   Unused column contain zeroes. For example, <structfield>oprleft</structfield>
+   Unused columns contain zeroes. For example, <structfield>oprleft</structfield>
    is zero for a prefix operator.
   </para>
 
-- 
2.17.0

Attachments:

  [text/plain] 0001-unused-COLUMNS-plural.patch13- (964B, ../../20210924215827.GS831@telsasoft.com/2-0001-unused-COLUMNS-plural.patch13-)
  download | inline diff:
From 8496bfa328d40cce9afdc4b491243a3ab9b0b528 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 24 Sep 2021 16:19:54 -0500
Subject: [PATCH] unused COLUMNS (plural)

This was fixed in master since 1ed6b8956, but the typo should be backpatched
since it's user-facing documentation publicized on the website for the next 5
years
---
 doc/src/sgml/catalogs.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 304196c216..0e4d7617c4 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -4704,7 +4704,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
 
   <para>
-   Unused column contain zeroes. For example, <structfield>oprleft</structfield>
+   Unused columns contain zeroes. For example, <structfield>oprleft</structfield>
    is zero for a prefix operator.
   </para>
 
-- 
2.17.0

  [text/x-diff] 0001-Avoid-double-parens.patch (5.6K, ../../20210924215827.GS831@telsasoft.com/3-0001-Avoid-double-parens.patch)
  download | inline diff:
From f65f3b4d7523ba2e40bb4913fd225308426f7a9c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 28 Apr 2021 14:12:49 -0500
Subject: [PATCH 01/10] Avoid double parens

git grep -l '\<if (([^(]*))' '*.c'
---
 contrib/amcheck/verify_heapam.c          | 6 +++---
 contrib/ltree/ltree_io.c                 | 6 +++---
 src/backend/access/transam/xact.c        | 6 +++---
 src/backend/commands/tablecmds.c         | 2 +-
 src/backend/nodes/nodeFuncs.c            | 4 ++--
 src/backend/replication/logical/decode.c | 2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c
index 173f99d787..0ac52b6ba2 100644
--- a/contrib/amcheck/verify_heapam.c
+++ b/contrib/amcheck/verify_heapam.c
@@ -406,13 +406,13 @@ verify_heapam(PG_FUNCTION_ARGS)
 													   &vmbuffer);
 			if (skip_option == SKIP_PAGES_ALL_FROZEN)
 			{
-				if ((mapbits & VISIBILITYMAP_ALL_FROZEN) != 0)
+				if (mapbits & VISIBILITYMAP_ALL_FROZEN)
 					continue;
 			}
 
 			if (skip_option == SKIP_PAGES_ALL_VISIBLE)
 			{
-				if ((mapbits & VISIBILITYMAP_ALL_VISIBLE) != 0)
+				if (mapbits & VISIBILITYMAP_ALL_VISIBLE)
 					continue;
 			}
 		}
@@ -690,7 +690,7 @@ check_tuple_header(HeapCheckContext *ctx)
 			report_corruption(ctx,
 							  psprintf("tuple data should begin at byte %u, but actually begins at byte %u (1 attribute, has nulls)",
 									   expected_hoff, ctx->tuphdr->t_hoff));
-		else if ((infomask & HEAP_HASNULL))
+		else if (infomask & HEAP_HASNULL)
 			report_corruption(ctx,
 							  psprintf("tuple data should begin at byte %u, but actually begins at byte %u (%u attributes, has nulls)",
 									   expected_hoff, ctx->tuphdr->t_hoff, ctx->natts));
diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c
index 15115cb29f..b75f35d5b5 100644
--- a/contrib/ltree/ltree_io.c
+++ b/contrib/ltree/ltree_io.c
@@ -661,17 +661,17 @@ deparse_lquery(const lquery *in)
 				}
 				memcpy(ptr, curtlevel->name, curtlevel->len);
 				ptr += curtlevel->len;
-				if ((curtlevel->flag & LVAR_SUBLEXEME))
+				if (curtlevel->flag & LVAR_SUBLEXEME)
 				{
 					*ptr = '%';
 					ptr++;
 				}
-				if ((curtlevel->flag & LVAR_INCASE))
+				if (curtlevel->flag & LVAR_INCASE)
 				{
 					*ptr = '@';
 					ptr++;
 				}
-				if ((curtlevel->flag & LVAR_ANYEND))
+				if (curtlevel->flag & LVAR_ANYEND)
 				{
 					*ptr = '*';
 					ptr++;
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 6597ec45a9..8350a8fd19 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -2427,7 +2427,7 @@ PrepareTransaction(void)
 	 * cases, such as a temp table created and dropped all within the
 	 * transaction.  That seems to require much more bookkeeping though.
 	 */
-	if ((MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE))
+	if (MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE)
 		ereport(ERROR,
 				(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 				 errmsg("cannot PREPARE a transaction that has operated on temporary objects")));
@@ -5540,7 +5540,7 @@ XactLogCommitRecord(TimestampTz commit_time,
 		xl_xinfo.xinfo |= XACT_COMPLETION_UPDATE_RELCACHE_FILE;
 	if (forceSyncCommit)
 		xl_xinfo.xinfo |= XACT_COMPLETION_FORCE_SYNC_COMMIT;
-	if ((xactflags & XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK))
+	if (xactflags & XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK)
 		xl_xinfo.xinfo |= XACT_XINFO_HAS_AE_LOCKS;
 
 	/*
@@ -5691,7 +5691,7 @@ XactLogAbortRecord(TimestampTz abort_time,
 
 	xlrec.xact_time = abort_time;
 
-	if ((xactflags & XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK))
+	if (xactflags & XACT_FLAGS_ACQUIREDACCESSEXCLUSIVELOCK)
 		xl_xinfo.xinfo |= XACT_XINFO_HAS_AE_LOCKS;
 
 	if (nsubxacts > 0)
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index dbee6ae199..e018cdfd9e 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -16309,7 +16309,7 @@ PreCommit_on_commit_actions(void)
 				 * relations, we can skip truncating ON COMMIT DELETE ROWS
 				 * tables, as they must still be empty.
 				 */
-				if ((MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE))
+				if (MyXactFlags & XACT_FLAGS_ACCESSEDTEMPNAMESPACE)
 					oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid);
 				break;
 			case ONCOMMIT_DROP:
diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index e276264882..e5e82cb85f 100644
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -2390,7 +2390,7 @@ query_tree_walker(Query *query,
 	 * don't contain actual expressions. However they do contain OIDs which
 	 * may be needed by dependency walkers etc.
 	 */
-	if ((flags & QTW_EXAMINE_SORTGROUP))
+	if (flags & QTW_EXAMINE_SORTGROUP)
 	{
 		if (walker((Node *) query->groupClause, context))
 			return true;
@@ -3328,7 +3328,7 @@ query_tree_mutator(Query *query,
 	 * may be of interest to some mutators.
 	 */
 
-	if ((flags & QTW_EXAMINE_SORTGROUP))
+	if (flags & QTW_EXAMINE_SORTGROUP)
 	{
 		MUTATE(query->groupClause, query->groupClause, List *);
 		MUTATE(query->windowClause, query->windowClause, List *);
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 2874dc0612..fc9a0d67c9 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -337,7 +337,7 @@ DecodeXactOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
 					ReorderBufferXidSetCatalogChanges(ctx->reorder, xid,
 													  buf->origptr);
 				}
-				else if ((!ctx->fast_forward))
+				else if (!ctx->fast_forward)
 					ReorderBufferImmediateInvalidation(ctx->reorder,
 													   invals->nmsgs,
 													   invals->msgs);
-- 
2.17.0

  [text/x-diff] 0002-Deforming-is-never-done-for-Virtual-TTS-since-36d22d.patch (967B, ../../20210924215827.GS831@telsasoft.com/4-0002-Deforming-is-never-done-for-Virtual-TTS-since-36d22d.patch)
  download | inline diff:
From 1a29c1f78a3db80843a6358d810ba9988978bd76 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 24 Apr 2021 17:02:52 -0500
Subject: [PATCH 02/10] Deforming is never done for Virtual TTS since
 36d22dd95bc87ca68e742da91f47f8826f8758c9

---
 src/backend/jit/llvm/llvmjit_deform.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/backend/jit/llvm/llvmjit_deform.c b/src/backend/jit/llvm/llvmjit_deform.c
index 008cd617f6..3221f28b8f 100644
--- a/src/backend/jit/llvm/llvmjit_deform.c
+++ b/src/backend/jit/llvm/llvmjit_deform.c
@@ -89,9 +89,7 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc,
 
 	int			attnum;
 
-	/* virtual tuples never need deforming, so don't generate code */
-	if (ops == &TTSOpsVirtual)
-		return NULL;
+	Assert (ops != &TTSOpsVirtual);
 
 	/* decline to JIT for slot types we don't know to handle */
 	if (ops != &TTSOpsHeapTuple && ops != &TTSOpsBufferHeapTuple &&
-- 
2.17.0

  [text/x-diff] 0003-Fix-comment-wrong-since-bf2a691e02d7766f185d9d8e0f09.patch (1.1K, ../../20210924215827.GS831@telsasoft.com/5-0003-Fix-comment-wrong-since-bf2a691e02d7766f185d9d8e0f09.patch)
  download | inline diff:
From c60b92790cad887c17c5fe5db2461cda7e269412 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 20 Aug 2021 19:40:52 -0500
Subject: [PATCH 03/10] Fix comment wrong since
 bf2a691e02d7766f185d9d8e0f092222a5c0a129

---
 src/backend/statistics/extended_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 5fa36e0036..542271c9e4 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -701,7 +701,7 @@ examine_expression(Node *expr, int stattarget)
 /*
  * Using 'vacatts' of size 'nvacatts' as input data, return a newly built
  * VacAttrStats array which includes only the items corresponding to
- * attributes indicated by 'stxkeys'. If we don't have all of the per column
+ * attributes indicated by 'attrs'. If we don't have all of the per column
  * stats available to compute the extended stats, then we return NULL to indicate
  * to the caller that the stats should not be built.
  */
-- 
2.17.0

  [text/x-diff] 0004-tablefunc.c-Fix-comment.patch (996B, ../../20210924215827.GS831@telsasoft.com/6-0004-tablefunc.c-Fix-comment.patch)
  download | inline diff:
From 4f625ad0574d3a56153cc05edacbbad717fc82e0 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 8 May 2021 08:12:46 -0500
Subject: [PATCH 04/10] tablefunc.c: Fix comment

Mentioned at: https://www.postgresql.org/message-id/CAJRYxuKmMkgHFKjuYPxThdT5Mjg%2Bg-nH5szYbS8UoVsQXzd95A%40mail.gmail.com
---
 contrib/tablefunc/tablefunc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c
index 779bd4415e..52b272f298 100644
--- a/contrib/tablefunc/tablefunc.c
+++ b/contrib/tablefunc/tablefunc.c
@@ -1480,7 +1480,7 @@ validateConnectbyTupleDesc(TupleDesc td, bool show_branch, bool show_serial)
 						"fifth column must be type %s",
 						format_type_be(INT4OID))));
 
-	/* check that the type of the fifth column is INT4 */
+	/* check that the type of the fourth column is INT4 */
 	if (!show_branch && show_serial &&
 		TupleDescAttr(td, 3)->atttypid != INT4OID)
 		ereport(ERROR,
-- 
2.17.0

  [text/x-diff] 0005-Language-fixen-interval-round-values-when-spilling-t.patch (1.2K, ../../20210924215827.GS831@telsasoft.com/7-0005-Language-fixen-interval-round-values-when-spilling-t.patch)
  download | inline diff:
From 2e01267cd3473e5e4042594c28cda553a8624929 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 8 Aug 2021 04:42:07 -0500
Subject: [PATCH 05/10] Language fixen: interval:  round values when spilling
 to months

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

diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 50a2c8e5f1..6929f3bb18 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -2844,7 +2844,7 @@ P <optional> <replaceable>years</replaceable>-<replaceable>months</replaceable>-
      weeks'</literal> or <literal>'01:02:03.45'</literal>.  However,
      because interval internally stores only three integer units (months,
      days, microseconds), fractional units must be spilled to smaller
-     units.  Fractional parts of units greater than months is rounded to
+     units.  Fractional parts of units greater than months are rounded to
      be an integer number of months, e.g. <literal>'1.5 years'</literal>
      becomes <literal>'1 year 6 mons'</literal>.  Fractional parts of
      weeks and days are computed to be an integer number of days and
-- 
2.17.0

  [text/x-diff] 0006-Refer-to-plural-statistics-OBJECTS.patch (4.2K, ../../20210924215827.GS831@telsasoft.com/8-0006-Refer-to-plural-statistics-OBJECTS.patch)
  download | inline diff:
From 4de9716fa39c4fa4fcce3ce80432bc06dda94f91 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 12 Sep 2021 23:45:05 -0500
Subject: [PATCH 06/10] Refer to plural statistics OBJECTS

See also: f04c9a61468904b6815b2bc73a48878817766e0e
---
 src/backend/commands/statscmds.c        |  4 ++--
 src/backend/statistics/extended_stats.c | 12 ++++++------
 src/backend/utils/adt/selfuncs.c        |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index afe6744e23..d6be3218ad 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -869,8 +869,8 @@ ChooseExtendedStatisticNameAddition(List *exprs)
 }
 
 /*
- * StatisticsGetRelation: given a statistics's relation OID, get the OID of
- * the relation it is an statistics on.  Uses the system cache.
+ * StatisticsGetRelation: given a statistics object's OID, get the OID of
+ * the relation it is defined on.  Uses the system cache.
  */
 Oid
 StatisticsGetRelation(Oid statId, bool missing_ok)
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 542271c9e4..0a7d12d467 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -182,7 +182,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows,
 			continue;
 		}
 
-		/* compute statistics target for this statistics */
+		/* compute statistics target for this statistics object */
 		stattarget = statext_compute_stattarget(stat->stattarget,
 												bms_num_members(stat->columns),
 												stats);
@@ -195,7 +195,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows,
 		if (stattarget == 0)
 			continue;
 
-		/* evaluate expressions (if the statistics has any) */
+		/* evaluate expressions (if the statistics object has any) */
 		data = make_build_data(onerel, stat, numrows, rows, stats, stattarget);
 
 		/* compute statistic of each requested type */
@@ -257,7 +257,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows,
  * when analyzing only some of the columns, this will skip statistics objects
  * that would require additional columns.
  *
- * See statext_compute_stattarget for details about how we compute statistics
+ * See statext_compute_stattarget for details about how we compute the statistics
  * target for a statistics object (from the object target, attribute targets
  * and default statistics target).
  */
@@ -329,7 +329,7 @@ ComputeExtStatisticsRows(Relation onerel,
  *
  * When computing target for extended statistics objects, we consider three
  * places where the target may be set - the statistics object itself,
- * attributes the statistics is defined on, and then the default statistics
+ * attributes the statistics object is defined on, and then the default statistics
  * target.
  *
  * First we look at what's set for the statistics object itself, using the
@@ -1789,8 +1789,8 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli
 
 			/*
 			 * The clause was not estimated yet, and we've extracted either
-			 * attnums of expressions from it. Ignore it if it's not fully
-			 * covered by the chosen statistics.
+			 * attnums or expressions from it. Ignore it if it's not fully
+			 * covered by the chosen statistics object.
 			 *
 			 * We need to check both attributes and expressions, and reject if
 			 * either is not covered.
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 0c8c05f6c2..65ab651eb5 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -3443,7 +3443,7 @@ estimate_num_groups(PlannerInfo *root, List *groupExprs, double input_rows,
 		 * expression, treat it as a single variable even if it's really more
 		 * complicated.
 		 *
-		 * XXX This has the consequence that if there's a statistics on the
+		 * XXX This has the consequence that if there's a statistics object on the
 		 * expression, we don't split it into individual Vars. This affects
 		 * our selection of statistics in estimate_multivariate_ndistinct,
 		 * because it's probably better to use more accurate estimate for each
-- 
2.17.0

  [text/x-diff] 0007-Recheck-arg-is-not-needed-since-2011.patch (1.3K, ../../20210924215827.GS831@telsasoft.com/9-0007-Recheck-arg-is-not-needed-since-2011.patch)
  download | inline diff:
From 06edd9994d405497e342dff41798123939072532 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 24 Sep 2021 14:18:52 -0500
Subject: [PATCH 07/10] Recheck arg is not needed since 2011

It was added at: a4dde3bff36dac1ac0b699becad6f103d861a874
And not used since: 7e2f906201c8bb95f7fb17e56b8740c38bda5441
---
 src/backend/commands/cluster.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 9d22f648a8..ef9485c833 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -398,7 +398,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params)
 
 	/* Check heap and index are valid to cluster on */
 	if (OidIsValid(indexOid))
-		check_index_is_clusterable(OldHeap, indexOid, recheck, AccessExclusiveLock);
+		check_index_is_clusterable(OldHeap, indexOid, AccessExclusiveLock);
 
 	/*
 	 * Quietly ignore the request if this is a materialized view which has not
@@ -440,7 +440,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params)
  * protection here.
  */
 void
-check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck, LOCKMODE lockmode)
+check_index_is_clusterable(Relation OldHeap, Oid indexOid, LOCKMODE lockmode)
 {
 	Relation	OldIndex;
 
-- 
2.17.0

  [text/x-diff] 0008-Add-some-missing-newlines-after-function-definitions.patch (1.5K, ../../20210924215827.GS831@telsasoft.com/10-0008-Add-some-missing-newlines-after-function-definitions.patch)
  download | inline diff:
From 435b990351aa49b756952c95b089345b6333ba4e Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 5 Jul 2021 11:16:38 -0500
Subject: [PATCH 08/10] Add some missing newlines after function definitions

---
 src/backend/access/gin/ginlogic.c      | 1 +
 src/backend/access/rmgrdesc/heapdesc.c | 1 +
 src/backend/utils/mmgr/freepage.c      | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c
index 6bf3288f5b..3c6a782b19 100644
--- a/src/backend/access/gin/ginlogic.c
+++ b/src/backend/access/gin/ginlogic.c
@@ -58,6 +58,7 @@ trueConsistentFn(GinScanKey key)
 	key->recheckCurItem = false;
 	return true;
 }
+
 static GinTernaryValue
 trueTriConsistentFn(GinScanKey key)
 {
diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c
index 5c29fd9eae..1a5b8f7902 100644
--- a/src/backend/access/rmgrdesc/heapdesc.c
+++ b/src/backend/access/rmgrdesc/heapdesc.c
@@ -114,6 +114,7 @@ heap_desc(StringInfo buf, XLogReaderState *record)
 		appendStringInfo(buf, "off %u", xlrec->offnum);
 	}
 }
+
 void
 heap2_desc(StringInfo buf, XLogReaderState *record)
 {
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index e4ee1aab97..d253108d90 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -270,6 +270,7 @@ sum_free_pages_recurse(FreePageManager *fpm, FreePageBtree *btp, Size *sum)
 		}
 	}
 }
+
 static Size
 sum_free_pages(FreePageManager *fpm)
 {
-- 
2.17.0

  [text/x-diff] 0009-Wrong-function-name-in-header-comment.patch (4.2K, ../../20210924215827.GS831@telsasoft.com/11-0009-Wrong-function-name-in-header-comment.patch)
  download | inline diff:
From 00f9370421c81b691a98dd3f0f3680dede6cf0e8 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 5 Sep 2021 18:14:39 -0500
Subject: [PATCH 09/10] Wrong function name in header comment

Found like this

for f in `find src -type f -name '*.c'`; do awk -v p=0 '/^\/\* *-*$/{h=$0; getline; h=h"\n"$0; g=gensub( "[^_[:alnum:]].*", "", 1, $2); p=1} 0&&/^{/{p=0; print h}; /^ \*\/$/{h=h"\n"$0; getline a; h=h"\n"a; getline f; h=h"\n"f; l=length(g); if (substr(f,1,7) == substr(g,1,7) && substr(f,1,l) != substr(g,1,l)) print FILENAME,g,f,"\n"h; next} 0&&/^[^s/ {]/{p=0; h=""; next} 0&&p{h=h"\n"$0}' "$f"; done |less
---
 src/backend/executor/nodeTableFuncscan.c | 18 +++++++++---------
 src/backend/optimizer/util/pathnode.c    |  2 +-
 src/common/pg_lzcompress.c               |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/backend/executor/nodeTableFuncscan.c b/src/backend/executor/nodeTableFuncscan.c
index 27dfa1b956..f9fafa9e5b 100644
--- a/src/backend/executor/nodeTableFuncscan.c
+++ b/src/backend/executor/nodeTableFuncscan.c
@@ -14,11 +14,11 @@
  */
 /*
  * INTERFACE ROUTINES
- *		ExecTableFuncscan		scans a function.
+ *		ExecTableFuncScan		scans a function.
  *		ExecFunctionNext		retrieve next tuple in sequential order.
- *		ExecInitTableFuncscan	creates and initializes a TableFuncscan node.
- *		ExecEndTableFuncscan		releases any storage allocated.
- *		ExecReScanTableFuncscan rescans the function
+ *		ExecInitTableFuncScan	creates and initializes a TableFuncscan node.
+ *		ExecEndTableFuncScan		releases any storage allocated.
+ *		ExecReScanTableFuncScan rescans the function
  */
 #include "postgres.h"
 
@@ -46,7 +46,7 @@ static void tfuncLoadRows(TableFuncScanState *tstate, ExprContext *econtext);
 /* ----------------------------------------------------------------
  *		TableFuncNext
  *
- *		This is a workhorse for ExecTableFuncscan
+ *		This is a workhorse for ExecTableFuncScan
  * ----------------------------------------------------------------
  */
 static TupleTableSlot *
@@ -84,7 +84,7 @@ TableFuncRecheck(TableFuncScanState *node, TupleTableSlot *slot)
 }
 
 /* ----------------------------------------------------------------
- *		ExecTableFuncscan(node)
+ *		ExecTableFuncScan(node)
  *
  *		Scans the function sequentially and returns the next qualifying
  *		tuple.
@@ -103,7 +103,7 @@ ExecTableFuncScan(PlanState *pstate)
 }
 
 /* ----------------------------------------------------------------
- *		ExecInitTableFuncscan
+ *		ExecInitTableFuncScan
  * ----------------------------------------------------------------
  */
 TableFuncScanState *
@@ -205,7 +205,7 @@ ExecInitTableFuncScan(TableFuncScan *node, EState *estate, int eflags)
 }
 
 /* ----------------------------------------------------------------
- *		ExecEndTableFuncscan
+ *		ExecEndTableFuncScan
  *
  *		frees any storage allocated through C routines.
  * ----------------------------------------------------------------
@@ -234,7 +234,7 @@ ExecEndTableFuncScan(TableFuncScanState *node)
 }
 
 /* ----------------------------------------------------------------
- *		ExecReScanTableFuncscan
+ *		ExecReScanTableFuncScan
  *
  *		Rescans the relation.
  * ----------------------------------------------------------------
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index d7ff5d82cf..ebccd21155 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -105,7 +105,7 @@ compare_path_costs(Path *path1, Path *path2, CostSelector criterion)
 }
 
 /*
- * compare_path_fractional_costs
+ * compare_fractional_path_costs
  *	  Return -1, 0, or +1 according as path1 is cheaper, the same cost,
  *	  or more expensive than path2 for fetching the specified fraction
  *	  of the total tuples.
diff --git a/src/common/pg_lzcompress.c b/src/common/pg_lzcompress.c
index a30a2c2eb8..72e6a7ea61 100644
--- a/src/common/pg_lzcompress.c
+++ b/src/common/pg_lzcompress.c
@@ -825,7 +825,7 @@ pglz_decompress(const char *source, int32 slen, char *dest,
 
 
 /* ----------
- * pglz_max_compressed_size -
+ * pglz_maximum_compressed_size -
  *
  *		Calculate the maximum compressed size for a given amount of raw data.
  *		Return the maximum size, or total compressed size if maximum size is
-- 
2.17.0

  [text/x-diff] 0010-incorrect-file-names-in-header-comment.patch (8.3K, ../../20210924215827.GS831@telsasoft.com/12-0010-incorrect-file-names-in-header-comment.patch)
  download | inline diff:
From 44d5df71acc2ca8b16362755647509b8c6b8c3cc Mon Sep 17 00:00:00 2001
From: Zhihong Yu <zyu@yugabyte.com>
Date: Fri, 10 Sep 2021 11:28:17 -0700
Subject: [PATCH 10/10] incorrect file names in header comment

awk by Justin, patch by Zhihong Yu

find src -name '*.[ch]' -type f -print0 |xargs -r0 awk '{fn=gensub(".*/", "", "1", FILENAME)} FILENAME~/scripts/{fn=gensub("\\.c","", 1, fn)} FNR==1 && /---$/{top=1} /\*\//{top=0} !top{next} FNR>1 && FNR<4 && NF==2 && $2!=fn{print FILENAME,"head",fn,$2} /IDENTIFICATION/{getline; if ($0!~FILENAME){print FILENAME,"foot",$2}}'
---
 src/backend/catalog/pg_publication.c            | 2 +-
 src/backend/commands/publicationcmds.c          | 2 +-
 src/backend/commands/subscriptioncmds.c         | 2 +-
 src/backend/optimizer/util/appendinfo.c         | 2 +-
 src/backend/optimizer/util/inherit.c            | 2 +-
 src/backend/replication/logical/logicalfuncs.c  | 2 +-
 src/backend/replication/logical/reorderbuffer.c | 2 +-
 src/backend/replication/logical/snapbuild.c     | 2 +-
 src/backend/utils/activity/backend_progress.c   | 4 ++--
 src/backend/utils/activity/backend_status.c     | 2 +-
 src/backend/utils/activity/wait_event.c         | 2 +-
 src/include/replication/pgoutput.h              | 2 +-
 src/include/utils/dynahash.h                    | 5 +++--
 src/port/pgcheckdir.c                           | 4 +++-
 14 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index 9cd0c82f93..83432b476c 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		pg_publication.c
+ *		src/backend/catalog/pg_publication.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 9c7f91611d..4b99815ad6 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		publicationcmds.c
+ *		src/backend/commands/publicationcmds.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index c47ba26369..ee700e456d 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		subscriptioncmds.c
+ *		src/backend/commands/subscriptioncmds.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/optimizer/util/appendinfo.c b/src/backend/optimizer/util/appendinfo.c
index af46f581ac..d696d9cbf9 100644
--- a/src/backend/optimizer/util/appendinfo.c
+++ b/src/backend/optimizer/util/appendinfo.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/optimizer/path/appendinfo.c
+ *	  src/backend/optimizer/util/appendinfo.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c
index c758172efa..ff4250368d 100644
--- a/src/backend/optimizer/util/inherit.c
+++ b/src/backend/optimizer/util/inherit.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/optimizer/path/inherit.c
+ *	  src/backend/optimizer/util/inherit.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c
index e59939aad1..5c4efb0dcf 100644
--- a/src/backend/replication/logical/logicalfuncs.c
+++ b/src/backend/replication/logical/logicalfuncs.c
@@ -9,7 +9,7 @@
  * Copyright (c) 2012-2021, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *	  src/backend/replication/logicalfuncs.c
+ *	  src/backend/replication/logical/logicalfuncs.c
  *-------------------------------------------------------------------------
  */
 
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 46e66608cf..3564b3bb82 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/replication/reorderbuffer.c
+ *	  src/backend/replication/logical/reorderbuffer.c
  *
  * NOTES
  *	  This module gets handed individual pieces of transactions in the order
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index a14a3d6900..fb12791f39 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -110,7 +110,7 @@
  * Copyright (c) 2012-2021, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *	  src/backend/replication/snapbuild.c
+ *	  src/backend/replication/logical/snapbuild.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c
index 6743e68cef..1d6c999415 100644
--- a/src/backend/utils/activity/backend_progress.c
+++ b/src/backend/utils/activity/backend_progress.c
@@ -1,11 +1,11 @@
 /* ----------
- * progress.c
+ * backend_progress.c
  *
  *	Command progress reporting infrastructure.
  *
  *	Copyright (c) 2001-2021, PostgreSQL Global Development Group
  *
- *	src/backend/postmaster/progress.c
+ *	src/backend/utils/activity/backend_progress.c
  * ----------
  */
 #include "postgres.h"
diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c
index 7229598822..0aa3750c65 100644
--- a/src/backend/utils/activity/backend_status.c
+++ b/src/backend/utils/activity/backend_status.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/postmaster/backend_status.c
+ *	  src/backend/utils/activity/backend_status.c
  * ----------
  */
 #include "postgres.h"
diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c
index ef7e6bfb77..d0fd888f78 100644
--- a/src/backend/utils/activity/wait_event.c
+++ b/src/backend/utils/activity/wait_event.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/postmaster/wait_event.c
+ *	  src/backend/utils/activity/wait_event.c
  *
  * NOTES
  *
diff --git a/src/include/replication/pgoutput.h b/src/include/replication/pgoutput.h
index 0dc460fb70..4bcea9b745 100644
--- a/src/include/replication/pgoutput.h
+++ b/src/include/replication/pgoutput.h
@@ -6,7 +6,7 @@
  * Copyright (c) 2015-2021, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *		pgoutput.h
+ *		src/include/replication/pgoutput.h
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h
index 2f6adc2ef9..e5a52bc34c 100644
--- a/src/include/utils/dynahash.h
+++ b/src/include/utils/dynahash.h
@@ -1,13 +1,14 @@
 /*-------------------------------------------------------------------------
  *
- * dynahash
+ * dynahash.h
  *	  POSTGRES dynahash.h file definitions
  *
  *
  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * src/include/utils/dynahash.h
+ * IDENTIFICATION
+ *		src/include/utils/dynahash.h
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/port/pgcheckdir.c b/src/port/pgcheckdir.c
index 9fb2f23bdd..f19f33944c 100644
--- a/src/port/pgcheckdir.c
+++ b/src/port/pgcheckdir.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * src/port/pgcheckdir.c
+ * pgcheckdir.c
  *
  * A simple subroutine to check whether a directory exists and is empty or not.
  * Useful in both initdb and the backend.
@@ -8,6 +8,8 @@
  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
+ * IDENTIFICATION
+ *		src/port/pgcheckdir.c
  *-------------------------------------------------------------------------
  */
 
-- 
2.17.0

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* typos
@ 2022-01-24 03:00  Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-01-24 03:00 UTC (permalink / raw)
  To: pgsql-hackers; +Cc: Michael Paquier <michael@paquier.xyz>

Most of this is new in v15 or doesn't affect user-facing docs so doesn't need
to be backpatched.

Feel free to ignore this for now and revisit in April...

@Michael: I'm not sure what this is trying to say.
1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8
+      First, scan the directory where the WAL segment files are written and
+      find the newest completed segment file, using as starting point the
+      beginning of the next WAL segment file. This is calculated independently
+      on the compression method used to compress each segment.

I suppose it should say independently *of* the compression method, but then I
still don't know what it means.  I checked FindStreamingStart().
It that doesn't look like it's "calculated independently" - actually, it takes
the compression method into account and explicitly handles each compression
method.

Is there any reason the user-facing docs need to say anything about this at
all?

Attachments:

  [text/x-diff] 0001-incorrect-file-names-in-header-comment.patch (8.3K, ../../20220124030001.GQ23027@telsasoft.com/2-0001-incorrect-file-names-in-header-comment.patch)
  download | inline diff:
From 0804cee992872f4d4bb1c12edf027da3027dcc28 Mon Sep 17 00:00:00 2001
From: Zhihong Yu <zyu@yugabyte.com>
Date: Fri, 10 Sep 2021 11:28:17 -0700
Subject: [PATCH 01/33] incorrect file names in header comment

awk by Justin, patch by Zhihong Yu

find src -name '*.[ch]' -type f -print0 |xargs -r0 awk '{fn=gensub(".*/", "", "1", FILENAME)} FILENAME~/scripts/{fn=gensub("\\.c","", 1, fn)} FNR==1 && /---$/{top=1} /\*\//{top=0} !top{next} FNR>1 && FNR<4 && NF==2 && $2!=fn{print FILENAME,"head",fn,$2} /IDENTIFICATION/{getline; if ($0!~FILENAME){print FILENAME,"foot",$2}}'
---
 src/backend/catalog/pg_publication.c            | 2 +-
 src/backend/commands/publicationcmds.c          | 2 +-
 src/backend/commands/subscriptioncmds.c         | 2 +-
 src/backend/optimizer/util/appendinfo.c         | 2 +-
 src/backend/optimizer/util/inherit.c            | 2 +-
 src/backend/replication/logical/logicalfuncs.c  | 2 +-
 src/backend/replication/logical/reorderbuffer.c | 2 +-
 src/backend/replication/logical/snapbuild.c     | 2 +-
 src/backend/utils/activity/backend_progress.c   | 4 ++--
 src/backend/utils/activity/backend_status.c     | 2 +-
 src/backend/utils/activity/wait_event.c         | 2 +-
 src/include/replication/pgoutput.h              | 2 +-
 src/include/utils/dynahash.h                    | 5 +++--
 src/port/pgcheckdir.c                           | 4 +++-
 14 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index cf0700f8ba0..e14ca2f5630 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		pg_publication.c
+ *		src/backend/catalog/pg_publication.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 3ab1bdeae1b..0e4bb97fb73 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		publicationcmds.c
+ *		src/backend/commands/publicationcmds.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index f5eba450ceb..3ef6607d246 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *		subscriptioncmds.c
+ *		src/backend/commands/subscriptioncmds.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/optimizer/util/appendinfo.c b/src/backend/optimizer/util/appendinfo.c
index b8039c323b6..2f06fa743c2 100644
--- a/src/backend/optimizer/util/appendinfo.c
+++ b/src/backend/optimizer/util/appendinfo.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/optimizer/path/appendinfo.c
+ *	  src/backend/optimizer/util/appendinfo.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c
index 8c5dc659474..7e134822f36 100644
--- a/src/backend/optimizer/util/inherit.c
+++ b/src/backend/optimizer/util/inherit.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/optimizer/path/inherit.c
+ *	  src/backend/optimizer/util/inherit.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c
index 4f633888b4f..4d71e71f686 100644
--- a/src/backend/replication/logical/logicalfuncs.c
+++ b/src/backend/replication/logical/logicalfuncs.c
@@ -9,7 +9,7 @@
  * Copyright (c) 2012-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *	  src/backend/replication/logicalfuncs.c
+ *	  src/backend/replication/logical/logicalfuncs.c
  *-------------------------------------------------------------------------
  */
 
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index d317a626e1e..19b2ba2000c 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/replication/reorderbuffer.c
+ *	  src/backend/replication/logical/reorderbuffer.c
  *
  * NOTES
  *	  This module gets handed individual pieces of transactions in the order
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index ab04e946bc2..83fca8a77d9 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -110,7 +110,7 @@
  * Copyright (c) 2012-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *	  src/backend/replication/snapbuild.c
+ *	  src/backend/replication/logical/snapbuild.c
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c
index e5958fa77c5..f29199725b7 100644
--- a/src/backend/utils/activity/backend_progress.c
+++ b/src/backend/utils/activity/backend_progress.c
@@ -1,11 +1,11 @@
 /* ----------
- * progress.c
+ * backend_progress.c
  *
  *	Command progress reporting infrastructure.
  *
  *	Copyright (c) 2001-2022, PostgreSQL Global Development Group
  *
- *	src/backend/postmaster/progress.c
+ *	src/backend/utils/activity/backend_progress.c
  * ----------
  */
 #include "postgres.h"
diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c
index 2fecf26a2c3..c7ed1e6d7ac 100644
--- a/src/backend/utils/activity/backend_status.c
+++ b/src/backend/utils/activity/backend_status.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/postmaster/backend_status.c
+ *	  src/backend/utils/activity/backend_status.c
  * ----------
  */
 #include "postgres.h"
diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c
index 0f5f18f02e0..36c4c0fd052 100644
--- a/src/backend/utils/activity/wait_event.c
+++ b/src/backend/utils/activity/wait_event.c
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *	  src/backend/postmaster/wait_event.c
+ *	  src/backend/utils/activity/wait_event.c
  *
  * NOTES
  *
diff --git a/src/include/replication/pgoutput.h b/src/include/replication/pgoutput.h
index fe1d0892aa6..78aa9151ef5 100644
--- a/src/include/replication/pgoutput.h
+++ b/src/include/replication/pgoutput.h
@@ -6,7 +6,7 @@
  * Copyright (c) 2015-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *		pgoutput.h
+ *		src/include/replication/pgoutput.h
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h
index 28fa58a6629..4564fb2467a 100644
--- a/src/include/utils/dynahash.h
+++ b/src/include/utils/dynahash.h
@@ -1,13 +1,14 @@
 /*-------------------------------------------------------------------------
  *
- * dynahash
+ * dynahash.h
  *	  POSTGRES dynahash.h file definitions
  *
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * src/include/utils/dynahash.h
+ * IDENTIFICATION
+ *		src/include/utils/dynahash.h
  *
  *-------------------------------------------------------------------------
  */
diff --git a/src/port/pgcheckdir.c b/src/port/pgcheckdir.c
index 75dbb147d71..6c09cf29810 100644
--- a/src/port/pgcheckdir.c
+++ b/src/port/pgcheckdir.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * src/port/pgcheckdir.c
+ * pgcheckdir.c
  *
  * A simple subroutine to check whether a directory exists and is empty or not.
  * Useful in both initdb and the backend.
@@ -8,6 +8,8 @@
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
+ * IDENTIFICATION
+ *		src/port/pgcheckdir.c
  *-------------------------------------------------------------------------
  */
 
-- 
2.17.1

  [text/x-diff] 0002-Add-some-missing-newlines-after-function-definitions.patch (1.5K, ../../20220124030001.GQ23027@telsasoft.com/3-0002-Add-some-missing-newlines-after-function-definitions.patch)
  download | inline diff:
From 98a9b6dab9b9554eee90b1b53dfba155d8d8d547 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 5 Jul 2021 11:16:38 -0500
Subject: [PATCH 02/33] Add some missing newlines after function definitions

---
 src/backend/access/gin/ginlogic.c      | 1 +
 src/backend/access/rmgrdesc/heapdesc.c | 1 +
 src/backend/utils/mmgr/freepage.c      | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c
index c38c27fbae2..62f98f9cfaf 100644
--- a/src/backend/access/gin/ginlogic.c
+++ b/src/backend/access/gin/ginlogic.c
@@ -58,6 +58,7 @@ trueConsistentFn(GinScanKey key)
 	key->recheckCurItem = false;
 	return true;
 }
+
 static GinTernaryValue
 trueTriConsistentFn(GinScanKey key)
 {
diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c
index 6238085d65e..342fb95d869 100644
--- a/src/backend/access/rmgrdesc/heapdesc.c
+++ b/src/backend/access/rmgrdesc/heapdesc.c
@@ -114,6 +114,7 @@ heap_desc(StringInfo buf, XLogReaderState *record)
 		appendStringInfo(buf, "off %u", xlrec->offnum);
 	}
 }
+
 void
 heap2_desc(StringInfo buf, XLogReaderState *record)
 {
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index b26a295a4ea..eb281823bc2 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -270,6 +270,7 @@ sum_free_pages_recurse(FreePageManager *fpm, FreePageBtree *btp, Size *sum)
 		}
 	}
 }
+
 static Size
 sum_free_pages(FreePageManager *fpm)
 {
-- 
2.17.1

  [text/x-diff] 0003-Remove-extranous-blank-in-function-header-comment-3e.patch (676B, ../../20220124030001.GQ23027@telsasoft.com/4-0003-Remove-extranous-blank-in-function-header-comment-3e.patch)
  download | inline diff:
From f01579632a3928e482cea8904dcc451bf803dca5 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 31 Oct 2021 18:44:03 -0500
Subject: [PATCH 03/33] Remove extranous blank in function header comment -
 3eb77eba5a51780d5cf52cd66a9844cd4d26feb0

---
 src/backend/storage/sync/sync.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c
index 11fa17ddea2..543f691f2d2 100644
--- a/src/backend/storage/sync/sync.c
+++ b/src/backend/storage/sync/sync.c
@@ -274,7 +274,6 @@ SyncPostCheckpoint(void)
 }
 
 /*
-
  *	ProcessSyncRequests() -- Process queued fsync requests.
  */
 void
-- 
2.17.1

  [text/x-diff] 0004-Remove-cases-of-comma-space-space.patch (2.7K, ../../20220124030001.GQ23027@telsasoft.com/5-0004-Remove-cases-of-comma-space-space.patch)
  download | inline diff:
From d747320b94896b194f517253242069cfd5659e57 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 10 Oct 2021 19:54:38 -0500
Subject: [PATCH 04/33] Remove cases of comma space space

---
 src/backend/access/gin/ginget.c  | 4 ++--
 src/backend/commands/indexcmds.c | 2 +-
 src/backend/statistics/mcv.c     | 2 +-
 src/pl/plperl/plperl.c           | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c
index a1751c86ccd..b4ed5ea6080 100644
--- a/src/backend/access/gin/ginget.c
+++ b/src/backend/access/gin/ginget.c
@@ -1319,8 +1319,8 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
 			GinScanKey	key = so->keys + i;
 
 			/*
-			 * If we're considering a lossy page, skip excludeOnly keys,  They
-			 * can't exclude the whole page anyway.
+			 * If we're considering a lossy page, skip excludeOnly keys.
+			 * They can't exclude the whole page anyway.
 			 */
 			if (ItemPointerIsLossyPage(item) && key->excludeOnly)
 			{
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index e5cf1bde13f..42aacc8f0a2 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2219,7 +2219,7 @@ makeObjectName(const char *name1, const char *name2, const char *label)
 	Assert(availchars > 0);		/* else caller chose a bad label */
 
 	/*
-	 * If we must truncate,  preferentially truncate the longer name. This
+	 * If we must truncate, preferentially truncate the longer name. This
 	 * logic could be expressed without a loop, but it's simple and obvious as
 	 * a loop.
 	 */
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index bad1787cfb2..fb51619d88c 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -1620,7 +1620,7 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
 	Assert(mcvlist->nitems <= STATS_MCVLIST_MAX_ITEMS);
 
 	matches = palloc(sizeof(bool) * mcvlist->nitems);
-	memset(matches, !is_or,  sizeof(bool) * mcvlist->nitems);
+	memset(matches, !is_or, sizeof(bool) * mcvlist->nitems);
 
 	/*
 	 * Loop through the list of clauses, and for each of them evaluate all the
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 1c77211ac45..1ae8195e023 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -334,7 +334,7 @@ hek2cstr(HE *he)
 	SAVETMPS;
 
 	/*-------------------------
-	 * Unfortunately,  while HeUTF8 is true for most things > 256, for values
+	 * Unfortunately, while HeUTF8 is true for most things > 256, for values
 	 * 128..255 it's not, but perl will treat them as unicode code points if
 	 * the utf8 flag is not set ( see The "Unicode Bug" in perldoc perlunicode
 	 * for more)
-- 
2.17.1

  [text/x-diff] 0005-Do-not-end-errmsg-with-period.patch (1.0K, ../../20220124030001.GQ23027@telsasoft.com/6-0005-Do-not-end-errmsg-with-period.patch)
  download | inline diff:
From 87c2969c991af5a58e58a740839008660f40f68c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 28 Oct 2021 19:32:48 -0500
Subject: [PATCH 05/33] Do not end errmsg with period.

Since: a8fd13cab0ba815e9925dc9676e6309f699b5f72
---
 src/backend/replication/logical/worker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index c9af775bc18..34710ed436d 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -3608,7 +3608,7 @@ ApplyWorkerMain(Datum main_arg)
 		}
 
 		ereport(DEBUG1,
-				(errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s.",
+				(errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s",
 						MySubscription->name,
 						MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_DISABLED ? "DISABLED" :
 						MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_PENDING ? "PENDING" :
-- 
2.17.1

  [text/x-diff] 0006-libpq-since-2a3f6e368babdac7b586a7d43105af60fc08b1a3.patch (1.0K, ../../20220124030001.GQ23027@telsasoft.com/7-0006-libpq-since-2a3f6e368babdac7b586a7d43105af60fc08b1a3.patch)
  download | inline diff:
From d275b8b16a57a60e7d776fd1dfddb93975ec4ad4 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 4 Dec 2021 16:47:31 -0600
Subject: [PATCH 06/33] libpq: since 2a3f6e368babdac7b586a7d43105af60fc08b1a3

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

diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index e0ab7cd5555..7d8c953497a 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -4987,7 +4987,7 @@ int PQflush(PGconn *conn);
    <xref linkend="libpq-PQflush"/> returns 0.  (It is necessary to check for
    read-ready and drain the input with <xref linkend="libpq-PQconsumeInput"/>,
    because the server can block trying to send us data, e.g., NOTICE
-   messages, and won't read our data until we read its.)  Once
+   messages, and won't read the data we've sent until we read its data.)  Once
    <xref linkend="libpq-PQflush"/> returns 0, wait for the socket to be
    read-ready and then read the response as described above.
   </para>
-- 
2.17.1

  [text/x-diff] 0007-pg_resetxlog-see-74cf7d46a-and-71e74a2f5.patch (1.6K, ../../20220124030001.GQ23027@telsasoft.com/8-0007-pg_resetxlog-see-74cf7d46a-and-71e74a2f5.patch)
  download | inline diff:
From b112265294d712ef55b8a18839b5f78de7cedd63 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 13:00:00 -0600
Subject: [PATCH 07/33] pg_resetxlog: see 74cf7d46a and 71e74a2f5

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

diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml
index 3e4882cdc65..673f56e2935 100644
--- a/doc/src/sgml/ref/pg_resetwal.sgml
+++ b/doc/src/sgml/ref/pg_resetwal.sgml
@@ -311,7 +311,7 @@ PostgreSQL documentation
       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>0007</filename> is the smallest entry
-      in <filename>pg_xact</filename>, <literal>-u 0x700000</literal> will work (five
+      in <filename>pg_xact</filename>, then <literal>-u 0x700000</literal> will work (five
       trailing zeroes provide the proper multiplier).
      </para>
     </listitem>
@@ -332,7 +332,7 @@ PostgreSQL documentation
       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</filename> is the largest entry
-      in <filename>pg_xact</filename>, <literal>-x 0x1200000</literal> will work (five
+      in <filename>pg_xact</filename>, then <literal>-x 0x1200000</literal> will work (five
       trailing zeroes provide the proper multiplier).
      </para>
     </listitem>
-- 
2.17.1

  [text/x-diff] 0008-version-14-since-06ba4a63b85e5aa47b325c3235c16c05a0b.patch (1.3K, ../../20220124030001.GQ23027@telsasoft.com/9-0008-version-14-since-06ba4a63b85e5aa47b325c3235c16c05a0b.patch)
  download | inline diff:
From 25c031af484982a4a84ede9f795fb1d0f86e268d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 13:46:22 -0600
Subject: [PATCH 08/33] version 14 since
 06ba4a63b85e5aa47b325c3235c16c05a0b58b96

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

diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index c71dab644ca..be1896fa99d 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -220,8 +220,8 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
             data is generated in <command>pgbench</command> client and then
             sent to the server. This uses the client/server bandwidth
             extensively through a <command>COPY</command>.
-            <command>pgbench</command> uses the FREEZE option with 14 or later
-            versions of <productname>PostgreSQL</productname> to speed up
+            <command>pgbench</command> uses the FREEZE option with version 14 or later
+            of <productname>PostgreSQL</productname> to speed up
             subsequent <command>VACUUM</command>, unless partitions are enabled.
             Using <literal>g</literal> causes logging to print one message
             every 100,000 rows while generating data for the
-- 
2.17.1

  [text/x-diff] 0009-typos-sysviews-since-adc8fc6167aa3f68b951ddd60ea32a6.patch (1.7K, ../../20220124030001.GQ23027@telsasoft.com/10-0009-typos-sysviews-since-adc8fc6167aa3f68b951ddd60ea32a6.patch)
  download | inline diff:
From 9ff580abda7221f09a88e19ca1285ff6872b644b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 24 Dec 2021 13:35:03 -0600
Subject: [PATCH 09/33] typos: sysviews since
 adc8fc6167aa3f68b951ddd60ea32a62b13f18d6

---
 src/test/regress/expected/sysviews.out | 2 +-
 src/test/regress/sql/sysviews.sql      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out
index 2088857615a..442eeb1e3fe 100644
--- a/src/test/regress/expected/sysviews.out
+++ b/src/test/regress/expected/sysviews.out
@@ -20,7 +20,7 @@ select count(*) >= 0 as ok from pg_available_extensions;
 (1 row)
 
 -- The entire output of pg_backend_memory_contexts is not stable,
--- we test only the existance and basic condition of TopMemoryContext.
+-- we test only the existence and basic condition of TopMemoryContext.
 select name, ident, parent, level, total_bytes >= free_bytes
   from pg_backend_memory_contexts where level = 0;
        name       | ident | parent | level | ?column? 
diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql
index b24816e3d5a..4980f07be25 100644
--- a/src/test/regress/sql/sysviews.sql
+++ b/src/test/regress/sql/sysviews.sql
@@ -13,7 +13,7 @@ select count(*) >= 0 as ok from pg_available_extension_versions;
 select count(*) >= 0 as ok from pg_available_extensions;
 
 -- The entire output of pg_backend_memory_contexts is not stable,
--- we test only the existance and basic condition of TopMemoryContext.
+-- we test only the existence and basic condition of TopMemoryContext.
 select name, ident, parent, level, total_bytes >= free_bytes
   from pg_backend_memory_contexts where level = 0;
 
-- 
2.17.1

  [text/x-diff] 0010-spell-description-since-7fc380f83d466b43a8f65bb52c92.patch (2.6K, ../../20220124030001.GQ23027@telsasoft.com/11-0010-spell-description-since-7fc380f83d466b43a8f65bb52c92.patch)
  download | inline diff:
From 8d725e352b58c33899b8912bad64ed17bc858dab Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 14:28:53 -0600
Subject: [PATCH 10/33] spell: description, since
 7fc380f83d466b43a8f65bb52c925c1ab19736ea

---
 src/test/modules/unsafe_tests/expected/alter_system_table.out | 4 ++--
 src/test/modules/unsafe_tests/sql/alter_system_table.sql      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/test/modules/unsafe_tests/expected/alter_system_table.out b/src/test/modules/unsafe_tests/expected/alter_system_table.out
index 4b2f63a95ed..be0559503b6 100644
--- a/src/test/modules/unsafe_tests/expected/alter_system_table.out
+++ b/src/test/modules/unsafe_tests/expected/alter_system_table.out
@@ -53,7 +53,7 @@ ERROR:  permission denied: "pg_description" is a system catalog
 CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_description);
 ERROR:  permission denied: "pg_description" is a system catalog
 -- RangeVarCallbackOwnsRelation()
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 ERROR:  permission denied: "pg_description" is a system catalog
 -- RangeVarCallbackForAlterRelation()
 ALTER TABLE pg_description RENAME TO pg_comment;
@@ -151,7 +151,7 @@ CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_descr
 ROLLBACK;
 -- RangeVarCallbackOwnsRelation()
 BEGIN;
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 ROLLBACK;
 -- RangeVarCallbackForAlterRelation()
 BEGIN;
diff --git a/src/test/modules/unsafe_tests/sql/alter_system_table.sql b/src/test/modules/unsafe_tests/sql/alter_system_table.sql
index 6bfc896ef9c..b77b68c946a 100644
--- a/src/test/modules/unsafe_tests/sql/alter_system_table.sql
+++ b/src/test/modules/unsafe_tests/sql/alter_system_table.sql
@@ -55,7 +55,7 @@ ALTER TABLE pg_description ALTER COLUMN description SET STATISTICS -1;
 CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_description);
 
 -- RangeVarCallbackOwnsRelation()
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 
 -- RangeVarCallbackForAlterRelation()
 ALTER TABLE pg_description RENAME TO pg_comment;
@@ -161,7 +161,7 @@ ROLLBACK;
 
 -- RangeVarCallbackOwnsRelation()
 BEGIN;
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 ROLLBACK;
 
 -- RangeVarCallbackForAlterRelation()
-- 
2.17.1

  [text/x-diff] 0011-add-missing-THE.patch (2.0K, ../../20220124030001.GQ23027@telsasoft.com/12-0011-add-missing-THE.patch)
  download | inline diff:
From 7e5609ae49732543f603dfbe868e426e7ef26f4d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:17:26 -0600
Subject: [PATCH 11/33] add missing THE..

See: 49c0864d7ef5227faa24f903902db90e5c9d5d69, 0cc59cc1f38d91587d52b14789e20bdd4c1af70a
---
 doc/src/sgml/protocol.sgml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 7e59edb1cc5..890b7a58a4b 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -2155,7 +2155,7 @@ The commands accepted in replication mode are:
       streaming starts on timeline <replaceable class="parameter">tli</replaceable>;
       otherwise, the server's current timeline is selected. The server can
       reply with an error, for example if the requested section of WAL has already
-      been recycled. On success, server responds with a CopyBothResponse
+      been recycled. On success, the server responds with a CopyBothResponse
       message, and then starts to stream WAL to the frontend.
      </para>
 
@@ -2516,7 +2516,7 @@ The commands accepted in replication mode are:
 
      <para>
       The server can reply with an error, for example if the
-      slot does not exist. On success, server responds with a CopyBothResponse
+      slot does not exist. On success, the server responds with a CopyBothResponse
       message, and then starts to stream WAL to the frontend.
      </para>
 
@@ -6639,7 +6639,7 @@ not line breaks.
 <para>
 This section describes the detailed format of each logical replication
 message.  These messages are either returned by the replication slot SQL
-interface or are sent by a walsender.  In the case of a walsender they are
+interface or are sent by a walsender.  In the case of a walsender, they are
 encapsulated inside replication protocol WAL messages as described in
 <xref linkend="protocol-replication"/>, and generally obey the same message
 flow as physical replication.
-- 
2.17.1

  [text/x-diff] 0012-add-missing-THE.patch (1.9K, ../../20220124030001.GQ23027@telsasoft.com/13-0012-add-missing-THE.patch)
  download | inline diff:
From a95b3506cbf72d85b73be93a642ff1c4165f7694 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:19:15 -0600
Subject: [PATCH 12/33] add missing THE..

See: 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8, f61e1dd2cee6b1a1da75c2bb0ca3bc72f18748c1
---
 doc/src/sgml/ref/pg_receivewal.sgml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index 5de80f8c640..c1d9401c597 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -82,7 +82,7 @@ PostgreSQL documentation
     <listitem>
      <para>
       First, scan the directory where the WAL segment files are written and
-      find the newest completed segment file, using as starting point the
+      find the newest completed segment file, using as the starting point the
       beginning of the next WAL segment file. This is calculated independently
       on the compression method used to compress each segment.
      </para>
@@ -93,7 +93,7 @@ PostgreSQL documentation
       If a starting point cannot be calculated with the previous method,
       and if a replication slot is used, an extra
       <command>READ_REPLICATION_SLOT</command> command is issued to retrieve
-      the slot's <literal>restart_lsn</literal> to use as starting point.
+      the slot's <literal>restart_lsn</literal> to use as the starting point.
       This option is only available when streaming write-ahead logs from
       <productname>PostgreSQL</productname> 15 and up.
      </para>
@@ -103,7 +103,7 @@ PostgreSQL documentation
      <para>
       If a starting point cannot be calculated with the previous method,
       the latest WAL flush location is used as reported by the server from
-      a <literal>IDENTIFY_SYSTEM</literal> command.
+      an <literal>IDENTIFY_SYSTEM</literal> command.
      </para>
     </listitem>
    </orderedlist>
-- 
2.17.1

  [text/x-diff] 0013-XLogWrite-confusing-newline-since-5ab3af46d.patch (777B, ../../20220124030001.GQ23027@telsasoft.com/14-0013-XLogWrite-confusing-newline-since-5ab3af46d.patch)
  download | inline diff:
From 0c4d959e06857b270b685ca76bf04e55a2e4226b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 5 Jan 2022 20:54:50 -0600
Subject: [PATCH 13/33] XLogWrite: confusing newline since 5ab3af46d

---
 src/backend/access/transam/xlog.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index c9d4cbf3ff5..58922f7edea 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -2706,7 +2706,6 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible)
 	 */
 	if (LogwrtResult.Flush < WriteRqst.Flush &&
 		LogwrtResult.Flush < LogwrtResult.Write)
-
 	{
 		/*
 		 * Could get here without iterating above loop, in which case we might
-- 
2.17.1

  [text/x-diff] 0014-f-stats-typos.patch (5.5K, ../../20220124030001.GQ23027@telsasoft.com/15-0014-f-stats-typos.patch)
  download | inline diff:
From 2024b1356f3ec8b0e5fb6ad923bd4bbc4c243668 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 14/33] f!stats typos

---
 doc/src/sgml/perform.sgml               |  2 +-
 src/backend/commands/statscmds.c        |  2 +-
 src/backend/statistics/README           |  2 +-
 src/backend/statistics/extended_stats.c |  2 +-
 src/backend/statistics/mcv.c            |  6 +++---
 src/bin/psql/describe.c                 | 10 +++++-----
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml
index 89ff58338e5..9cf8ebea808 100644
--- a/doc/src/sgml/perform.sgml
+++ b/doc/src/sgml/perform.sgml
@@ -1337,7 +1337,7 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178}
     <title>Multivariate MCV Lists</title>
 
     <para>
-     Another type of statistics stored for each column are most-common value
+     Another type of statistic stored for each column are most-common value
      lists.  This allows very accurate estimates for individual columns, but
      may result in significant misestimates for queries with conditions on
      multiple columns.
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index f7419b8f562..9b9d50ef32a 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -428,7 +428,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 	 * similar to why we don't bother with extracting columns from
 	 * expressions. It's either expensive or very easy to defeat for
 	 * determined user, and there's no risk if we allow such statistics (the
-	 * statistics is useless, but harmless).
+	 * statistic is useless, but harmless).
 	 */
 	foreach(cell, stxexprs)
 	{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
 Compatible clause types
 -----------------------
 
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
 
     (a) functional dependencies - equality clauses (AND), possibly IS NULL
 
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 87fe82ed114..ca48395d5c5 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -958,7 +958,7 @@ compare_datums_simple(Datum a, Datum b, SortSupport ssup)
  * build_attnums_array
  *		Transforms a bitmap into an array of AttrNumber values.
  *
- * This is used for extended statistics only, so all the attribute must be
+ * This is used for extended statistics only, so all the attributes must be
  * user-defined. That means offsetting by FirstLowInvalidHeapAttributeNumber
  * is not necessary here (and when querying the bitmap).
  */
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index fb51619d88c..1ef30344285 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -134,7 +134,7 @@ static int	count_distinct_groups(int numrows, SortItem *items,
  * This bound is at most 25, and approaches 0 as n approaches 0 or N. The
  * case where n approaches 0 cannot happen in practice, since the sample
  * size is at least 300.  The case where n approaches N corresponds to
- * sampling the whole the table, in which case it is reasonable to keep
+ * sampling the whole table, in which case it is reasonable to keep
  * the whole MCV list (have no lower bound), so it makes sense to apply
  * this formula for all inputs, even though the above derivation is
  * technically only valid when the right hand side is at least around 10.
@@ -295,7 +295,7 @@ statext_mcv_build(StatsBuildData *data, double totalrows, int stattarget)
 		/* Copy the first chunk of groups into the result. */
 		for (i = 0; i < nitems; i++)
 		{
-			/* just pointer to the proper place in the list */
+			/* just point to the proper place in the list */
 			MCVItem    *item = &mcvlist->items[i];
 
 			item->values = (Datum *) palloc(sizeof(Datum) * numattrs);
@@ -556,7 +556,7 @@ build_column_frequencies(SortItem *groups, int ngroups,
 
 /*
  * statext_mcv_load
- *		Load the MCV list for the indicated pg_statistic_ext tuple.
+ *		Load the MCV list for the indicated pg_statistic_ext_data tuple.
  */
 MCVList *
 statext_mcv_load(Oid mvoid, bool inh)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 40433e32fa0..64805789741 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2652,11 +2652,11 @@ describeOneTableDetails(const char *schemaname,
 
 					/*
 					 * When printing kinds we ignore expression statistics,
-					 * which is used only internally and can't be specified by
-					 * user. We don't print the kinds when either none are
-					 * specified (in which case it has to be statistics on a
-					 * single expr) or when all are specified (in which case
-					 * we assume it's expanded by CREATE STATISTICS).
+					 * which are used only internally and can't be specified by
+					 * user. We don't print the kinds when none are specified
+					 * (in which case it has to be statistics on a single expr)
+					 * or when all are specified (in which case we assume it's
+					 * expanded by CREATE STATISTICS).
 					 */
 					has_all = (has_ndistinct && has_dependencies && has_mcv);
 					has_some = (has_ndistinct || has_dependencies || has_mcv);
-- 
2.17.1

  [text/x-diff] 0015-typo.patch (1.8K, ../../20220124030001.GQ23027@telsasoft.com/16-0015-typo.patch)
  download | inline diff:
From d678911106239a842dd5574c5c231b7674b34149 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 17:56:43 -0600
Subject: [PATCH 15/33] typo

---
 src/backend/access/heap/heapam.c         | 2 +-
 src/backend/replication/logical/worker.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 6ec57f3d8b2..98230aac49c 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8354,7 +8354,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
 
 /*
  * Build a heap tuple representing the configured REPLICA IDENTITY to represent
- * the old tuple in a UPDATE or DELETE.
+ * the old tuple in an UPDATE or DELETE.
  *
  * Returns NULL if there's no need to log an identity or if there's no suitable
  * key defined.
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 34710ed436d..e3a0e34954b 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -2368,7 +2368,7 @@ apply_dispatch(StringInfo s)
 
 	/*
 	 * Set the current command being applied. Since this function can be
-	 * called recusively when applying spooled changes, save the current
+	 * called recursively when applying spooled changes, save the current
 	 * command.
 	 */
 	saved_command = apply_error_callback_arg.command;
@@ -2587,7 +2587,7 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
 	pgstat_report_activity(STATE_IDLE, NULL);
 
 	/*
-	 * Push apply error context callback. Fields will be filled during
+	 * Push apply error context callback. Fields will be filled while
 	 * applying a change.
 	 */
 	errcallback.callback = apply_error_callback;
-- 
2.17.1

  [text/x-diff] 0016-vcregress-style.patch (1.2K, ../../20220124030001.GQ23027@telsasoft.com/17-0016-vcregress-style.patch)
  download | inline diff:
From 00fa2c534fabcf09d139e5046a48f75159b5f089 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 9 Jan 2022 23:05:18 -0600
Subject: [PATCH 16/33] vcregress: style

---
 src/tools/msvc/vcregress.pl | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index 6dcd742fa6c..ddce4680a94 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -538,7 +538,6 @@ sub recoverycheck
 
 	$ENV{REGRESS_OUTPUTDIR} = "$topdir/src/test/recovery/tmp_check";
 
-	my $mstat  = 0;
 	my $dir    = "$topdir/src/test/recovery";
 	my $status = tap_check($dir);
 	exit $status if $status;
@@ -717,7 +716,6 @@ sub fetchRegressOpts
 # list is returned if the module does not need to run anything.
 sub fetchTests
 {
-
 	my $handle;
 	open($handle, '<', "GNUmakefile")
 	  || open($handle, '<', "Makefile")
@@ -783,7 +781,7 @@ sub InstallTemp
 sub usage
 {
 	print STDERR
-	  "Usage: vcregress.pl <mode> [ <arg>]\n\n",
+	  "Usage: vcregress.pl <mode> [<arg>]\n\n",
 	  "Options for <mode>:\n",
 	  "  bincheck       run tests of utilities in src/bin/\n",
 	  "  check          deploy instance and run regression tests on it\n",
-- 
2.17.1

  [text/x-diff] 0017-doc-review-for-tableam-b73c3a119.patch (2.2K, ../../20220124030001.GQ23027@telsasoft.com/18-0017-doc-review-for-tableam-b73c3a119.patch)
  download | inline diff:
From 2bce1cf15fdd742974fe7622247cc86a85a2edff Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 1 Jan 2022 19:18:02 -0600
Subject: [PATCH 17/33] doc review for tableam: b73c3a119

"allow to" is fine for internal language, but it's not ideal for public facing
documentation.

As pointed out here:
https://www.postgresql.org/message-id/CA%2BhUKGLJkZ6u61wUHz8Yk9%2BktY%3DzPbkvBe4xhxyuTTf4DRjTRw%40mail.gmail.com
---
 doc/src/sgml/config.sgml          | 4 ++--
 doc/src/sgml/ref/select_into.sgml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 4cd9818acf8..692d8a2a178 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -8442,8 +8442,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
         This parameter specifies the default table access method to use when
         creating tables or materialized views if the <command>CREATE</command>
         command does not explicitly specify an access method, or when
-        <command>SELECT ... INTO</command> is used, which does not allow to
-        specify a table access method. The default is <literal>heap</literal>.
+        <command>SELECT ... INTO</command> is used, which does not allow
+        specifying a table access method. The default is <literal>heap</literal>.
        </para>
       </listitem>
      </varlistentry>
diff --git a/doc/src/sgml/ref/select_into.sgml b/doc/src/sgml/ref/select_into.sgml
index acc6401485b..82a77784b99 100644
--- a/doc/src/sgml/ref/select_into.sgml
+++ b/doc/src/sgml/ref/select_into.sgml
@@ -107,7 +107,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
 
   <para>
    In contrast to <command>CREATE TABLE AS</command>, <command>SELECT
-   INTO</command> does not allow to specify properties like a table's access
+   INTO</command> does not allow specifying properties like a table's access
    method with <xref linkend="sql-createtable-method" /> or the table's
    tablespace with <xref linkend="sql-createtable-tablespace" />. Use
    <command>CREATE TABLE AS</command> if necessary.  Therefore, the default table
-- 
2.17.1

  [text/x-diff] 0018-v15-doc-review-doc-Add-note-about-postgres_fdw.appli.patch (1.2K, ../../20220124030001.GQ23027@telsasoft.com/19-0018-v15-doc-review-doc-Add-note-about-postgres_fdw.appli.patch)
  download | inline diff:
From f7bb6b3244a42fe05787023239f17efeef7e1f90 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:00:42 -0600
Subject: [PATCH 18/33] v15 doc review: doc: Add note about
 postgres_fdw.application_name. 58e2e6eb67fec14c793c74207407e172d7e0291d

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

diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 41cdb9ea1b5..1b757102c08 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -955,8 +955,8 @@ postgres=# SELECT postgres_fdw_disconnect_all();
       of any length and contain even non-ASCII characters.  However when
       it's passed to and used as <varname>application_name</varname>
       in a foreign server, note that it will be truncated to less than
-      <symbol>NAMEDATALEN</symbol> characters and any characters other
-      than printable ASCII ones in it will be replaced with question
+      <symbol>NAMEDATALEN</symbol> characters and anything other than
+      than printable ASCII characters will be replaced with question
       marks (<literal>?</literal>).
       See <xref linkend="guc-application-name"/> for details.
      </para>
-- 
2.17.1

  [text/x-diff] 0019-v15-doc-review-Add-option-N-no-sync-to-pg_upgrade-3d.patch (1.1K, ../../20220124030001.GQ23027@telsasoft.com/20-0019-v15-doc-review-Add-option-N-no-sync-to-pg_upgrade-3d.patch)
  download | inline diff:
From e483e4ec42738f86c72e7b4aa5d3659c97c4393c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:02:16 -0600
Subject: [PATCH 19/33] v15 doc review: Add option -N/--no-sync to pg_upgrade
 3d5ffccb6df323f528cf870c26d0d0517ffe3eaa

Or is it intended to say 'unsynchronized' ?
---
 doc/src/sgml/ref/pgupgrade.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index c5ce732ee98..a1745a2642c 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -139,7 +139,7 @@ PostgreSQL documentation
         of the upgraded cluster to be written safely to disk.  This option
         causes <command>pg_upgrade</command> to return without waiting, which
         is faster, but means that a subsequent operating system crash can leave
-        the synchronized data directory corrupt.  Generally, this option is
+        the data directory corrupt.  Generally, this option is
         useful for testing but should not be used on a production
         installation.
        </para>
-- 
2.17.1

  [text/x-diff] 0020-v15-doc-review-Allow-postgres_fdw.application_name-t.patch (1.6K, ../../20220124030001.GQ23027@telsasoft.com/21-0020-v15-doc-review-Allow-postgres_fdw.application_name-t.patch)
  download | inline diff:
From 08daab3f34d2cfcf30d9454e236711fc9c59bb52 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:09:13 -0600
Subject: [PATCH 20/33] v15 doc review: Allow postgres_fdw.application_name to
 include escape sequences - 6e0cb3dec10e460288d68a128e3d79d16a230cdb

Also, 'escape sequences' should be marked up somehow other than <quote> ?
---
 doc/src/sgml/postgres-fdw.sgml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 1b757102c08..2bb31f11255 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -981,19 +981,19 @@ postgres=# SELECT postgres_fdw_disconnect_all();
        <tbody>
         <row>
          <entry><literal>%a</literal></entry>
-         <entry>Application name in local server</entry>
+         <entry>Application name on local server</entry>
         </row>
         <row>
          <entry><literal>%u</literal></entry>
-         <entry>User name in local server</entry>
+         <entry>User name on local server</entry>
         </row>
         <row>
          <entry><literal>%d</literal></entry>
-         <entry>Database name in local server</entry>
+         <entry>Database name on local server</entry>
         </row>
         <row>
          <entry><literal>%p</literal></entry>
-         <entry>Process ID of backend in local server</entry>
+         <entry>Process ID of backend on local server</entry>
         </row>
         <row>
          <entry><literal>%%</literal></entry>
-- 
2.17.1

  [text/x-diff] 0021-v15-doc-review-Add-commas-for-readability.patch (1.9K, ../../20220124030001.GQ23027@telsasoft.com/22-0021-v15-doc-review-Add-commas-for-readability.patch)
  download | inline diff:
From cad84932532f67e2db2e40f70aa93d741ac8255f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:13:26 -0600
Subject: [PATCH 21/33] v15 doc review: Add commas for readability..

8709228775b549a2388e6568f463a4115e5a4c10
	Doc: Clarify lock levels taken during ATTACH PARTITION -

a5cb4f9829fbfd68655543d2d371a18a8eb43b84
	Doc: minor improvements for logical replication protocol documentation.
---
 doc/src/sgml/ddl.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 22f6c5c7abc..e507954c2d0 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -4044,7 +4044,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
      holding an <literal>ACCESS EXCLUSIVE</literal> lock on that partition.
      It is recommended to drop the now-redundant <literal>CHECK</literal>
      constraint after the <command>ATTACH PARTITION</command> is complete.  If
-     the table being attached is itself a partitioned table then each of its
+     the table being attached is itself a partitioned table, then each of its
      sub-partitions will be recursively locked and scanned until either a
      suitable <literal>CHECK</literal> constraint is encountered or the leaf
      partitions are reached.
@@ -4059,7 +4059,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
      the partition being attached.  This operation will be performed whilst
      holding an <literal>ACCESS EXCLUSIVE</literal> lock on the <literal>
      DEFAULT</literal> partition.  If the <literal>DEFAULT</literal> partition
-     is itself a partitioned table then each of its partitions will be
+     is itself a partitioned table, then each of its partitions will be
      recursively checked in the same way as the table being attached, as
      mentioned above.
     </para>
-- 
2.17.1

  [text/x-diff] 0022-v15-doc-review-185364b161512806d23ca390f5b6156660796.patch (1.2K, ../../20220124030001.GQ23027@telsasoft.com/23-0022-v15-doc-review-185364b161512806d23ca390f5b6156660796.patch)
  download | inline diff:
From bca98984d15b9b305947bcce91457db916ef5be1 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:21:59 -0600
Subject: [PATCH 22/33] v15 doc review:
 185364b161512806d23ca390f5b615666079699b

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

diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml
index bb4ef5e5e22..b31d72181c5 100644
--- a/doc/src/sgml/ref/alter_publication.sgml
+++ b/doc/src/sgml/ref/alter_publication.sgml
@@ -50,7 +50,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
    tables/schemas that were present in the publication will be removed.  The
    <literal>ADD</literal> and <literal>DROP</literal> clauses will add and
    remove one or more tables/schemas from the publication.  Note that adding
-   tables/schemas to a publication that is already subscribed to will require a
+   tables/schemas to a publication that is already subscribed to will require an
    <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> action on the
    subscribing side in order to become effective.
   </para>
-- 
2.17.1

  [text/x-diff] 0023-v15-doc-review-Allow-publishing-the-tables-of-schema.patch (1.1K, ../../20220124030001.GQ23027@telsasoft.com/24-0023-v15-doc-review-Allow-publishing-the-tables-of-schema.patch)
  download | inline diff:
From 4aaadbe2bdc9eeb8350d7456d670dec6482efed6 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:22:53 -0600
Subject: [PATCH 23/33] v15 doc review: Allow publishing the tables of schema.
 - 5a2832465fd8984d089e8c44c094e6900d987fcd

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

diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml
index b31d72181c5..7c7c27bf7ce 100644
--- a/doc/src/sgml/ref/alter_publication.sgml
+++ b/doc/src/sgml/ref/alter_publication.sgml
@@ -82,7 +82,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
   <para>
    Adding/Setting a table that is part of schema specified in
    <literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a
-   publication that already has a table that is part of specified schema or
+   publication that already has a table that is part of the specified schema or
    adding/setting a table to a publication that already has a table's schema as
    part of the specified schema is not supported.
   </para>
-- 
2.17.1

  [text/x-diff] 0024-f-longer-edit.patch (1.4K, ../../20220124030001.GQ23027@telsasoft.com/25-0024-f-longer-edit.patch)
  download | inline diff:
From f9828a9e2c9a3e64372f734db95c35fad81ab958 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:31:43 -0600
Subject: [PATCH 24/33] f!longer edit

---
 doc/src/sgml/ref/alter_publication.sgml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml
index 7c7c27bf7ce..7b105f6af18 100644
--- a/doc/src/sgml/ref/alter_publication.sgml
+++ b/doc/src/sgml/ref/alter_publication.sgml
@@ -80,11 +80,11 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
   </para>
 
   <para>
-   Adding/Setting a table that is part of schema specified in
-   <literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a
-   publication that already has a table that is part of the specified schema or
-   adding/setting a table to a publication that already has a table's schema as
-   part of the specified schema is not supported.
+   It is not supported to add or set a table that is part of schema specified in
+   <literal>ALL TABLES IN SCHEMA</literal>, to add or set a schema to a
+   publication that already has a table that is part of the specified schema, or to
+   add or set a table to a publication that already has a table's schema as
+   part of the specified schema.
   </para>
  </refsect1>
 
-- 
2.17.1

  [text/x-diff] 0025-v15-doc-review-Allow-publishing-the-tables-of-schema.patch (1.8K, ../../20220124030001.GQ23027@telsasoft.com/26-0025-v15-doc-review-Allow-publishing-the-tables-of-schema.patch)
  download | inline diff:
From cc6dff3ed778f94dc7cd88c6fbfc3efe5277ea67 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:33:38 -0600
Subject: [PATCH 25/33] v15 doc review: Allow publishing the tables of schema. 
 5a2832465fd8984d089e8c44c094e6900d987fcd

---
 doc/src/sgml/ref/create_publication.sgml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml
index d805e8e77a7..385975bfadd 100644
--- a/doc/src/sgml/ref/create_publication.sgml
+++ b/doc/src/sgml/ref/create_publication.sgml
@@ -131,9 +131,9 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
 
      <para>
       When a partitioned table is published via schema level publication, all
-      of its existing and future partitions irrespective of it being from the
-      publication schema or not are implicitly considered to be part of the
-      publication. So, even operations that are performed directly on a
+      of its existing and future partitions are implicitly considered to be part of the
+      publication, regardless of whether they are from the publication schema or not.
+      So, even operations that are performed directly on a
       partition are also published via publications that its ancestors are
       part of.
      </para>
@@ -195,7 +195,7 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
 
   <para>
    If <literal>FOR TABLE</literal>, <literal>FOR ALL TABLES</literal> or
-   <literal>FOR ALL TABLES IN SCHEMA</literal> is not specified, then the
+   <literal>FOR ALL TABLES IN SCHEMA</literal> are not specified, then the
    publication starts out with an empty set of tables.  That is useful if
    tables or schemas are to be added later.
   </para>
-- 
2.17.1

  [text/x-diff] 0026-v15-doc-review-Rework-compression-options-of-pg_rece.patch (1.0K, ../../20220124030001.GQ23027@telsasoft.com/27-0026-v15-doc-review-Rework-compression-options-of-pg_rece.patch)
  download | inline diff:
From 4acacf56196eb59aa6910752c7d1f1c55c415d54 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:37:47 -0600
Subject: [PATCH 26/33] v15 doc review: Rework compression options of
 pg_receivewal - d62bcc8b07f921bad105c7a826702c117ea7be58

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

diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index c1d9401c597..f38d6f47878 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -268,7 +268,7 @@ PostgreSQL documentation
       <listitem>
        <para>
         Enables compression of write-ahead logs using the specified method.
-        Supported values <literal>gzip</literal>, <literal>lz4</literal>
+        Supported values are <literal>gzip</literal>, <literal>lz4</literal>
         (if <productname>PostgreSQL</productname> was compiled with
         <option>--with-lz4</option>), and <literal>none</literal>.
        </para>
-- 
2.17.1

  [text/x-diff] 0027-v15-doc-review-Add-replication-command-READ_REPLICAT.patch (1.4K, ../../20220124030001.GQ23027@telsasoft.com/28-0027-v15-doc-review-Add-replication-command-READ_REPLICAT.patch)
  download | inline diff:
From b68fdb10a9b9cd148fbcb0646557e430da8b3952 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:39:50 -0600
Subject: [PATCH 27/33] v15 doc review: Add replication command
 READ_REPLICATION_SLOT - b4ada4e19fd7bedb433e46516ccd0ca4213d2719

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

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 890b7a58a4b..c4621e34f43 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -2101,7 +2101,7 @@ The commands accepted in replication mode are:
     </term>
     <listitem>
      <para>
-      Read some information associated to a replication slot. Returns a tuple
+      Read some information associated with a replication slot. Returns a tuple
       with <literal>NULL</literal> values if the replication slot does not
       exist. This command is currently only supported for physical replication
       slots.
@@ -2133,7 +2133,7 @@ The commands accepted in replication mode are:
         <term><literal>restart_tli</literal> (<type>int8</type>)</term>
         <listitem>
          <para>
-          The timeline ID associated to <literal>restart_lsn</literal>,
+          The timeline ID associated with <literal>restart_lsn</literal>,
           following the current timeline history.
          </para>
         </listitem>
-- 
2.17.1

  [text/x-diff] 0028-v15-doc-review-Ignore-BRIN-indexes-when-checking-for.patch (1.0K, ../../20220124030001.GQ23027@telsasoft.com/29-0028-v15-doc-review-Ignore-BRIN-indexes-when-checking-for.patch)
  download | inline diff:
From 49f4ad490c14bdedc592466f403615e9cf0e795e Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:40:50 -0600
Subject: [PATCH 28/33] v15 doc review: Ignore BRIN indexes when checking for
 HOT udpates - commit 5753d4ee320b3f6fb2ff734667a1ce1d9d8615a1

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

diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index 84de9310712..d4163c96e9f 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -253,7 +253,7 @@ typedef struct IndexAmRoutine
    access method blocks <acronym>HOT</acronym> when an indexed attribute is
    updated. Access methods without pointers to individual tuples (like
    <acronym>BRIN</acronym>) may allow <acronym>HOT</acronym> even in this
-   case. This does not apply to attributes referenced in index predicates,
+   case. This does not apply to attributes referenced in index predicates;
    an update of such attribute always disables <acronym>HOT</acronym>.
   </para>
 
-- 
2.17.1

  [text/x-diff] 0029-v15-doc-review-Some-additional-information-about-whe.patch (1.2K, ../../20220124030001.GQ23027@telsasoft.com/30-0029-v15-doc-review-Some-additional-information-about-whe.patch)
  download | inline diff:
From 7d1d22a712831ab2199e4a8e818aca4497e71130 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 29 Dec 2021 16:43:08 -0600
Subject: [PATCH 29/33] v15 doc review: Some additional information about when
 to use referential actions - 5786fe154b53caef8b226ed863312d3608b32a51

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

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index e507954c2d0..7cf0f0da3b2 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -1071,7 +1071,7 @@ CREATE TABLE order_items (
     represent independent objects, then <literal>RESTRICT</literal> or
     <literal>NO ACTION</literal> is more appropriate; an application that
     actually wants to delete both objects would then have to be explicit about
-    this and run two delete options.  In the above example, order items are
+    this and run two delete commands.  In the above example, order items are
     part of an order, and it is convenient if they are deleted automatically
     if an order is deleted.  But products and orders are different things, and
     so making a deletion of a product automatically cause the deletion of some
-- 
2.17.1

  [text/x-diff] 0030-Alphabetize-pg_ls_-tmpdir-archivestatusdir.patch (5.8K, ../../20220124030001.GQ23027@telsasoft.com/31-0030-Alphabetize-pg_ls_-tmpdir-archivestatusdir.patch)
  download | inline diff:
From 467aa53aa63c4327d88b2100b6e45c45e6a855f7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 19 Jan 2022 16:38:21 -0600
Subject: [PATCH 30/33] Alphabetize pg_ls_{tmpdir,archivestatusdir}

since: 9cd92d1a33699f86aa53d44ab04cc3eb50c18d1 c48101620151f78ee184e5f81766cbac347d9a11

Could backpatch to v11?
---
 doc/src/sgml/func.sgml | 76 +++++++++++++++++++++---------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 90169a0ce72..29a596233a0 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -27306,6 +27306,31 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
      </thead>
 
      <tbody>
+
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_archive_statusdir</primary>
+        </indexterm>
+        <function>pg_ls_archive_statusdir</function> ()
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's WAL archive status directory
+        (<filename>pg_wal/archive_status</filename>).  Filenames beginning
+        with a dot, directories, and other special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
       <row>
        <entry role="func_table_entry"><para role="func_signature">
         <indexterm>
@@ -27356,33 +27381,9 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
       <row>
        <entry role="func_table_entry"><para role="func_signature">
         <indexterm>
-         <primary>pg_ls_waldir</primary>
-        </indexterm>
-        <function>pg_ls_waldir</function> ()
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's write-ahead log (WAL) directory.
-        Filenames beginning with a dot, directories, and other special files
-        are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
-
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_archive_statusdir</primary>
+         <primary>pg_ls_tmpdir</primary>
         </indexterm>
-        <function>pg_ls_archive_statusdir</function> ()
+        <function>pg_ls_tmpdir</function> ( <optional> <parameter>tablespace</parameter> <type>oid</type> </optional> )
         <returnvalue>setof record</returnvalue>
         ( <parameter>name</parameter> <type>text</type>,
         <parameter>size</parameter> <type>bigint</type>,
@@ -27390,9 +27391,12 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
        </para>
        <para>
         Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's WAL archive status directory
-        (<filename>pg_wal/archive_status</filename>).  Filenames beginning
-        with a dot, directories, and other special files are excluded.
+        ordinary file in the temporary file directory for the
+        specified <parameter>tablespace</parameter>.
+        If <parameter>tablespace</parameter> is not provided,
+        the <literal>pg_default</literal> tablespace is examined.  Filenames
+        beginning with a dot, directories, and other special files are
+        excluded.
        </para>
        <para>
         This function is restricted to superusers and members of
@@ -27403,11 +27407,10 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
 
       <row>
        <entry role="func_table_entry"><para role="func_signature">
-
         <indexterm>
-         <primary>pg_ls_tmpdir</primary>
+         <primary>pg_ls_waldir</primary>
         </indexterm>
-        <function>pg_ls_tmpdir</function> ( <optional> <parameter>tablespace</parameter> <type>oid</type> </optional> )
+        <function>pg_ls_waldir</function> ()
         <returnvalue>setof record</returnvalue>
         ( <parameter>name</parameter> <type>text</type>,
         <parameter>size</parameter> <type>bigint</type>,
@@ -27415,12 +27418,9 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
        </para>
        <para>
         Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the temporary file directory for the
-        specified <parameter>tablespace</parameter>.
-        If <parameter>tablespace</parameter> is not provided,
-        the <literal>pg_default</literal> tablespace is examined.  Filenames
-        beginning with a dot, directories, and other special files are
-        excluded.
+        ordinary file in the server's write-ahead log (WAL) directory.
+        Filenames beginning with a dot, directories, and other special files
+        are excluded.
        </para>
        <para>
         This function is restricted to superusers and members of
-- 
2.17.1

  [text/x-diff] 0031-Alphabetize-pg_ls_logical-functions.patch (7.4K, ../../20220124030001.GQ23027@telsasoft.com/32-0031-Alphabetize-pg_ls_logical-functions.patch)
  download | inline diff:
From 5ccb006a20a90023d6ed58c34ef77349bc676e4f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 19 Jan 2022 16:41:45 -0600
Subject: [PATCH 31/33] Alphabetize pg_ls_logical functions

Added at 1922d7c6e1a74178bd2f1d5aa5a6ab921b3fcd34 (v15 only)
---
 doc/src/sgml/func.sgml | 145 +++++++++++++++++++++--------------------
 1 file changed, 73 insertions(+), 72 deletions(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 29a596233a0..497eb91eebc 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -27378,6 +27378,79 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
        </para></entry>
       </row>
 
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_logicalmapdir</primary>
+        </indexterm>
+        <function>pg_ls_logicalmapdir</function> ()
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's <filename>pg_logical/mappings</filename>
+        directory. Filenames beginning with a dot, directories, and other
+        special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_logicalsnapdir</primary>
+        </indexterm>
+        <function>pg_ls_logicalsnapdir</function> ()
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's <filename>pg_logical/snapshots</filename>
+        directory. Filenames beginning with a dot, directories, and other
+        special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_replslotdir</primary>
+        </indexterm>
+        <function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> )
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's <filename>pg_replslot/slot_name</filename>
+        directory, where <parameter>slot_name</parameter> is the name of the
+        replication slot provided as input of the function. Filenames beginning
+        with a dot, directories, and other special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
       <row>
        <entry role="func_table_entry"><para role="func_signature">
         <indexterm>
@@ -27508,78 +27581,6 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8');
        </para></entry>
       </row>
 
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_logicalsnapdir</primary>
-        </indexterm>
-        <function>pg_ls_logicalsnapdir</function> ()
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's <filename>pg_logical/snapshots</filename>
-        directory. Filenames beginning with a dot, directories, and other
-        special files are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
-
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_logicalmapdir</primary>
-        </indexterm>
-        <function>pg_ls_logicalmapdir</function> ()
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's <filename>pg_logical/mappings</filename>
-        directory. Filenames beginning with a dot, directories, and other
-        special files are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
-
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_replslotdir</primary>
-        </indexterm>
-        <function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> )
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's <filename>pg_replslot/slot_name</filename>
-        directory, where <parameter>slot_name</parameter> is the name of the
-        replication slot provided as input of the function. Filenames beginning
-        with a dot, directories, and other special files are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
      </tbody>
     </tgroup>
    </table>
-- 
2.17.1

  [text/x-diff] 0032-Alphabetize-glossary-Startup-process.patch (2.1K, ../../20220124030001.GQ23027@telsasoft.com/33-0032-Alphabetize-glossary-Startup-process.patch)
  download | inline diff:
From 0465993d6995360c98306074997a14edff1f7259 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 19 Jan 2022 18:09:47 -0600
Subject: [PATCH 32/33] Alphabetize glossary: Startup process

since: d3014fff4cd4dcaf4b2764d96ad038f3be7413b0
---
 doc/src/sgml/glossary.sgml | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/doc/src/sgml/glossary.sgml b/doc/src/sgml/glossary.sgml
index f23f78c00e4..1835d0e65a3 100644
--- a/doc/src/sgml/glossary.sgml
+++ b/doc/src/sgml/glossary.sgml
@@ -1489,22 +1489,6 @@
    </glossdef>
   </glossentry>
 
-  <glossentry id="glossary-startup-process">
-   <glossterm>Startup process</glossterm>
-   <glossdef>
-    <para>
-     An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm>
-     that replays WAL during crash recovery and in a
-     <glossterm linkend="glossary-replication">physical replica</glossterm>.
-    </para>
-    <para>
-     (The name is historical: the startup process was named before
-     replication was implemented; the name refers to its task as it
-     relates to the server startup following a crash.)
-    </para>
-   </glossdef>
-  </glossentry>
-
   <glossentry id="glossary-sql-object">
    <glossterm>SQL object</glossterm>
     <glossdef>
@@ -1563,6 +1547,22 @@
    <glosssee otherterm="glossary-replica" />
   </glossentry>
 
+  <glossentry id="glossary-startup-process">
+   <glossterm>Startup process</glossterm>
+   <glossdef>
+    <para>
+     An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm>
+     that replays WAL during crash recovery and in a
+     <glossterm linkend="glossary-replication">physical replica</glossterm>.
+    </para>
+    <para>
+     (The name is historical: the startup process was named before
+     replication was implemented; the name refers to its task as it
+     relates to the server startup following a crash.)
+    </para>
+   </glossdef>
+  </glossentry>
+
   <glossentry id="glossary-stats-collector">
    <glossterm>Stats collector (process)</glossterm>
    <glossdef>
-- 
2.17.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-01-24 07:01  Michael Paquier <michael@paquier.xyz>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2022-01-24 07:01 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers

On Sun, Jan 23, 2022 at 09:00:01PM -0600, Justin Pryzby wrote:
> Feel free to ignore this for now and revisit in April...

I don't mind fixing that now.  That means less to do later.

> @Michael: I'm not sure what this is trying to say.
> 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8
> +      First, scan the directory where the WAL segment files are written and
> +      find the newest completed segment file, using as starting point the
> +      beginning of the next WAL segment file. This is calculated independently
> +      on the compression method used to compress each segment.
> 
> I suppose it should say independently *of* the compression method, but then I
> still don't know what it means.  I checked FindStreamingStart().
> It that doesn't look like it's "calculated independently" - actually, it takes
> the compression method into account and explicitly handles each compression
> method.

This means that we are able to calculate the starting LSN even if the
segments stored use different compression methods or are
uncompressed.  Would you reword that differently?  Or perhaps removing
the last sentence of this paragraph would be simpler in the long run?
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Ye5O2zRtPoVbOEhV@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-01-24 07:07  Justin Pryzby <pryzby@telsasoft.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-01-24 07:07 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers

On Mon, Jan 24, 2022 at 04:01:47PM +0900, Michael Paquier wrote:
> On Sun, Jan 23, 2022 at 09:00:01PM -0600, Justin Pryzby wrote:
> > Feel free to ignore this for now and revisit in April...
> 
> I don't mind fixing that now.  That means less to do later.

Thanks.

> > @Michael: I'm not sure what this is trying to say.
> > 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8
> > +      First, scan the directory where the WAL segment files are written and
> > +      find the newest completed segment file, using as starting point the
> > +      beginning of the next WAL segment file. This is calculated independently
> > +      on the compression method used to compress each segment.
> > 
> > I suppose it should say independently *of* the compression method, but then I
> > still don't know what it means.  I checked FindStreamingStart().
> > It that doesn't look like it's "calculated independently" - actually, it takes
> > the compression method into account and explicitly handles each compression
> > method.
> 
> This means that we are able to calculate the starting LSN even if the
> segments stored use different compression methods or are
> uncompressed.  Would you reword that differently?  Or perhaps removing
> the last sentence of this paragraph would be simpler in the long run?

different from what?  From each other ?

Maybe I would have written:
| This is calculated separately for each segment, which may each use
| different compression methods.

But probably I would just remove it.

-- 
Justin





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-01-24 07:55  Michael Paquier <michael@paquier.xyz>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2022-01-24 07:55 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers

On Mon, Jan 24, 2022 at 01:07:54AM -0600, Justin Pryzby wrote:
> different from what?  From each other ?

Each segment could be either uncompressed, compressed with LZ4, or
compressed with GZIP, so could be different from each other.

> Maybe I would have written:
> | This is calculated separately for each segment, which may each use
> | different compression methods.
> 
> But probably I would just remove it.

I'm thinking about just removing that at the end.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Ye5bc4m%2FLMR%2FlNkh@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-01-25 01:53  Michael Paquier <michael@paquier.xyz>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 54+ messages in thread

From: Michael Paquier @ 2022-01-25 01:53 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers

On Mon, Jan 24, 2022 at 04:55:31PM +0900, Michael Paquier wrote:
> I'm thinking about just removing that at the end.

And done this way, keeping the whole simpler.  I have applied most of
the things you suggested, with a backpatch down to 10 for the relevant
user-visible parts in the docs.  Thanks!
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Ye9YHIsJEu0vGZfh@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* typos
@ 2022-04-11 02:03  Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-04-11 02:03 UTC (permalink / raw)
  To: pgsql-hackers; +Cc: Fabien COELHO <coelho@cri.ensmp.fr>

In docs and comments.  Mostly for v15.
Maybe Fabien will want to comment on the pgbench one.

Attachments:

  [text/x-diff] 0001-doc-database-SYSTEM-since-aa01051418f10afbdfa781b8dc.patch (1.1K, ../../20220411020336.GB26620@telsasoft.com/2-0001-doc-database-SYSTEM-since-aa01051418f10afbdfa781b8dc.patch)
  download | inline diff:
From b1fb6d9bae1b0d69a30d59e65ed4f5a10f4141da Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 25 Jan 2022 10:47:55 -0600
Subject: [PATCH 01/19] doc: database SYSTEM since
 aa01051418f10afbdfa781b8dc109615ca785ff9

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

diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index 255ad3a1ce0..b2bb3da5fdb 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -278,7 +278,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
        <listitem>
         <para>
          The object identifier to be used for the new database. If this
-         parameter is not specified, the database will choose a suitable
+         parameter is not specified, the database system will choose a suitable
          OID automatically. This parameter is primarily intended for internal
          use by <application>pg_upgrade</application>, and only
          <application>pg_upgrade</application> can specify a value less
-- 
2.17.1

  [text/x-diff] 0002-doc-Remove-synchronized-from-no-sync.patch (1.1K, ../../20220411020336.GB26620@telsasoft.com/3-0002-doc-Remove-synchronized-from-no-sync.patch)
  download | inline diff:
From 5631996e4ebf996ff89f19b52e9bf616cad09d6c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 16 Feb 2022 21:07:53 -0600
Subject: [PATCH 02/19] doc: Remove 'synchronized' from --no-sync

Since it would be more accurate to say "unsynchronized".

The corresponding change was made for pgupgrade.sgml in commit 410aa248
---
 doc/src/sgml/ref/pg_rewind.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index e808239aa5b..3231f67845a 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -210,7 +210,7 @@ PostgreSQL documentation
         to be written safely to disk.  This option causes
         <command>pg_rewind</command> to return without waiting, which is
         faster, but means that a subsequent operating system crash can leave
-        the synchronized data directory corrupt.  Generally, this option is
+        the data directory corrupt.  Generally, this option is
         useful for testing but should not be used on a production
         installation.
        </para>
-- 
2.17.1

  [text/x-diff] 0003-doc-json-log-dc686681e0799b12c40f44f85fc5bfd7fed4e57.patch (867B, ../../20220411020336.GB26620@telsasoft.com/4-0003-doc-json-log-dc686681e0799b12c40f44f85fc5bfd7fed4e57.patch)
  download | inline diff:
From a16152c556661be0217b689218def3ac0d308d96 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 16 Feb 2022 21:26:17 -0600
Subject: [PATCH 03/19] doc: json log dc686681e0799b12c40f44f85fc5bfd7fed4e57f

---
 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 6e3e27bed76..30ac8e0137f 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7657,8 +7657,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </para>
 
      <para>
-      Each log line is serialized as a JSON object as of the following
-      set of keys with their values.
+      Each log line is serialized as a JSON object with the following
+      set of keys and their associated values.
      </para>
 
      <table>
-- 
2.17.1

  [text/x-diff] 0004-doc-s-in-local-server-on-local-server-94c49d53402240.patch (954B, ../../20220411020336.GB26620@telsasoft.com/5-0004-doc-s-in-local-server-on-local-server-94c49d53402240.patch)
  download | inline diff:
From 1d565b227c1184fd0e58b4acf69a289c3e2f3b35 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 17 Feb 2022 21:08:56 -0600
Subject: [PATCH 04/19] doc: s/in local server/on local server/
 94c49d53402240ad7ddbcae9049ff2840a54b9c6

many similar things were fixed in 410aa248e5a883fde4832999cc9b23c7ace0f2ff
---
 doc/src/sgml/postgres-fdw.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index d8dc7155874..92d89c0fc99 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -1040,7 +1040,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
         <row>
          <entry><literal>%C</literal></entry>
          <entry>
-          Cluster name in local server
+          Cluster name on local server
           (see <xref linkend="guc-cluster-name"/> for details)
          </entry>
         </row>
-- 
2.17.1

  [text/x-diff] 0005-doc-pg_column_compression-we-say-method-not-algorith.patch (968B, ../../20220411020336.GB26620@telsasoft.com/6-0005-doc-pg_column_compression-we-say-method-not-algorith.patch)
  download | inline diff:
From 732aebc934ac8539f49535cb3c17d67805fbd583 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 19 Feb 2022 11:47:35 -0600
Subject: [PATCH 05/19] doc: pg_column_compression(): we say method not
 algorithm everywhere else

could backpatch to v14
---
 doc/src/sgml/func.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2ecf0482d84..a34eb8b43e0 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -29285,7 +29285,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset((pg_backup_stop()).lsn);
         <returnvalue>text</returnvalue>
        </para>
        <para>
-        Shows the compression algorithm that was used to compress
+        Shows the compression method that was used to compress
         an individual variable-length value. Returns <literal>NULL</literal>
         if the value is not compressed.
        </para></entry>
-- 
2.17.1

  [text/x-diff] 0006-doc-review-postgres_fdw-parallel-commit.patch (1.1K, ../../20220411020336.GB26620@telsasoft.com/7-0006-doc-review-postgres_fdw-parallel-commit.patch)
  download | inline diff:
From 0586643c7405d4d922c7cc0739a4d207d73fba8a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 12:25:04 -0500
Subject: [PATCH 06/19] doc review: postgres_fdw parallel commit

This has a unicode apostrophe, unlike everywhere else in the docs.

04e706d4238f98a98e1c0b1a02db9d4280b96f04
---
 doc/src/sgml/postgres-fdw.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 92d89c0fc99..1901736e600 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -491,7 +491,7 @@ OPTIONS (ADD password_required 'false');
       <para>
        For a foreign server with this option enabled, if many remote
        (sub)transactions are opened on the foreign server in a local
-       (sub)transaction, this option might increase the remote server’s load
+       (sub)transaction, this option might increase the remote server's load
        when the local (sub)transaction commits, so be careful when using this
        option.
       </para>
-- 
2.17.1

  [text/x-diff] 0007-doc-review-pgbench-retries.patch (8.2K, ../../20220411020336.GB26620@telsasoft.com/8-0007-doc-review-pgbench-retries.patch)
  download | inline diff:
From 77c637a74df21f697dac76eb5c55ac5a45fde257 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 26 Mar 2022 00:26:33 -0500
Subject: [PATCH 07/19] doc review: pgbench retries

4a39f87acd6e681e5ded1239391d8a92645b43d6
---
 doc/src/sgml/ref/pgbench.sgml | 40 +++++++++++++++++------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index 659fe2d984d..f855249a3dd 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -541,11 +541,11 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
         <firstterm>skipped</firstterm>.
        </para>
        <para>
-        When the <option>--max-tries</option> option is used, the transaction with
-        serialization or deadlock error cannot be retried if the total time of
+        When the <option>--max-tries</option> option is used, a transaction with
+        serialization or deadlock error will not be retried if the total time of
         all its tries is greater than <replaceable>limit</replaceable> ms. To
         limit only the time of tries and not their number, use
-        <literal>--max-tries=0</literal>. By default option
+        <literal>--max-tries=0</literal>. By default, the option
         <option>--max-tries</option> is set to 1 and transactions with
         serialization/deadlock errors are not retried. See <xref
         linkend="failures-and-retries"/> for more information about retrying
@@ -622,7 +622,7 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
         throttling (<option>-R</option>), the latency is computed with respect
         to the transaction scheduled start time, not the actual transaction
         beginning time, thus it also includes the average schedule lag time.
-        When <option>--max-tries</option> is used to enable transactions retries
+        When <option>--max-tries</option> is used to enable transaction retries
         after serialization/deadlock errors, the report includes the number of
         retried transactions and the sum of all retries.
        </para>
@@ -818,7 +818,7 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
       <listitem>
        <para>
         Print messages about all errors and failures (errors without retrying)
-        including which limit for retries was violated and how far it was
+        including which limit for retries was exceeded and how far it was
         exceeded for the serialization/deadlock failures. (Note that in this
         case the output can be significantly increased.).
         See <xref linkend="failures-and-retries"/> for more information.
@@ -2433,7 +2433,7 @@ END;
   </para>
 
   <para>
-   If <option>--failures-detailed</option> option is used, the type of
+   If the <option>--failures-detailed</option> option is used, the type of
    failure is reported in the <replaceable>time</replaceable> like this:
 <screen>
 3 0 47423 0 1499414498 34501 3
@@ -2773,12 +2773,12 @@ statement latencies in milliseconds, failures and retries:
      <listitem>
        <para>
          Errors of the main program. They are the most serious and always result
-         in an immediate exit from the <application>pgbench</application> with
+         in an immediate exit from <application>pgbench</application> with
          the corresponding error message. They include:
          <itemizedlist>
            <listitem>
              <para>
-               errors at the beginning of the <application>pgbench</application>
+               errors at the beginning of <application>pgbench</application>
                (e.g. an invalid option value);
              </para>
            </listitem>
@@ -2791,7 +2791,7 @@ statement latencies in milliseconds, failures and retries:
            <listitem>
              <para>
                errors before starting threads (e.g. we could not connect to the
-               database server / the syntax error in the meta command / thread
+               database server / syntax error in the meta command / thread
                creation failure);
              </para>
            </listitem>
@@ -2813,7 +2813,7 @@ statement latencies in milliseconds, failures and retries:
      </listitem>
      <listitem>
        <para>
-         Direct client errors. They lead to immediate exit from the
+         Direct client errors. They lead to immediate exit from
          <application>pgbench</application> with the corresponding error message
          only in the case of an internal <application>pgbench</application>
          error (which are supposed to never occur...). Otherwise in the worst
@@ -2829,11 +2829,11 @@ statement latencies in milliseconds, failures and retries:
   </para>
 
   <para>
-   Client's run is aborted in case of a serious error, for example, the
-   connection with the database server was lost or the end of script reached
-   without completing the last transaction. In addition, if an execution of SQL
+   A client's run is aborted in case of a serious error; for example, the
+   connection with the database server was lost or the end of script was reached
+   without completing the last transaction. In addition, if execution of an SQL
    or meta command fails for reasons other than serialization or deadlock errors,
-   the client is aborted. Otherwise, if an SQL fails with serialization or
+   the client is aborted. Otherwise, if an SQL command fails with serialization or
    deadlock errors, the client is not aborted. In such cases, the current
    transaction is rolled back, which also includes setting the client variables
    as they were before the run of this transaction (it is assumed that one
@@ -2845,21 +2845,21 @@ statement latencies in milliseconds, failures and retries:
    time of retries (specified by the <option>--latency-limit</option> option) / the end
    of benchmark (specified by the <option>--time</option> option). If
    the last trial run fails, this transaction will be reported as failed but
-   the client is not aborted and continue to work.
+   the client is not aborted and continues to work.
   </para>
 
   <note>
    <para>
-    Without specifying the <option>--max-tries</option> option a transaction will
+    Without specifying the <option>--max-tries</option> option, a transaction will
     never be retried after a serialization or deadlock error because its default
-    values is 1. Use an unlimited number of tries (<literal>--max-tries=0</literal>)
+    value is 1. Use an unlimited number of tries (<literal>--max-tries=0</literal>)
     and the <option>--latency-limit</option> option to limit only the maximum time
     of tries. You can also use the <option>--time</option> option to limit the
     benchmark duration under an unlimited number of tries.
    </para>
    <para>
     Be careful when repeating scripts that contain multiple transactions: the
-    script is always retried completely, so the successful transactions can be
+    script is always retried completely, so successful transactions can be
     performed several times.
    </para>
    <para>
@@ -2879,7 +2879,7 @@ statement latencies in milliseconds, failures and retries:
   <para>
    The main report contains the number of failed transactions. If the
    <option>--max-tries</option> option is not equal to 1, the main report also
-   contains the statistics related to retries: the total number of retried
+   contains statistics related to retries: the total number of retried
    transactions and total number of retries. The per-script report inherits all
    these fields from the main report. The per-statement report displays retry
    statistics only if the <option>--max-tries</option> option is not equal to 1.
@@ -2890,7 +2890,7 @@ statement latencies in milliseconds, failures and retries:
    aggregation logs, as well as in the main and per-script reports, use the
    <option>--failures-detailed</option> option. If you also want to distinguish
    all errors and failures (errors without retrying) by type including which
-   limit for retries was violated and how far it was exceeded for the
+   limit for retries was exceeded and how much it was exceeded by for the
    serialization/deadlock failures, use the <option>--verbose-errors</option>
    option.
   </para>
-- 
2.17.1

  [text/x-diff] 0008-doc-review-CREATE-DATABASE-STRATEGY.patch (1.2K, ../../20220411020336.GB26620@telsasoft.com/9-0008-doc-review-CREATE-DATABASE-STRATEGY.patch)
  download | inline diff:
From fe57c203b6c5104ffacef50f104d625d3fb73031 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 29 Mar 2022 11:18:59 -0500
Subject: [PATCH 08/19] doc review: CREATE DATABASE STRATEGY

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

diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index b2bb3da5fdb..ed0cbe3473c 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -132,7 +132,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
         available. This strategy writes a small record to the write-ahead log
         for each tablespace used by the target database. Each such record
         represents copying an entire directory to a new location at the
-        filesystem level. While this does reduce the write-ahed
+        filesystem level. While this does reduce the write-ahead
         log volume substantially, especially if the template database is large,
         it also forces the system to perform a checkpoint both before and
         after the creation of the new database. In some situations, this may
-- 
2.17.1

  [text/x-diff] 0009-doc-review-GROUP-BY-optimization.patch (909B, ../../20220411020336.GB26620@telsasoft.com/10-0009-doc-review-GROUP-BY-optimization.patch)
  download | inline diff:
From 8b4f76a9f82e1b74ec6cf4d460151473674ab723 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 4 Apr 2022 08:24:23 -0500
Subject: [PATCH 09/19] doc review: GROUP BY optimization

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

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 30ac8e0137f..81cacdcbe40 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5047,7 +5047,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
       </term>
       <listitem>
        <para>
-        Enables or disables reodering of keys in <literal>GROUP BY</literal>
+        Enables or disables reordering of keys in <literal>GROUP BY</literal>
         clause. The default is <literal>on</literal>.
        </para>
       </listitem>
-- 
2.17.1

  [text/x-diff] 0010-doc-review-update-synopsis-pg_upgrade-optional-newbi.patch (1.1K, ../../20220411020336.GB26620@telsasoft.com/11-0010-doc-review-update-synopsis-pg_upgrade-optional-newbi.patch)
  download | inline diff:
From 84dc962ccb57437054f5798e4cdde2a358ca2280 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 20 Dec 2021 19:13:29 -0600
Subject: [PATCH 10/19] doc review: update synopsis: pg_upgrade optional
 newbindir

See also: 959f6d6a1821b7d9068244f500dd80953e768d16
---
 doc/src/sgml/ref/pgupgrade.sgml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index f024c3ef259..8cda8d16d17 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -24,8 +24,7 @@ PostgreSQL documentation
    <command>pg_upgrade</command>
    <arg choice="plain"><option>-b</option></arg>
    <arg choice="plain"><replaceable>oldbindir</replaceable></arg>
-   <arg choice="plain"><option>-B</option></arg>
-   <arg choice="plain"><replaceable>newbindir</replaceable></arg>
+   <arg choice="opt"><option>-B</option> <replaceable>newbindir</replaceable></arg>
    <arg choice="plain"><option>-d</option></arg>
    <arg choice="plain"><replaceable>oldconfigdir</replaceable></arg>
    <arg choice="plain"><option>-D</option></arg>
-- 
2.17.1

  [text/x-diff] 0011-doc-review-basebackup_to_shell.required_role.patch (1.1K, ../../20220411020336.GB26620@telsasoft.com/12-0011-doc-review-basebackup_to_shell.required_role.patch)
  download | inline diff:
From 30b07b0d385d4adb2f130f1383a34f8c731b786c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 7 Apr 2022 09:04:23 -0500
Subject: [PATCH 11/19] doc review: basebackup_to_shell.required_role

c6306db24bd913375f99494e38ab315befe44e11

See also:
https://www.postgresql.org/message-id/CA%2BTgmoaBQ5idAh7OsQGAbLY166SVkj7KkKROkTyN5sOF6QDuww%40mail.gmail.com
---
 doc/src/sgml/basebackup-to-shell.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/basebackup-to-shell.sgml b/doc/src/sgml/basebackup-to-shell.sgml
index 9f44071d502..15231ef3939 100644
--- a/doc/src/sgml/basebackup-to-shell.sgml
+++ b/doc/src/sgml/basebackup-to-shell.sgml
@@ -65,8 +65,8 @@
     </term>
     <listitem>
      <para>
-      A role which replication whose privileges users are required to possess
-      in order to make use of the <literal>shell</literal> backup target.
+      The role required in order to
+      make use of the <literal>shell</literal> backup target.
       If this is not set, any replication user may make use of the
       <literal>shell</literal> backup target.
      </para>
-- 
2.17.1

  [text/x-diff] 0012-v15-comment-typos.patch (15.4K, ../../20220411020336.GB26620@telsasoft.com/13-0012-v15-comment-typos.patch)
  download | inline diff:
From 118a3ad6ce6a33b6e393a889322616ded8ac646a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 6 Apr 2022 07:38:49 -0500
Subject: [PATCH 12/19] v15 comment typos

---
 contrib/ltree/ltree.h                     | 2 +-
 doc/src/sgml/glossary.sgml                | 2 +-
 doc/src/sgml/monitoring.sgml              | 2 +-
 src/backend/access/heap/heapam.c          | 2 +-
 src/backend/access/transam/xlogrecovery.c | 2 +-
 src/backend/commands/dbcommands.c         | 2 +-
 src/backend/commands/vacuumparallel.c     | 2 +-
 src/backend/optimizer/path/costsize.c     | 2 +-
 src/backend/optimizer/path/pathkeys.c     | 4 ++--
 src/backend/parser/parse_expr.c           | 2 +-
 src/backend/utils/adt/genfile.c           | 2 +-
 src/backend/utils/cache/relmapper.c       | 4 ++--
 src/backend/utils/error/csvlog.c          | 2 +-
 src/backend/utils/error/jsonlog.c         | 2 +-
 src/backend/utils/mmgr/generation.c       | 2 +-
 src/bin/pg_basebackup/pg_basebackup.c     | 2 +-
 src/bin/pgbench/pgbench.c                 | 4 ++--
 src/bin/psql/copy.c                       | 2 +-
 src/bin/psql/describe.c                   | 2 +-
 src/bin/psql/tab-complete.c               | 2 +-
 src/tools/mark_pgdllimport.pl             | 2 +-
 21 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h
index 10341d60212..564e4fa81b8 100644
--- a/contrib/ltree/ltree.h
+++ b/contrib/ltree/ltree.h
@@ -24,7 +24,7 @@
  * modified to look for -D compile flags in Makefiles, so here, in order to
  * get the historic behavior of LOWER_NODE not being defined on MSVC, we only
  * define it when not building in that environment.  This is important as we
- * want to maintain the same LOWER_NODE behavior after a pg_update.
+ * want to maintain the same LOWER_NODE behavior after a pg_upgrade.
  */
 #ifndef _MSC_VER
 #define LOWER_NODE
diff --git a/doc/src/sgml/glossary.sgml b/doc/src/sgml/glossary.sgml
index b187506d5e5..f81fdc31f9e 100644
--- a/doc/src/sgml/glossary.sgml
+++ b/doc/src/sgml/glossary.sgml
@@ -137,7 +137,7 @@
      <!-- NB: In the code, the autovac launcher doesn't use the auxiliary
           process scaffolding; however it does behave as one so we list it
           here anyway. In addition, logger isn't connected to shared memory so
-          most code outside postmaster.c doesn't even consider them "procs" in
+          most code outside postmaster.c doesn't even consider it a "proc" in
           the first place.
           -->
      the <glossterm linkend="glossary-autovacuum">autovacuum launcher</glossterm>
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 2f44113caa5..87b6e5fb5e8 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -200,7 +200,7 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
 
   <para>
    Cumulative statistics are collected in shared memory. Every
-   <productname>PostgreSQL</productname> process collects statistics locally
+   <productname>PostgreSQL</productname> process collects statistics locally,
    then updates the shared data at appropriate intervals.  When a server,
    including a physical replica, shuts down cleanly, a permanent copy of the
    statistics data is stored in the <filename>pg_stat</filename> subdirectory,
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 1ee985f6330..983db140aaf 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -1470,7 +1470,7 @@ heap_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction,
 		 * heap_set_tidrange will have used heap_setscanlimits to limit the
 		 * range of pages we scan to only ones that can contain the TID range
 		 * we're scanning for.  Here we must filter out any tuples from these
-		 * pages that are outwith that range.
+		 * pages that are outside that range.
 		 */
 		if (ItemPointerCompare(&scan->rs_ctup.t_self, mintid) < 0)
 		{
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 2e555f8573d..4ee29182ac8 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -2975,7 +2975,7 @@ ReadRecord(XLogPrefetcher *xlogprefetcher, int emode,
 			/*
 			 * When not in standby mode we find that WAL ends in an incomplete
 			 * record, keep track of that record.  After recovery is done,
-			 * we'll write a record to indicate downstream WAL readers that
+			 * we'll write a record to indicate to downstream WAL readers that
 			 * that portion is to be ignored.
 			 */
 			if (!StandbyMode &&
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index ce776c53cad..1bbecfeddf6 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -386,7 +386,7 @@ ScanSourceDatabasePgClassPage(Page page, Buffer buf, Oid tbid, Oid dbid,
  * needs to be copied from the source database to the destination database,
  * and if so, construct a CreateDBRelInfo for it.
  *
- * Visbility checks are handled by the caller, so our job here is just
+ * Visibility checks are handled by the caller, so our job here is just
  * to assess the data stored in the tuple.
  */
 CreateDBRelInfo *
diff --git a/src/backend/commands/vacuumparallel.c b/src/backend/commands/vacuumparallel.c
index 6b4f742578e..bbf3b69c57e 100644
--- a/src/backend/commands/vacuumparallel.c
+++ b/src/backend/commands/vacuumparallel.c
@@ -12,7 +12,7 @@
  * the memory space for storing dead items allocated in the DSM segment.  We
  * launch parallel worker processes at the start of parallel index
  * bulk-deletion and index cleanup and once all indexes are processed, the
- * parallel worker processes exit.  Each time we process indexes parallelly,
+ * parallel worker processes exit.  Each time we process indexes in parallel,
  * the parallel context is re-initialized so that the same DSM can be used for
  * multiple passes of index bulk-deletion and index cleanup.
  *
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index ec3c23013a3..8166224dcc8 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1976,7 +1976,7 @@ compute_cpu_sort_cost(PlannerInfo *root, List *pathkeys, int nPresortedKeys,
 		 * by calling estimate_num_groups_incremental(), which estimates the
 		 * group size for "new" pathkeys.
 		 *
-		 * Note: estimate_num_groups_incremntal does not handle fake Vars, so use
+		 * Note: estimate_num_groups_incremental does not handle fake Vars, so use
 		 * a default estimate otherwise.
 		 */
 		if (!has_fake_var)
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index 75fe03fd04b..b1e0c3e41cf 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -2383,7 +2383,7 @@ pathkeys_useful_for_ordering(PlannerInfo *root, List *pathkeys)
  *		Count the number of pathkeys that are useful for grouping (instead of
  *		explicit sort)
  *
- * Group pathkeys could be reordered to benefit from the odering. The ordering
+ * Group pathkeys could be reordered to benefit from the ordering. The ordering
  * may not be "complete" and may require incremental sort, but that's fine. So
  * we simply count prefix pathkeys with a matching group key, and stop once we
  * find the first pathkey without a match.
@@ -2392,7 +2392,7 @@ pathkeys_useful_for_ordering(PlannerInfo *root, List *pathkeys)
  * pathkeys are useful for grouping, and we might do incremental sort to get
  * path ordered by (a,b,e).
  *
- * This logic is necessary to retain paths with ordeding not matching grouping
+ * This logic is necessary to retain paths with ordering not matching grouping
  * keys directly, without the reordering.
  *
  * Returns the length of pathkey prefix with matching group keys.
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index b6a2482f23a..3cbd5161528 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -3507,7 +3507,7 @@ transformJsonOutput(ParseState *pstate, const JsonOutput *output,
 }
 
 /*
- * Transform JSON output clause of JSON contructor functions.
+ * Transform JSON output clause of JSON constructor functions.
  *
  * Derive RETURNING type, if not specified, from argument types.
  */
diff --git a/src/backend/utils/adt/genfile.c b/src/backend/utils/adt/genfile.c
index 88f279d1b31..648d0f590b9 100644
--- a/src/backend/utils/adt/genfile.c
+++ b/src/backend/utils/adt/genfile.c
@@ -59,7 +59,7 @@ convert_and_check_filename(text *arg)
 	canonicalize_path(filename);	/* filename can change length here */
 
 	/*
-	 * Roles with privleges of the 'pg_read_server_files' role are allowed to access
+	 * Roles with privileges of the 'pg_read_server_files' role are allowed to access
 	 * any files on the server as the PG user, so no need to do any further checks
 	 * here.
 	 */
diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c
index dee3387d026..75a3aedc5af 100644
--- a/src/backend/utils/cache/relmapper.c
+++ b/src/backend/utils/cache/relmapper.c
@@ -1044,7 +1044,7 @@ perform_relmap_update(bool shared, const RelMapFile *updates)
 					  (shared ? "global" : DatabasePath));
 
 	/*
-	 * We succesfully wrote the updated file, so it's now safe to rely on the
+	 * We successfully wrote the updated file, so it's now safe to rely on the
 	 * new values in this process, too.
 	 */
 	if (shared)
@@ -1093,7 +1093,7 @@ relmap_redo(XLogReaderState *record)
 		 * an existing database as we do for creating a new database. In
 		 * the latter case, taking the relmap log and sending sinval messages
 		 * is unnecessary, but harmless. If we wanted to avoid it, we could
-		 * add a flag to the WAL record to indicate which opration is being
+		 * add a flag to the WAL record to indicate which operation is being
 		 * performed.
 		 */
 		LWLockAcquire(RelationMappingLock, LW_EXCLUSIVE);
diff --git a/src/backend/utils/error/csvlog.c b/src/backend/utils/error/csvlog.c
index 89f78b447d9..5c49bc4209e 100644
--- a/src/backend/utils/error/csvlog.c
+++ b/src/backend/utils/error/csvlog.c
@@ -4,7 +4,7 @@
  *	  CSV logging
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of Californi
+ * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
  * IDENTIFICATION
diff --git a/src/backend/utils/error/jsonlog.c b/src/backend/utils/error/jsonlog.c
index 843641c865f..f336c063e58 100644
--- a/src/backend/utils/error/jsonlog.c
+++ b/src/backend/utils/error/jsonlog.c
@@ -4,7 +4,7 @@
  *	  JSON logging
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of Californi
+ * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
  * IDENTIFICATION
diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c
index 685688c1554..56ed496386e 100644
--- a/src/backend/utils/mmgr/generation.c
+++ b/src/backend/utils/mmgr/generation.c
@@ -27,7 +27,7 @@
  *	context's 'freeblock' field.  If the freeblock field is already occupied
  *	by another free block we simply return the newly empty block to malloc.
  *
- *	This approach to free blocks requires fewer malloc/free calls for truely
+ *	This approach to free blocks requires fewer malloc/free calls for truly
  *	first allocated, first free'd allocation patterns.
  *
  *-------------------------------------------------------------------------
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 65dcfff0a03..e9e5d44abbc 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1464,7 +1464,7 @@ ReceiveArchiveStreamChunk(size_t r, char *copybuf, void *callback_data)
 				GetCopyDataEnd(r, copybuf, cursor);
 
 				/*
-				 * The server shouldn't send progres report messages too
+				 * The server shouldn't send progress report messages too
 				 * often, so we force an update each time we receive one.
 				 */
 				progress_report(state->tablespacenum, true, false);
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 8a31ffa0677..2430a490a95 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3450,7 +3450,7 @@ discardUntilSync(CState *st)
 		PQclear(res);
 	}
 
-	/* exit pipline */
+	/* exit pipeline */
 	if (PQexitPipelineMode(st->con) != 1)
 	{
 		pg_log_error("client %d aborted: failed to exit pipeline mode for rolling back the failed transaction",
@@ -7261,7 +7261,7 @@ main(int argc, char **argv)
 
 	/*
 	 * All connections should be already closed in threadRun(), so this
-	 * disconnect_all() will be a no-op, but clean up the connecions just to
+	 * disconnect_all() will be a no-op, but clean up the connections just to
 	 * be sure. We don't need to measure the disconnection delays here.
 	 */
 	disconnect_all(state, nclients);
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
index a5ceaec3ac7..a73e22f723e 100644
--- a/src/bin/psql/copy.c
+++ b/src/bin/psql/copy.c
@@ -653,7 +653,7 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, PGresult **res)
 			 *
 			 * Make sure there's always space for four more bytes in the
 			 * buffer, plus a NUL terminator.  That way, an EOF marker is
-			 * never split across two fgets() calls, which simplies the logic.
+			 * never split across two fgets() calls, which simplifies the logic.
 			 */
 			if (buflen >= COPYBUFSIZ - 5 || (copydone && buflen > 0))
 			{
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index e8919ab0be2..d04ba2b0290 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3080,7 +3080,7 @@ describeOneTableDetails(const char *schemaname,
 		 * servers between v11 and v14, though these must still be shown to
 		 * the user.  So we use another property that is true for such
 		 * inherited triggers to avoid them being hidden, which is their
-		 * dependendence on another trigger.
+		 * dependence on another trigger.
 		 */
 		if (pset.sversion >= 110000 && pset.sversion < 150000)
 			appendPQExpBufferStr(&buf, "(NOT t.tgisinternal OR (t.tgisinternal AND t.tgenabled = 'D') \n"
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 8f163fb7bac..10e8dbc9b1f 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2257,7 +2257,7 @@ psql_completion(const char *text, int start, int end)
 		COMPLETE_WITH("COLUMN", "CONSTRAINT", "CHECK", "UNIQUE", "PRIMARY KEY",
 					  "EXCLUDE", "FOREIGN KEY");
 	}
-	/* ATER TABLE xxx ADD [COLUMN] yyy */
+	/* ALTER TABLE xxx ADD [COLUMN] yyy */
 	else if (Matches("ALTER", "TABLE", MatchAny, "ADD", "COLUMN", MatchAny) ||
 			 (Matches("ALTER", "TABLE", MatchAny, "ADD", MatchAny) &&
 			  !Matches("ALTER", "TABLE", MatchAny, "ADD", "COLUMN|CONSTRAINT|CHECK|UNIQUE|PRIMARY|EXCLUDE|FOREIGN")))
diff --git a/src/tools/mark_pgdllimport.pl b/src/tools/mark_pgdllimport.pl
index a09ec5a369e..83b90db6ef9 100755
--- a/src/tools/mark_pgdllimport.pl
+++ b/src/tools/mark_pgdllimport.pl
@@ -6,7 +6,7 @@
 #	Perl script that tries to add PGDLLIMPORT markings to PostgreSQL
 #	header files.
 #
-# This relies on a few idiosyncracies of the PostgreSQL cding style,
+# This relies on a few idiosyncracies of the PostgreSQL coding style,
 # such as the fact that we always use "extern" in function
 # declarations, and that we don't use // comments. It's not very
 # smart and may not catch all cases.
-- 
2.17.1

  [text/x-diff] 0013-f-old-comment-typos.patch (2.1K, ../../20220411020336.GB26620@telsasoft.com/14-0013-f-old-comment-typos.patch)
  download | inline diff:
From c9d16b0cd6e28a14f448c0a3317f3a86d40ef0f8 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 6 Apr 2022 07:42:39 -0500
Subject: [PATCH 13/19] f!old comment typos

---
 src/backend/access/brin/brin_minmax_multi.c | 2 +-
 src/backend/storage/ipc/procarray.c         | 2 +-
 src/backend/utils/error/elog.c              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/access/brin/brin_minmax_multi.c b/src/backend/access/brin/brin_minmax_multi.c
index 82333752f1f..10d4f17bc6f 100644
--- a/src/backend/access/brin/brin_minmax_multi.c
+++ b/src/backend/access/brin/brin_minmax_multi.c
@@ -310,7 +310,7 @@ AssertCheckRanges(Ranges *ranges, FmgrInfo *cmpFn, Oid colloid)
 	 */
 	AssertArrayOrder(cmpFn, colloid, ranges->values, 2 * ranges->nranges);
 
-	/* then the single-point ranges (with nvalues boundar values ) */
+	/* then the single-point ranges (with nvalues boundary values ) */
 	AssertArrayOrder(cmpFn, colloid, &ranges->values[2 * ranges->nranges],
 					 ranges->nsorted);
 
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 603f6aba71f..e184a3552c8 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -2338,7 +2338,7 @@ GetSnapshotData(Snapshot snapshot)
 
 			/*
 			 * We don't include our own XIDs (if any) in the snapshot. It
-			 * needs to be includeded in the xmin computation, but we did so
+			 * needs to be included in the xmin computation, but we did so
 			 * outside the loop.
 			 */
 			if (pgxactoff == mypgxactoff)
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index bd4b2c19b1c..72778b896a2 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -2269,7 +2269,7 @@ write_console(const char *line, int len)
 	/*
 	 * Conversion on non-win32 platforms is not implemented yet. It requires
 	 * non-throw version of pg_do_encoding_conversion(), that converts
-	 * unconvertable characters to '?' without errors.
+	 * unconvertible characters to '?' without errors.
 	 *
 	 * XXX: We have a no-throw version now. It doesn't convert to '?' though.
 	 */
-- 
2.17.1

  [text/x-diff] 0014-duplicate-words.patch (1.6K, ../../20220411020336.GB26620@telsasoft.com/15-0014-duplicate-words.patch)
  download | inline diff:
From cfff9bf8378252b4c642f2b960954194ed5a93ea Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 6 Apr 2022 07:24:48 -0500
Subject: [PATCH 14/19] duplicate words

3f1ce973467a0d285961bf2f99b11d06e264e2c1n 3500ccc39b0dadd1068a03938e4b8ff562587ccc
---
 src/backend/access/transam/xlogreader.c     | 2 +-
 src/backend/replication/basebackup_server.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index a5f1a648d3d..b3e37003ac5 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -300,7 +300,7 @@ XLogReleasePreviousRecord(XLogReaderState *state)
 	/* Release the space. */
 	if (unlikely(record->oversized))
 	{
-		/* It's not in the the decode buffer, so free it to release space. */
+		/* It's not in the decode buffer, so free it to release space. */
 		pfree(record);
 	}
 	else
diff --git a/src/backend/replication/basebackup_server.c b/src/backend/replication/basebackup_server.c
index bc16897b33f..33595616894 100644
--- a/src/backend/replication/basebackup_server.c
+++ b/src/backend/replication/basebackup_server.c
@@ -195,7 +195,7 @@ bbsink_server_end_archive(bbsink *sink)
 
 	/*
 	 * We intentionally don't use data_sync_elevel here, because the server
-	 * shouldn't PANIC just because we can't guarantee the the backup has been
+	 * shouldn't PANIC just because we can't guarantee the backup has been
 	 * written down to disk. Running recovery won't fix anything in this case
 	 * anyway.
 	 */
-- 
2.17.1

  [text/x-diff] 0015-f-relpersistence.patch (1.0K, ../../20220411020336.GB26620@telsasoft.com/16-0015-f-relpersistence.patch)
  download | inline diff:
From 4242150d1d27803e25c259c3f845a8c04be98b0e Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 7 Apr 2022 10:34:06 -0500
Subject: [PATCH 15/19] f!relpersistence

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

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index c1c89a95c6b..6f285871b64 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -2065,8 +2065,8 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
        <structfield>relpersistence</structfield> <type>char</type>
       </para>
       <para>
-       <literal>p</literal> = permanent table, <literal>u</literal> = unlogged table,
-       <literal>t</literal> = temporary table
+       <literal>p</literal> = permanent table/sequence, <literal>u</literal> = unlogged table/sequence,
+       <literal>t</literal> = temporary table/sequence
       </para></entry>
      </row>
 
-- 
2.17.1

  [text/x-diff] 0016-Extraneous-blank-lines.patch (18.2K, ../../20220411020336.GB26620@telsasoft.com/17-0016-Extraneous-blank-lines.patch)
  download | inline diff:
From 183c98e6b028dd08036502d74a307034fb44c1ac Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 2 Apr 2022 11:58:06 -0500
Subject: [PATCH 16/19] Extraneous blank lines

I noticed some left behind by d61a361d1, and searched for the others like:

git grep -nB1 '^}' '*.c' |less
... \.c-[0-9]*-$

I've omitted some that involved structures or conditional compilation.
---
 contrib/btree_gist/btree_bit.c                                | 1 -
 contrib/btree_gist/btree_cash.c                               | 1 -
 contrib/btree_gist/btree_float4.c                             | 1 -
 contrib/btree_gist/btree_float8.c                             | 1 -
 contrib/btree_gist/btree_inet.c                               | 1 -
 contrib/btree_gist/btree_interval.c                           | 2 --
 contrib/btree_gist/btree_macaddr.c                            | 1 -
 contrib/btree_gist/btree_macaddr8.c                           | 1 -
 contrib/btree_gist/btree_ts.c                                 | 1 -
 contrib/dblink/dblink.c                                       | 2 --
 contrib/pg_stat_statements/pg_stat_statements.c               | 1 -
 contrib/postgres_fdw/connection.c                             | 1 -
 src/backend/access/nbtree/nbtutils.c                          | 1 -
 src/backend/access/rmgrdesc/gistdesc.c                        | 1 -
 src/backend/access/spgist/spgutils.c                          | 1 -
 src/backend/access/table/tableam.c                            | 1 -
 src/backend/commands/tablecmds.c                              | 1 -
 src/backend/executor/nodeMergejoin.c                          | 1 -
 src/backend/optimizer/geqo/geqo_erx.c                         | 1 -
 src/backend/optimizer/geqo/geqo_ox1.c                         | 1 -
 src/backend/optimizer/geqo/geqo_ox2.c                         | 1 -
 src/backend/optimizer/geqo/geqo_px.c                          | 1 -
 src/backend/replication/logical/snapbuild.c                   | 1 -
 src/backend/replication/pgoutput/pgoutput.c                   | 1 -
 src/backend/statistics/dependencies.c                         | 1 -
 src/backend/storage/sync/sync.c                               | 1 -
 src/backend/tcop/postgres.c                                   | 1 -
 src/backend/tsearch/to_tsany.c                                | 1 -
 src/backend/utils/adt/acl.c                                   | 1 -
 src/backend/utils/adt/json.c                                  | 1 -
 src/backend/utils/adt/jsonfuncs.c                             | 1 -
 src/backend/utils/cache/catcache.c                            | 1 -
 src/backend/utils/resowner/resowner.c                         | 1 -
 src/bin/initdb/initdb.c                                       | 2 --
 src/interfaces/ecpg/ecpglib/misc.c                            | 1 -
 src/interfaces/ecpg/pgtypeslib/numeric.c                      | 1 -
 src/interfaces/ecpg/pgtypeslib/timestamp.c                    | 4 +---
 src/interfaces/libpq/fe-connect.c                             | 1 -
 .../modules/ssl_passphrase_callback/ssl_passphrase_func.c     | 1 -
 39 files changed, 1 insertion(+), 44 deletions(-)

diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c
index 2225244ded5..5b246bcde4b 100644
--- a/contrib/btree_gist/btree_bit.c
+++ b/contrib/btree_gist/btree_bit.c
@@ -104,7 +104,6 @@ gbt_bit_l2n(GBT_VARKEY *leaf, FmgrInfo *flinfo)
 	pfree(o);
 
 	return out;
-
 }
 
 static const gbtree_vinfo tinfo =
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c
index dfa23224b6f..6ac97e2b12a 100644
--- a/contrib/btree_gist/btree_cash.c
+++ b/contrib/btree_gist/btree_cash.c
@@ -195,7 +195,6 @@ gbt_cash_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_float4.c b/contrib/btree_gist/btree_float4.c
index b5d9175e6d5..3cbd9a06dcc 100644
--- a/contrib/btree_gist/btree_float4.c
+++ b/contrib/btree_gist/btree_float4.c
@@ -190,7 +190,6 @@ gbt_float4_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_float8.c b/contrib/btree_gist/btree_float8.c
index 8fe1fedeef8..b95a08e228b 100644
--- a/contrib/btree_gist/btree_float8.c
+++ b/contrib/btree_gist/btree_float8.c
@@ -197,7 +197,6 @@ gbt_float8_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c
index e4b3a946b27..2fb952dca83 100644
--- a/contrib/btree_gist/btree_inet.c
+++ b/contrib/btree_gist/btree_inet.c
@@ -165,7 +165,6 @@ gbt_inet_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c
index a4b3b2b1e6f..c2bf82086df 100644
--- a/contrib/btree_gist/btree_interval.c
+++ b/contrib/btree_gist/btree_interval.c
@@ -173,7 +173,6 @@ gbt_intv_compress(PG_FUNCTION_ARGS)
 	}
 
 	PG_RETURN_POINTER(retval);
-
 }
 
 Datum
@@ -276,7 +275,6 @@ gbt_intv_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, iorg[0], iorg[1], inew[0], inew[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c
index 7f0e9e9c912..17290529c02 100644
--- a/contrib/btree_gist/btree_macaddr.c
+++ b/contrib/btree_gist/btree_macaddr.c
@@ -174,7 +174,6 @@ gbt_macad_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, iorg[0], iorg[1], inew[0], inew[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_macaddr8.c b/contrib/btree_gist/btree_macaddr8.c
index ab4bca5d50d..796cc4efee3 100644
--- a/contrib/btree_gist/btree_macaddr8.c
+++ b/contrib/btree_gist/btree_macaddr8.c
@@ -174,7 +174,6 @@ gbt_macad8_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, iorg[0], iorg[1], inew[0], inew[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index 2671ba961cd..a51900941e5 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -377,7 +377,6 @@ gbt_ts_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, orgdbl[0], orgdbl[1], newdbl[0], newdbl[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index a06d4bd12db..a561d1d6524 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -1004,7 +1004,6 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res)
 
 			/* clean up GUC settings, if we changed any */
 			restoreLocalGucs(nestlevel);
-
 		}
 	}
 	PG_FINALLY();
@@ -2635,7 +2634,6 @@ deleteConnection(const char *name)
 		ereport(ERROR,
 				(errcode(ERRCODE_UNDEFINED_OBJECT),
 				 errmsg("undefined connection name")));
-
 }
 
 static void
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 1ca67ef6234..df2ce63790b 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -1849,7 +1849,6 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
 
 	if (qbuffer)
 		free(qbuffer);
-
 }
 
 /* Number of output arguments (columns) for pg_stat_statements_info */
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 129ca792214..f9b8c01f3b9 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -1734,7 +1734,6 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS)
 		tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
 	}
 
-
 	PG_RETURN_VOID();
 }
 
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 96c72fc4324..5361b147e30 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -2123,7 +2123,6 @@ btoptions(Datum reloptions, bool validate)
 									  RELOPT_KIND_BTREE,
 									  sizeof(BTOptions),
 									  tab, lengthof(tab));
-
 }
 
 /*
diff --git a/src/backend/access/rmgrdesc/gistdesc.c b/src/backend/access/rmgrdesc/gistdesc.c
index 9cab4fa1580..d0c8e247c1d 100644
--- a/src/backend/access/rmgrdesc/gistdesc.c
+++ b/src/backend/access/rmgrdesc/gistdesc.c
@@ -38,7 +38,6 @@ out_gistxlogDelete(StringInfo buf, gistxlogDelete *xlrec)
 {
 	appendStringInfo(buf, "delete: latestRemovedXid %u, nitems: %u",
 					 xlrec->latestRemovedXid, xlrec->ntodelete);
-
 }
 
 static void
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 1ae7492216a..a171ca8a08a 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -747,7 +747,6 @@ spgoptions(Datum reloptions, bool validate)
 									  RELOPT_KIND_SPGIST,
 									  sizeof(SpGistOptions),
 									  tab, lengthof(tab));
-
 }
 
 /*
diff --git a/src/backend/access/table/tableam.c b/src/backend/access/table/tableam.c
index 4f20c6ac12a..b3d1a6c3f8f 100644
--- a/src/backend/access/table/tableam.c
+++ b/src/backend/access/table/tableam.c
@@ -381,7 +381,6 @@ simple_table_tuple_update(Relation rel, ItemPointer otid,
 			elog(ERROR, "unrecognized table_tuple_update status: %u", result);
 			break;
 	}
-
 }
 
 
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 90edd0bb97d..2840bc527bc 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -3773,7 +3773,6 @@ RenameConstraint(RenameStmt *stmt)
 									stmt->relation->inh),	/* recursive? */
 								   false,	/* recursing? */
 								   0 /* expected inhcount */ );
-
 }
 
 /*
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c
index edb8972c5bf..864e3baf86b 100644
--- a/src/backend/executor/nodeMergejoin.c
+++ b/src/backend/executor/nodeMergejoin.c
@@ -1674,5 +1674,4 @@ ExecReScanMergeJoin(MergeJoinState *node)
 		ExecReScan(node->js.ps.lefttree);
 	if (node->js.ps.righttree->chgParam == NULL)
 		ExecReScan(node->js.ps.righttree);
-
 }
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index 3b92f420e0a..d98c0a59e71 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -226,7 +226,6 @@ gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene, int num_gene)
 	}							/* for (i=1; i<num_gene; i++) */
 
 	return edge_failures;
-
 }
 
 /* remove_gene
diff --git a/src/backend/optimizer/geqo/geqo_ox1.c b/src/backend/optimizer/geqo/geqo_ox1.c
index 10d2d0a33ae..ede7abb4177 100644
--- a/src/backend/optimizer/geqo/geqo_ox1.c
+++ b/src/backend/optimizer/geqo/geqo_ox1.c
@@ -89,7 +89,6 @@ ox1(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 		}
 		p = (p + 1) % num_gene; /* increment tour2-index */
 	}
-
 }
 
 #endif							/* defined(OX1) */
diff --git a/src/backend/optimizer/geqo/geqo_ox2.c b/src/backend/optimizer/geqo/geqo_ox2.c
index 72b9b0fb871..080dbc076cc 100644
--- a/src/backend/optimizer/geqo/geqo_ox2.c
+++ b/src/backend/optimizer/geqo/geqo_ox2.c
@@ -106,7 +106,6 @@ ox2(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 			/* city isn't used yet, so inherit from tour2 */
 			offspring[k] = tour2[k];
 	}
-
 }
 
 #endif							/* defined(OX2) */
diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c
index ad5ad3f1e57..0346554bc09 100644
--- a/src/backend/optimizer/geqo/geqo_px.c
+++ b/src/backend/optimizer/geqo/geqo_px.c
@@ -104,7 +104,6 @@ px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 		}
 
 	}
-
 }
 
 #endif							/* defined(PX) */
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 83fca8a77d9..1119a12db9e 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1380,7 +1380,6 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
 	 * records so incremental cleanup can be performed.
 	 */
 	return true;
-
 }
 
 /* ---
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index fe5accca576..8b55ebdd4d2 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -1066,7 +1066,6 @@ pgoutput_column_list_init(PGOutputData *data, List *publications,
 
 		ReleaseSysCache(cftuple);
 	}	/* loop all subscribed publications */
-
 }
 
 /*
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 34326d55619..b6f31849616 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -199,7 +199,6 @@ DependencyGenerator_free(DependencyGenerator state)
 {
 	pfree(state->dependencies);
 	pfree(state);
-
 }
 
 /* generate next combination */
diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c
index c695d816fc6..e1fb6310038 100644
--- a/src/backend/storage/sync/sync.c
+++ b/src/backend/storage/sync/sync.c
@@ -162,7 +162,6 @@ InitSync(void)
 								 HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
 		pendingUnlinks = NIL;
 	}
-
 }
 
 /*
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 95dc2e2c835..304cce135aa 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2636,7 +2636,6 @@ exec_describe_statement_message(const char *stmt_name)
 	}
 	else
 		pq_putemptymessage('n');	/* NoData */
-
 }
 
 /*
diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c
index 1b0a1e244b8..6053a9e31f2 100644
--- a/src/backend/tsearch/to_tsany.c
+++ b/src/backend/tsearch/to_tsany.c
@@ -720,5 +720,4 @@ websearch_to_tsquery(PG_FUNCTION_ARGS)
 	PG_RETURN_DATUM(DirectFunctionCall2(websearch_to_tsquery_byid,
 										ObjectIdGetDatum(cfgId),
 										PointerGetDatum(in)));
-
 }
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 8bdba1c42a5..772c04155c3 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -3094,7 +3094,6 @@ convert_database_priv_string(text *priv_type_text)
 	};
 
 	return convert_any_priv_string(priv_type_text, database_priv_map);
-
 }
 
 
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index 4cf01300d8b..18f19014d0a 100644
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -1501,7 +1501,6 @@ json_object(PG_FUNCTION_ARGS)
 	pfree(result.data);
 
 	PG_RETURN_TEXT_P(rval);
-
 }
 
 /*
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index a682d9c9734..d1356d64166 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -4168,7 +4168,6 @@ json_strip_nulls(PG_FUNCTION_ARGS)
 
 	PG_RETURN_TEXT_P(cstring_to_text_with_len(state->strval->data,
 											  state->strval->len));
-
 }
 
 /*
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index ec073e1ed06..233bcb63180 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1962,7 +1962,6 @@ CatCacheCopyKeys(TupleDesc tupdesc, int nkeys, int *attnos,
 							   att->attbyval,
 							   att->attlen);
 	}
-
 }
 
 /*
diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c
index 3236b1b9195..ceb4b0e3f75 100644
--- a/src/backend/utils/resowner/resowner.c
+++ b/src/backend/utils/resowner/resowner.c
@@ -896,7 +896,6 @@ CreateAuxProcessResourceOwner(void)
 	 * owner.  (This needs to run after, e.g., ShutdownXLOG.)
 	 */
 	on_shmem_exit(ReleaseAuxProcessResourcesCallback, 0);
-
 }
 
 /*
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index ab826da6505..1cb4a5b0d21 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2407,7 +2407,6 @@ setup_locale_encoding(void)
 	if (!check_locale_encoding(lc_ctype, encodingid) ||
 		!check_locale_encoding(lc_collate, encodingid))
 		exit(1);				/* check_locale_encoding printed the error */
-
 }
 
 
@@ -2486,7 +2485,6 @@ setup_text_search(void)
 
 	printf(_("The default text search configuration will be set to \"%s\".\n"),
 		   default_text_search_config);
-
 }
 
 
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index b8dbe5e7f3b..1eef1ec044c 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -191,7 +191,6 @@ ECPGtransactionStatus(const char *connection_name)
 	}
 
 	return PQtransactionStatus(con->connection);
-
 }
 
 bool
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
index dbe4eb21e27..34efc9045f3 100644
--- a/src/interfaces/ecpg/pgtypeslib/numeric.c
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -1308,7 +1308,6 @@ PGTYPESnumeric_cmp(numeric *var1, numeric *var2)
 
 	errno = PGTYPES_NUM_BAD_NUMERIC;
 	return INT_MAX;
-
 }
 
 int
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 3f82ee54a5f..9aff95cf5e3 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -863,8 +863,6 @@ PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout
 {
 	if (TIMESTAMP_NOT_FINITE(*tin))
 		*tout = *tin;
-
-
 	else
 	{
 		if (span->month != 0)
@@ -902,8 +900,8 @@ PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout
 		*tin += span->time;
 		*tout = *tin;
 	}
-	return 0;
 
+	return 0;
 }
 
 
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index cf554d389fa..4c12f1411f7 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -664,7 +664,6 @@ PQconnectdbParams(const char *const *keywords,
 		(void) connectDBComplete(conn);
 
 	return conn;
-
 }
 
 /*
diff --git a/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c b/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
index 7c469fd57e8..b5bb5580a0f 100644
--- a/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
+++ b/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
@@ -89,5 +89,4 @@ rot13_passphrase(char *buf, int size, int rwflag, void *userdata)
 	}
 
 	return strlen(buf);
-
 }
-- 
2.17.1

  [text/x-diff] 0017-f-blanks-which-involve-tabs.patch (29.5K, ../../20220411020336.GB26620@telsasoft.com/18-0017-f-blanks-which-involve-tabs.patch)
  download | inline diff:
From 1d63edf98c702f40ddd77045eec9cb490049f7dc Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 2 Apr 2022 16:28:41 -0500
Subject: [PATCH 17/19] f!blanks which involve tabs

I excluded things involving conditional compilation and do{}while statements
---
 contrib/intarray/_int_bool.c               | 1 -
 contrib/ltree/ltxtquery_io.c               | 1 -
 contrib/spi/refint.c                       | 2 --
 src/backend/access/gin/ginbtree.c          | 1 -
 src/backend/access/heap/heapam.c           | 1 -
 src/backend/access/heap/vacuumlazy.c       | 1 -
 src/backend/access/nbtree/nbtutils.c       | 2 --
 src/backend/access/transam/xlogrecovery.c  | 1 -
 src/backend/catalog/objectaddress.c        | 2 --
 src/backend/catalog/pg_attrdef.c           | 1 -
 src/backend/commands/subscriptioncmds.c    | 1 -
 src/backend/commands/tablecmds.c           | 2 --
 src/backend/executor/execParallel.c        | 1 -
 src/backend/executor/execReplication.c     | 1 -
 src/backend/executor/nodeAgg.c             | 1 -
 src/backend/jit/llvm/llvmjit_deform.c      | 2 --
 src/backend/jit/llvm/llvmjit_expr.c        | 1 -
 src/backend/libpq/hba.c                    | 1 -
 src/backend/optimizer/geqo/geqo_cx.c       | 1 -
 src/backend/optimizer/geqo/geqo_erx.c      | 2 --
 src/backend/optimizer/geqo/geqo_pmx.c      | 6 ------
 src/backend/optimizer/geqo/geqo_px.c       | 2 --
 src/backend/optimizer/plan/planner.c       | 1 -
 src/backend/postmaster/postmaster.c        | 1 -
 src/backend/replication/logical/worker.c   | 1 -
 src/backend/replication/walsender.c        | 1 -
 src/backend/storage/buffer/bufmgr.c        | 2 --
 src/backend/storage/buffer/freelist.c      | 1 -
 src/backend/storage/ipc/procarray.c        | 1 -
 src/backend/storage/page/bufpage.c         | 2 --
 src/backend/tcop/utility.c                 | 1 -
 src/backend/tsearch/to_tsany.c             | 1 -
 src/backend/tsearch/ts_parse.c             | 2 --
 src/backend/utils/adt/jsonb.c              | 1 -
 src/backend/utils/adt/multirangetypes.c    | 2 --
 src/backend/utils/adt/oracle_compat.c      | 1 -
 src/backend/utils/adt/ruleutils.c          | 1 -
 src/backend/utils/adt/selfuncs.c           | 1 -
 src/backend/utils/adt/timestamp.c          | 2 --
 src/backend/utils/adt/tsvector_op.c        | 1 -
 src/backend/utils/cache/catcache.c         | 1 -
 src/backend/utils/error/elog.c             | 2 --
 src/backend/utils/sort/tuplesort.c         | 1 -
 src/bin/pg_dump/pg_dumpall.c               | 1 -
 src/bin/pg_rewind/parsexlog.c              | 1 -
 src/bin/pg_verifybackup/pg_verifybackup.c  | 2 --
 src/bin/psql/describe.c                    | 2 --
 src/bin/psql/prompt.c                      | 1 -
 src/common/jsonapi.c                       | 3 ---
 src/fe_utils/print.c                       | 1 -
 src/interfaces/ecpg/ecpglib/connect.c      | 1 -
 src/interfaces/ecpg/ecpglib/data.c         | 1 -
 src/interfaces/ecpg/ecpglib/execute.c      | 1 -
 src/interfaces/ecpg/pgtypeslib/dt_common.c | 1 -
 src/interfaces/ecpg/pgtypeslib/interval.c  | 1 -
 src/interfaces/libpq/fe-secure-openssl.c   | 1 -
 src/pl/tcl/pltcl.c                         | 1 -
 src/port/chklocale.c                       | 1 -
 58 files changed, 80 deletions(-)

diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index 4b6a31080e4..3ed88af76d7 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -210,7 +210,6 @@ makepol(WORKSTATE *state)
 						(errcode(ERRCODE_SYNTAX_ERROR),
 						 errmsg("syntax error")));
 				return ERR;
-
 		}
 	}
 
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index d967f92110f..3eca5cb8ff3 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -260,7 +260,6 @@ makepol(QPRS_STATE *state)
 						 errmsg("syntax error")));
 
 				return ERR;
-
 		}
 	}
 	while (lenstack)
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 6fbfef2b121..18062eb1cff 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -497,12 +497,10 @@ check_foreign_key(PG_FUNCTION_ARGS)
 								 nv, (is_char_type > 0) ? "'" : "", (k < nkeys) ? ", " : "");
 					}
 					strcat(sql, " where ");
-
 				}
 				else
 					/* DELETE */
 					snprintf(sql, sizeof(sql), "delete from %s where ", relname);
-
 			}
 
 			/*
diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c
index 8df45478f10..cc6d4e63382 100644
--- a/src/backend/access/gin/ginbtree.c
+++ b/src/backend/access/gin/ginbtree.c
@@ -527,7 +527,6 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
 									   BufferGetBlockNumber(stack->buffer),
 									   BufferGetBlockNumber(rbuffer));
 			}
-
 		}
 		else
 		{
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 983db140aaf..cd1dfaa1d09 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8481,7 +8481,6 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
 		{
 			xlrec.cmin = InvalidCommandId;
 			xlrec.cmax = HeapTupleHeaderGetRawCommandId(hdr);
-
 		}
 		xlrec.combocid = InvalidCommandId;
 	}
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index e1cac74e620..a3c8ccdbe5c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -2073,7 +2073,6 @@ lazy_scan_noprune(LVRelState *vacrel,
 				elog(ERROR, "unexpected HeapTupleSatisfiesVacuum result");
 				break;
 		}
-
 	}
 
 	vacrel->offnum = InvalidOffsetNumber;
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 5361b147e30..9daf57d4038 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -2116,7 +2116,6 @@ btoptions(Datum reloptions, bool validate)
 		offsetof(BTOptions, vacuum_cleanup_index_scale_factor)},
 		{"deduplicate_items", RELOPT_TYPE_BOOL,
 		offsetof(BTOptions, deduplicate_items)}
-
 	};
 
 	return (bytea *) build_reloptions(reloptions, validate,
@@ -2590,7 +2589,6 @@ _bt_check_natts(Relation rel, bool heapkeyspace, Page page, OffsetNumber offnum)
 
 			/* Use generic heapkeyspace pivot tuple handling */
 		}
-
 	}
 
 	/* Handle heapkeyspace pivot tuples (excluding minus infinity items) */
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 4ee29182ac8..5c002359ed6 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -1790,7 +1790,6 @@ PerformWalRecovery(void)
 		/* there are no WAL records following the checkpoint */
 		ereport(LOG,
 				(errmsg("redo is not required")));
-
 	}
 
 	/*
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index ac6043514f1..8377b4f7d4d 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -1007,7 +1007,6 @@ get_object_address(ObjectType objtype, Node *object,
 					address.objectId = get_domain_constraint_oid(domaddr.objectId,
 																 constrname, missing_ok);
 					address.objectSubId = 0;
-
 				}
 				break;
 			case OBJECT_DATABASE:
@@ -5621,7 +5620,6 @@ getObjectIdentityParts(const ObjectAddress *object,
 					systable_endscan(rcscan);
 					table_close(defaclrel, AccessShareLock);
 					break;
-
 				}
 
 				defacl = (Form_pg_default_acl) GETSTRUCT(tup);
diff --git a/src/backend/catalog/pg_attrdef.c b/src/backend/catalog/pg_attrdef.c
index 2d63c6e62a3..c5d4a9912ea 100644
--- a/src/backend/catalog/pg_attrdef.c
+++ b/src/backend/catalog/pg_attrdef.c
@@ -167,7 +167,6 @@ StoreAttrDefault(Relation rel, AttrNumber attnum,
 
 		if (!missingIsNull)
 			pfree(DatumGetPointer(missingval));
-
 	}
 	table_close(attrrel, RowExclusiveLock);
 	heap_freetuple(atttup);
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 2e8d8afead8..b94236f74d3 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -1570,7 +1570,6 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
 		 */
 		if (slotname)
 			ReplicationSlotDropAtPubNode(wrconn, slotname, false);
-
 	}
 	PG_FINALLY();
 	{
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 2840bc527bc..23e572dd227 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -945,7 +945,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
 			ereport(ERROR,
 					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 					 errmsg("specifying a table access method is not supported on a partitioned table")));
-
 	}
 	else if (RELKIND_HAS_TABLE_AM(relkind))
 		accessMethod = default_table_access_method;
@@ -17450,7 +17449,6 @@ ComputePartitionAttrs(ParseState *pstate, Relation rel, List *partParams, AttrNu
 							 errmsg("data type %s has no default operator class for access method \"%s\"",
 									format_type_be(atttype), "btree"),
 							 errhint("You must specify a btree operator class or define a default btree operator class for the data type.")));
-
 			}
 		}
 		else
diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c
index 9a0d5d59ef6..f1fd7f7e8b2 100644
--- a/src/backend/executor/execParallel.c
+++ b/src/backend/executor/execParallel.c
@@ -1439,7 +1439,6 @@ ParallelQueryMain(dsm_segment *seg, shm_toc *toc)
 
 		paramexec_space = dsa_get_address(area, fpes->param_exec);
 		RestoreParamExecParams(paramexec_space, queryDesc->estate);
-
 	}
 	pwcxt.toc = toc;
 	pwcxt.seg = seg;
diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c
index 27989bd723d..b000645d48b 100644
--- a/src/backend/executor/execReplication.c
+++ b/src/backend/executor/execReplication.c
@@ -548,7 +548,6 @@ ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
 	{
 		skip_tuple = !ExecBRDeleteTriggers(estate, epqstate, resultRelInfo,
 										   tid, NULL, NULL);
-
 	}
 
 	if (!skip_tuple)
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 23030a32a59..3223d9b24e5 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -4119,7 +4119,6 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
 								 2,
 								 InvalidOid,
 								 (void *) aggstate, NULL);
-
 	}
 
 	/*
diff --git a/src/backend/jit/llvm/llvmjit_deform.c b/src/backend/jit/llvm/llvmjit_deform.c
index a3355860c3e..661f15272b7 100644
--- a/src/backend/jit/llvm/llvmjit_deform.c
+++ b/src/backend/jit/llvm/llvmjit_deform.c
@@ -192,7 +192,6 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc,
 		v_tupleheaderp =
 			l_load_struct_gep(b, v_heapslot, FIELDNO_HEAPTUPLETABLESLOT_TUPLE,
 							  "tupleheader");
-
 	}
 	else if (ops == &TTSOpsMinimalTuple)
 	{
@@ -357,7 +356,6 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc,
 
 			LLVMAddCase(v_switch, v_attno, attcheckattnoblocks[attnum]);
 		}
-
 	}
 	else
 	{
diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c
index 9c8f341d966..b6b6512ef1f 100644
--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -2173,7 +2173,6 @@ llvm_compile_expr(ExprState *state)
 										  "");
 
 							LLVMBuildBr(b, opblocks[opno + 1]);
-
 						}
 
 						LLVMPositionBuilderAtEnd(b, b_no_init);
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index cbd17b790d8..327a4b42af7 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -1775,7 +1775,6 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
 			hbaline->pam_use_hostname = true;
 		else
 			hbaline->pam_use_hostname = false;
-
 	}
 	else if (strcmp(name, "ldapurl") == 0)
 	{
diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c
index 3b8d2fe5601..34cc53af53e 100644
--- a/src/backend/optimizer/geqo/geqo_cx.c
+++ b/src/backend/optimizer/geqo/geqo_cx.c
@@ -115,7 +115,6 @@ cx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring,
 		for (i = 0; i < num_gene; i++)
 			if (tour1[i] != offspring[i])
 				num_diffs++;
-
 	}
 
 	return num_diffs;
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index d98c0a59e71..cc0661365f6 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -222,7 +222,6 @@ gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene, int num_gene)
 
 		/* mark this node as incorporated */
 		edge_table[(int) new_gene[i - 1]].unused_edges = -1;
-
 	}							/* for (i=1; i<num_gene; i++) */
 
 	return edge_failures;
@@ -336,7 +335,6 @@ gimme_gene(PlannerInfo *root, Edge edge, Edge *edge_table)
 			elog(ERROR, "minimum_count not set");
 		else if (edge_table[(int) friend].unused_edges == minimum_edges)
 			minimum_count++;
-
 	}							/* for (i=0; i<edge.unused_edges; i++) */
 
 
diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c
index ddbc78172c0..e44fd0bae5a 100644
--- a/src/backend/optimizer/geqo/geqo_pmx.c
+++ b/src/backend/optimizer/geqo/geqo_pmx.c
@@ -131,7 +131,6 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 				j++;
 			}
-
 		}
 
 		if (!(found))
@@ -140,7 +139,6 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 			indx[mx_fail] = k;
 			mx_fail++;
 		}
-
 	}							/* ... for */
 
 
@@ -172,9 +170,7 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 				j++;
 			}
-
 		}						/* ... for	 */
-
 	}							/* ... if	 */
 
 
@@ -206,12 +202,10 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 						j++;
 					}
-
 				}				/* ... if	 */
 
 				i++;
 			}					/* end while */
-
 		}
 	}							/* ... for	 */
 
diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c
index 0346554bc09..914296b53d2 100644
--- a/src/backend/optimizer/geqo/geqo_px.c
+++ b/src/backend/optimizer/geqo/geqo_px.c
@@ -96,13 +96,11 @@ px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 			{					/* next city in tour2 has been used */
 				tour2_index++;
 			}
-
 		}
 		else
 		{						/* next position in offspring is filled */
 			offspring_index++;
 		}
-
 	}
 }
 
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index b090b087e95..9a4accb4d9d 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6848,7 +6848,6 @@ create_partial_grouping_paths(PlannerInfo *root,
 											   dNumPartialGroups));
 			}
 		}
-
 	}
 
 	if (can_sort && cheapest_partial_path != NULL)
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 3535e9e47d2..3fceda8cff9 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -5851,7 +5851,6 @@ bgworker_should_start_now(BgWorkerStartTime start_time)
 			if (start_time == BgWorkerStart_PostmasterStart)
 				return true;
 			/* fall through */
-
 	}
 
 	return false;
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 9181d3e8636..4171371296f 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -600,7 +600,6 @@ slot_fill_defaults(LogicalRepRelMapEntry *rel, EState *estate,
 			defmap[num_defaults] = attnum;
 			num_defaults++;
 		}
-
 	}
 
 	for (i = 0; i < num_defaults; i++)
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 75400a53f2f..be402613936 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1000,7 +1000,6 @@ parseCreateReplSlotOptions(CreateReplicationSlotCmd *cmd,
 						(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 						 errmsg("unrecognized value for CREATE_REPLICATION_SLOT option \"%s\": \"%s\"",
 								defel->defname, action)));
-
 		}
 		else if (strcmp(defel->defname, "reserve_wal") == 0)
 		{
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index c12028ca0fe..e02ea3a977c 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2676,7 +2676,6 @@ CheckForBufferLeaks(void)
 			PrintBufferLeakWarning(res->buffer);
 			RefCountErrors++;
 		}
-
 	}
 
 	Assert(RefCountErrors == 0);
@@ -3652,7 +3651,6 @@ FlushRelationsAllBuffers(SMgrRelation *smgrs, int nrels)
 					break;
 				}
 			}
-
 		}
 		else
 		{
diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c
index 3b98e68d50f..990e081aaec 100644
--- a/src/backend/storage/buffer/freelist.c
+++ b/src/backend/storage/buffer/freelist.c
@@ -308,7 +308,6 @@ StrategyGetBuffer(BufferAccessStrategy strategy, uint32 *buf_state)
 				return buf;
 			}
 			UnlockBufHdr(buf, local_buf_state);
-
 		}
 	}
 
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index e184a3552c8..beef69eab22 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1848,7 +1848,6 @@ ComputeXidHorizons(ComputeXidHorizonsResult *h)
 			/* Catalog tables need to consider all backends in this db */
 			h->catalog_oldest_nonremovable =
 				TransactionIdOlder(h->catalog_oldest_nonremovable, xmin);
-
 		}
 	}
 
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c
index 366d57ea7ac..cc15396789b 100644
--- a/src/backend/storage/page/bufpage.c
+++ b/src/backend/storage/page/bufpage.c
@@ -563,7 +563,6 @@ compactify_tuples(itemIdCompact itemidbase, int nitems, Page page, bool presorte
 
 			/* update the line pointer to reference the new offset */
 			lp->lp_off = upper;
-
 		}
 
 		/* move the remaining tuples. */
@@ -669,7 +668,6 @@ compactify_tuples(itemIdCompact itemidbase, int nitems, Page page, bool presorte
 
 			/* update the line pointer to reference the new offset */
 			lp->lp_off = upper;
-
 		}
 
 		/* Copy the remaining chunk */
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index f364a9b88a9..0e7b7b31384 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -3741,7 +3741,6 @@ GetCommandLogLevel(Node *parsetree)
 						lev = LOGSTMT_ALL;
 						break;
 				}
-
 			}
 			break;
 
diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c
index 6053a9e31f2..edeffacc2d7 100644
--- a/src/backend/tsearch/to_tsany.c
+++ b/src/backend/tsearch/to_tsany.c
@@ -569,7 +569,6 @@ pushval_morph(Datum opaque, TSQueryParserState state, char *strval, int lenval,
 		}
 
 		pfree(prs.words);
-
 	}
 	else
 		pushStop(state);
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index bf4247048dd..056a18e8f9f 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -584,7 +584,6 @@ hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int bu
 			else
 				addHLParsedLex(prs, query, lexs, NULL);
 		} while (norms);
-
 	} while (type > 0);
 
 	FunctionCall1(&(prsobj->prsend), PointerGetDatum(prsdata));
@@ -629,7 +628,6 @@ generateHeadline(HeadlineParsedText *prs)
 					memcpy(ptr, prs->fragdelim, prs->fragdelimlen);
 					ptr += prs->fragdelimlen;
 				}
-
 			}
 			if (wrd->replace)
 			{
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c
index 2043f2e74af..56c588bbabd 100644
--- a/src/backend/utils/adt/jsonb.c
+++ b/src/backend/utils/adt/jsonb.c
@@ -851,7 +851,6 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result,
 					sem.object_field_start = jsonb_in_object_field_start;
 
 					pg_parse_json_or_ereport(lex, &sem);
-
 				}
 				break;
 			case JSONBTYPE_JSONB:
diff --git a/src/backend/utils/adt/multirangetypes.c b/src/backend/utils/adt/multirangetypes.c
index efd8584a3d8..67d7d67fb83 100644
--- a/src/backend/utils/adt/multirangetypes.c
+++ b/src/backend/utils/adt/multirangetypes.c
@@ -1181,7 +1181,6 @@ multirange_minus_internal(Oid mltrngtypoid, TypeCacheEntry *rangetyp,
 				 */
 				range_count3++;
 				r2 = ++i2 >= range_count2 ? NULL : ranges2[i2];
-
 			}
 			else if (range_overlaps_internal(rangetyp, r1, r2))
 			{
@@ -1200,7 +1199,6 @@ multirange_minus_internal(Oid mltrngtypoid, TypeCacheEntry *rangetyp,
 					break;
 				else
 					r2 = ++i2 >= range_count2 ? NULL : ranges2[i2];
-
 			}
 			else
 			{
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index f1673cc1456..a6e043c32c5 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -868,7 +868,6 @@ translate(PG_FUNCTION_ARGS)
 				target += len;
 				retlen += len;
 			}
-
 		}
 		else
 		{
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 3296ad070ed..7e08d7fe6c2 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -9440,7 +9440,6 @@ get_rule_expr(Node *node, deparse_context *context,
 							get_rule_expr_paren((Node *) xexpr->args, context, false, node);
 							break;
 					}
-
 				}
 				if (xexpr->op == IS_XMLSERIALIZE)
 					appendStringInfo(buf, " AS %s",
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index fb4fb987e7f..71cbc1c3d80 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -3628,7 +3628,6 @@ estimate_num_groups_incremental(PlannerInfo *root, List *groupExprs,
 					 */
 					if (estinfo != NULL && varinfo2->isdefault)
 						estinfo->flags |= SELFLAG_USED_DEFAULT;
-
 				}
 
 				/* we're done with this relation */
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 70937eaa461..da73796eac8 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -4898,7 +4898,6 @@ timestamp_part_common(PG_FUNCTION_ARGS, bool retnumeric)
 								lowunits, format_type_be(TIMESTAMPOID))));
 				intresult = 0;
 		}
-
 	}
 	else
 	{
@@ -5123,7 +5122,6 @@ timestamptz_part_common(PG_FUNCTION_ARGS, bool retnumeric)
 								lowunits, format_type_be(TIMESTAMPTZOID))));
 				intresult = 0;
 		}
-
 	}
 	else if (type == RESERV)
 	{
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index 8ba9ef22f56..addc3491518 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -2196,7 +2196,6 @@ insertStatEntry(MemoryContext persistentContext, TSVectorStat *stat, TSVector tx
 			else
 				pnode->right = node;
 		}
-
 	}
 	else
 	{
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index 233bcb63180..6ae7c1f50b8 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1710,7 +1710,6 @@ SearchCatCacheList(CatCache *cache,
 		 * we'd better do so before we start marking the members as belonging
 		 * to the list.
 		 */
-
 	}
 	PG_CATCH();
 	{
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 72778b896a2..55ee5423afb 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -2683,7 +2683,6 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
 						appendStringInfo(buf, "%*s", padding, psdisp);
 					else
 						appendBinaryStringInfo(buf, psdisp, displen);
-
 				}
 				else if (padding != 0)
 					appendStringInfoSpaces(buf,
@@ -2722,7 +2721,6 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
 							appendStringInfo(buf, "(%s)",
 											 MyProcPort->remote_port);
 					}
-
 				}
 				else if (padding != 0)
 					appendStringInfoSpaces(buf,
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 571fb955327..1174e1a31c9 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -3186,7 +3186,6 @@ mergeonerun(Tuplesortstate *state)
 		{
 			stup.srctape = srcTapeIndex;
 			tuplesort_heap_replace_top(state, &stup);
-
 		}
 		else
 		{
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 6ef3d614211..79a723885ed 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1373,7 +1373,6 @@ dumpDatabases(PGconn *conn)
 				pg_fatal("could not re-open the output file \"%s\": %m",
 						 filename);
 		}
-
 	}
 
 	PQclear(res);
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c
index dfa836d1561..7e7346c79a1 100644
--- a/src/bin/pg_rewind/parsexlog.c
+++ b/src/bin/pg_rewind/parsexlog.c
@@ -98,7 +98,6 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex,
 		}
 
 		extractPageInfo(xlogreader);
-
 	} while (xlogreader->EndRecPtr < endpoint);
 
 	/*
diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c
index 6671a841502..bd18b4491d5 100644
--- a/src/bin/pg_verifybackup/pg_verifybackup.c
+++ b/src/bin/pg_verifybackup/pg_verifybackup.c
@@ -740,8 +740,6 @@ verify_file_checksum(verifier_context *context, manifest_file *m,
 			close(fd);
 			return;
 		}
-
-
 	}
 	if (rc < 0)
 		report_backup_error(context, "could not read file \"%s\": %m",
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index d04ba2b0290..b0aa0cf2466 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2622,7 +2622,6 @@ describeOneTableDetails(const char *schemaname,
 									  PQgetvalue(result, i, 4));
 
 				printTableAddFooter(&cont, buf.data);
-
 			}
 			PQclear(result);
 		}
@@ -3172,7 +3171,6 @@ describeOneTableDetails(const char *schemaname,
 							case 4:
 								printfPQExpBuffer(&buf, _("Triggers firing on replica only:"));
 								break;
-
 						}
 						printTableAddFooter(&cont, buf.data);
 						have_heading = true;
diff --git a/src/bin/psql/prompt.c b/src/bin/psql/prompt.c
index 10ab390531b..509e6422b7e 100644
--- a/src/bin/psql/prompt.c
+++ b/src/bin/psql/prompt.c
@@ -316,7 +316,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
 					buf[0] = *p;
 					buf[1] = '\0';
 					break;
-
 			}
 			esc = false;
 		}
diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c
index 6666077a934..98e4ef09426 100644
--- a/src/common/jsonapi.c
+++ b/src/common/jsonapi.c
@@ -658,7 +658,6 @@ json_lex(JsonLexContext *lex)
 						lex->token_type = JSON_TOKEN_FALSE;
 					else
 						return JSON_INVALID_TOKEN;
-
 				}
 		}						/* end of switch */
 	}
@@ -856,7 +855,6 @@ json_lex_string(JsonLexContext *lex)
 				lex->token_terminator = s + pg_encoding_mblen_bounded(lex->input_encoding, s);
 				return JSON_ESCAPING_INVALID;
 			}
-
 		}
 		else if (lex->strval != NULL)
 		{
@@ -865,7 +863,6 @@ json_lex_string(JsonLexContext *lex)
 
 			appendStringInfoChar(lex->strval, *s);
 		}
-
 	}
 
 	if (hi_surrogate != -1)
diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c
index dcdb2e0d0cb..fe676a971b9 100644
--- a/src/fe_utils/print.c
+++ b/src/fe_utils/print.c
@@ -1173,7 +1173,6 @@ print_aligned_text(const printTableContent *cont, FILE *fout, bool is_pager)
 			if (opt_border == 2)
 				fputs(dformat->rightvrule, fout);
 			fputc('\n', fout);
-
 		} while (more_lines);
 	}
 
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index a2166b1e12f..8dfcabe3b50 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -315,7 +315,6 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
 			ecpg_free(dbname);
 			dbname = ecpg_strdup(envname, lineno);
 		}
-
 	}
 
 	if (dbname == NULL && connection_name == NULL)
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index 6bc91ef7eb6..a1bba42bb8f 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -564,7 +564,6 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
 						}
 
 						pval += size;
-
 					}
 					break;
 
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 930b6adbe4f..6a7ef0bbf67 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1392,7 +1392,6 @@ ecpg_build_params(struct statement *stmt)
 				if (sqlda->sqln == desc_counter)
 					desc_counter = 0;
 			}
-
 		}
 		else
 		{
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index e8a8a0f0ed3..e0fae3d5f1d 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -1740,7 +1740,6 @@ ParseDateTime(char *timestr, char *lowstr,
 		{
 			(*endstr)++;
 			continue;
-
 		}
 		/* otherwise, something is not right... */
 		else
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index a7e530cb5d2..73bde94aaf0 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -947,7 +947,6 @@ interval2tm(interval span, struct tm *tm, fsec_t *fsec)
 	{
 		tm->tm_year = span.month / MONTHS_PER_YEAR;
 		tm->tm_mon = span.month % MONTHS_PER_YEAR;
-
 	}
 	else
 	{
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 24a598b6e41..42d8d4616e7 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1432,7 +1432,6 @@ initialize_SSL(PGconn *conn)
 			}
 
 			SSLerrfree(err);
-
 		}
 	}
 
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 68c9bd1970e..0dd6d8ab2c2 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -1243,7 +1243,6 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
 		for (i = 0; i < trigdata->tg_trigger->tgnargs; i++)
 			Tcl_ListObjAppendElement(NULL, tcl_cmd,
 									 Tcl_NewStringObj(utf_e2u(trigdata->tg_trigger->tgargs[i]), -1));
-
 	}
 	PG_CATCH();
 	{
diff --git a/src/port/chklocale.c b/src/port/chklocale.c
index 3e777253524..c85d8da3c8b 100644
--- a/src/port/chklocale.c
+++ b/src/port/chklocale.c
@@ -278,7 +278,6 @@ win32_langinfo(const char *ctype)
 					strcpy(r, codepage);
 			}
 		}
-
 	}
 #endif
 
-- 
2.17.1

  [text/x-diff] 0018-Double-spaces.patch (6.6K, ../../20220411020336.GB26620@telsasoft.com/19-0018-Double-spaces.patch)
  download | inline diff:
From 5a17c2290039e99d4ec74846fda3ca0f5adf61ba Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 8 Mar 2022 09:19:01 -0600
Subject: [PATCH 18/19] Double spaces

I noticed one which was introduced at 9e9858389, and then grepped for the
others like:

git grep '^   * \* *[^        ].*[[:alnum:]]  '
---
 src/backend/optimizer/path/costsize.c           | 2 +-
 src/backend/replication/logical/reorderbuffer.c | 2 +-
 src/backend/replication/slot.c                  | 2 +-
 src/backend/tsearch/ts_parse.c                  | 2 +-
 src/backend/utils/adt/geo_ops.c                 | 2 +-
 src/backend/utils/adt/pg_locale.c               | 2 +-
 src/backend/utils/adt/tsquery.c                 | 2 +-
 src/backend/utils/fmgr/funcapi.c                | 2 +-
 src/include/utils/sortsupport.h                 | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 8166224dcc8..ac73ef9390b 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -6471,7 +6471,7 @@ compute_bitmap_pages(PlannerInfo *root, RelOptInfo *baserel, Path *bitmapqual,
 		exact_pages = heap_pages - lossy_pages;
 
 		/*
-		 * If there are lossy pages then recompute the  number of tuples
+		 * If there are lossy pages then recompute the number of tuples
 		 * processed by the bitmap heap node.  We assume here that the chance
 		 * of a given tuple coming from an exact page is the same as the
 		 * chance that a given page is exact.  This might not be true, but
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 5adc016d449..6887dc23f61 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -1876,7 +1876,7 @@ ReorderBufferStreamCommit(ReorderBuffer *rb, ReorderBufferTXN *txn)
  * xid 502 which is not visible to our snapshot.  And when we will try to
  * decode with that catalog tuple, it can lead to a wrong result or a crash.
  * So, it is necessary to detect concurrent aborts to allow streaming of
- * in-progress transactions or decoding of prepared  transactions.
+ * in-progress transactions or decoding of prepared transactions.
  *
  * For detecting the concurrent abort we set CheckXidAlive to the current
  * (sub)transaction's xid for which this change belongs to.  And, during
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index c35ea7c35bf..5c778f5333b 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -247,7 +247,7 @@ ReplicationSlotValidateName(const char *name, int elevel)
  *     to be enabled only at the slot creation time. If we allow this option
  *     to be changed during decoding then it is quite possible that we skip
  *     prepare first time because this option was not enabled. Now next time
- *     during getting changes, if the two_phase  option is enabled it can skip
+ *     during getting changes, if the two_phase option is enabled it can skip
  *     prepare because by that time start decoding point has been moved. So the
  *     user will only get commit prepared.
  */
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index 056a18e8f9f..27b2cca2dfb 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -248,7 +248,7 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem)
 		dict = lookup_ts_dictionary_cache(ld->curDictId);
 
 		/*
-		 * Dictionary ld->curDictId asks  us about following words
+		 * Dictionary ld->curDictId asks us about following words
 		 */
 
 		while (ld->curSub)
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 609aab2e651..b79705f8b3f 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -3878,7 +3878,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
 		Point		p;
 
 		/*
-		 * if X-intersection wasn't found  then check central point of tested
+		 * if X-intersection wasn't found, then check central point of tested
 		 * segment. In opposite case we already check all subsegments
 		 */
 		p.x = float8_div(float8_pl(t.p[0].x, t.p[1].x), 2.0);
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 12603b727cd..2c47dea3429 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -991,7 +991,7 @@ search_locale_enum(LPWSTR pStr, DWORD dwFlags, LPARAM lparam)
 						test_locale, LOCALE_NAME_MAX_LENGTH))
 	{
 		/*
-		 * If the enumerated locale does not have a hyphen ("en") OR  the
+		 * If the enumerated locale does not have a hyphen ("en") OR the
 		 * lc_message input does not have an underscore ("English"), we only
 		 * need to compare the <Language> tags.
 		 */
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c
index f0a95297b3e..f54f2988149 100644
--- a/src/backend/utils/adt/tsquery.c
+++ b/src/backend/utils/adt/tsquery.c
@@ -261,7 +261,7 @@ parse_or_operator(TSQueryParserState pstate)
 		/*
 		 * Suppose, we found an operand, but could be a not correct operand.
 		 * So we still treat OR literal as operation with possibly incorrect
-		 * operand and  will not search it as lexeme
+		 * operand and will not search it as lexeme
 		 */
 		if (!t_isspace(ptr))
 			break;
diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c
index d269662ad8e..9197b0f1e26 100644
--- a/src/backend/utils/fmgr/funcapi.c
+++ b/src/backend/utils/fmgr/funcapi.c
@@ -69,7 +69,7 @@ static TypeFuncClass get_type_func_class(Oid typid, Oid *base_typeid);
  * descriptor coming from expectedDesc, which is the tuple descriptor
  * expected by the caller.  SRF_SINGLE_BLESS can be set to complete the
  * information associated to the tuple descriptor, which is necessary
- * in some cases  where the tuple descriptor comes from a transient
+ * in some cases where the tuple descriptor comes from a transient
  * RECORD datatype.
  */
 void
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h
index 60e5f9940d4..4f7c73f0aac 100644
--- a/src/include/utils/sortsupport.h
+++ b/src/include/utils/sortsupport.h
@@ -24,7 +24,7 @@
  * function will have a shim set up by sort support automatically.  However,
  * opclasses that support the optional additional abbreviated key capability
  * must always provide an authoritative comparator used to tie-break
- * inconclusive abbreviated comparisons and also used  when aborting
+ * inconclusive abbreviated comparisons and also used when aborting
  * abbreviation.  Furthermore, a converter and abort/costing function must be
  * provided.
  *
-- 
2.17.1

  [text/x-diff] 0019-comment-spaces.patch (1.9K, ../../20220411020336.GB26620@telsasoft.com/20-0019-comment-spaces.patch)
  download | inline diff:
From 6dc2b500028ef0a24747514876bbbb1af141af8b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 12 Mar 2022 14:55:18 -0600
Subject: [PATCH 19/19] comment spaces

---
 src/backend/storage/file/fd.c     | 2 +-
 src/include/replication/message.h | 2 +-
 src/include/tsearch/ts_type.h     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 14b77f28617..24704b6a023 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -912,7 +912,7 @@ InitFileAccess(void)
 void
 InitTemporaryFileAccess(void)
 {
-	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run*/
+	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run */
 	Assert(!temporary_files_allowed);	/* call me only once */
 
 	/*
diff --git a/src/include/replication/message.h b/src/include/replication/message.h
index 7d7785292f1..b9686c28550 100644
--- a/src/include/replication/message.h
+++ b/src/include/replication/message.h
@@ -32,7 +32,7 @@ typedef struct xl_logical_message
 extern XLogRecPtr LogLogicalMessage(const char *prefix, const char *message,
 									size_t size, bool transactional);
 
-/* RMGR API*/
+/* RMGR API */
 #define XLOG_LOGICAL_MESSAGE	0x00
 void		logicalmsg_redo(XLogReaderState *record);
 void		logicalmsg_desc(StringInfo buf, XLogReaderState *record);
diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h
index a2008f5504b..689b2d1cfb6 100644
--- a/src/include/tsearch/ts_type.h
+++ b/src/include/tsearch/ts_type.h
@@ -171,7 +171,7 @@ typedef struct
 
 extern PGDLLIMPORT const int tsearch_op_priority[OP_COUNT];
 
-/* get operation priority  by its code*/
+/* get operation priority by its code */
 #define OP_PRIORITY(x)	( tsearch_op_priority[(x) - 1] )
 /* get QueryOperator priority */
 #define QO_PRIORITY(x)	OP_PRIORITY(((QueryOperator *) (x))->oper)
-- 
2.17.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-11 04:39  David Rowley <dgrowleyml@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 2 replies; 54+ messages in thread

From: David Rowley @ 2022-04-11 04:39 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; +Cc: pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

( Added Joe and Robert for 0011 )

On Mon, 11 Apr 2022 at 14:03, Justin Pryzby <pryzby@telsasoft.com> wrote:
> In docs and comments.  Mostly for v15.

0001:

Should this not use <productname>PostgreSQL</productname>? (new to master)

0002:

The patch looks good. (new to v12)

0003:

The patch looks good. (new to master)

0004:

The patch looks good. (new to master)

0005:

I'm not entirely certain this is an improvement.  Your commit message
I'd say is not true going by git grep "compression algorithm". There
are 3 matches in the docs and take [1], for example. I'd say in that
one it's better to use "algorithm".  In that case, "method" could be
talking about client or server.

That makes me wonder if the change you're proposing is an improvement or not.

0006:

The patch looks good. (new to master)

0007:

-        When the <option>--max-tries</option> option is used, the
transaction with
-        serialization or deadlock error cannot be retried if the total time of
+        When the <option>--max-tries</option> option is used, a
transaction with
+        serialization or deadlock error will not be retried if the
total time of

Shouldn't this be slightly clearer and say "a transaction which fails
due to a serialization anomaly or a deadlock"?

-               database server / the syntax error in the meta command / thread
+               database server / syntax error in the meta command / thread

Should we not separate these items out with commas?

-   the client is aborted. Otherwise, if an SQL fails with serialization or
+   the client is aborted. Otherwise, if an SQL command fails with
serialization or
    deadlock errors, the client is not aborted. In such cases, the current

I'd say "if an SQL command fails due to a serialization anomaly or due
to deadlocking".

(new to master)

0008:

The patch looks good. (new to master)

0009:

The patch looks good. (new to master)

0010:

I don't understand this change.

0011:

I can't quite parse the original. I might not have enough context
here.  Robert, Joe? (new to master)

0012:

This seems to contain some documentation fixes too. The patch claims
it's just for comments.

- * pages that are outwith that range.
+ * pages that are outside that range.

I personally don't see the issue here, but I'm Scottish. I think the
best transaction is just "outside of" rather than replacing with just
"outside".

All the other changes look fine.

0013:

I think we should fix all these, regardless of how old the mistake is.

0014:

- * shouldn't PANIC just because we can't guarantee the the backup has been
+ * shouldn't PANIC just because we can't guarantee the backup has been

"that the"

0015:

Patch looks fine.

0016:
0017:

I'm not really sure if we should fix these or not.  From having a
quick look at some of them it seems we'd be adding churn to some
pretty old code. Happy to hear what others think.

0018:

The patch looks good.

0019:

-1. pgindent will fix these.

I will start pushing the less controversial of these, after a bit of squashing.

David

[1] https://www.postgresql.org/docs/devel/app-pgbasebackup.html





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-11 08:55  David Rowley <dgrowleyml@gmail.com>
  parent: David Rowley <dgrowleyml@gmail.com>
  1 sibling, 2 replies; 54+ messages in thread

From: David Rowley @ 2022-04-11 08:55 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

On Mon, 11 Apr 2022 at 16:39, David Rowley <dgrowleyml@gmail.com> wrote:
> I will start pushing the less controversial of these, after a bit of squashing.

I just committed 3 separate commits for the following:

Committed: 0001 + 0003 + 0004 + 0006 + 0007 (modified) + 0008 + 0009 +
0012 (doc parts)
Committed: 0012 (remainder) + 0013 + 0014 + 0018
Committed: 0015

I skipped:
0002 (skipped as we should backpatch)
0005 (unsure if the proposed patch is better)
0010 (I can't follow this change)
0011 (Could do with input from Robert and Joe)

and also skipped:
0016 (unsure if we should change these of pgindent is not touching it)
0017 (unsure if we should change these of pgindent is not touching it)
0019 (pgindent will get these when the time comes)

I'll wait for feedback on the ones I didn't use.

Are you able to rebase the remainder? Probably with the exception of 0019.

Thanks for finding all these!

David





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-11 10:10  Justin Pryzby <pryzby@telsasoft.com>
  parent: David Rowley <dgrowleyml@gmail.com>
  1 sibling, 2 replies; 54+ messages in thread

From: Justin Pryzby @ 2022-04-11 10:10 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <akapila@postgresql.org>; Masahiko Sawada <sawada.mshk@gmail.com>

On Mon, Apr 11, 2022 at 04:39:30PM +1200, David Rowley wrote:
> I'm not entirely certain this is an improvement.  Your commit message
> I'd say is not true going by git grep "compression algorithm". There
> are 3 matches in the docs and take [1], for example. I'd say in that
> one it's better to use "algorithm".  In that case, "method" could be
> talking about client or server.

I am not wedded to this change; but, for context, I wrote this patch before
basebackup supported multiple compression ...  "things".  I didn't touch
basebackup here, since Robert defended that choice of words in another thread
(starting at 20220320194050.GX28503@telsasoft.com).

This change is for pg_column_compression(), and the only other use of
"compression algorithm" in the docs is in pgcrypto (which is in contrib).  That
the docs consistently use "method" suggests continuing to use that rather than
something else.  It could be described in some central place (like if we
support common syntax between interfaces which expose compression).

> 0010:
> I don't understand this change.

The commit message mentions 959f6d6a1, which makes newbindir optional.  But the
documentation wasn't updated, and seems to indicate that it's still required.
https://www.postgresql.org/docs/devel/pgupgrade.html

> 0011:
> I can't quite parse the original. I might not have enough context
> here.  Robert, Joe? (new to master)

See the link in the commit message where someone else reported the same
problem.

> 0019:
> -1. pgindent will fix these.

But two of those are from 2016.

Thanks for amending and pushing those.  There's some more less obvious ones
attached.

Amit or Masahiko may want to comment on 0012 (doc review: Add ALTER
SUBSCRIPTION ... SKIP).

Attachments:

  [text/x-diff] 0001-doc-Remove-synchronized-from-no-sync.patch (1.1K, ../../20220411101005.GD26620@telsasoft.com/2-0001-doc-Remove-synchronized-from-no-sync.patch)
  download | inline diff:
From 98778834b8c762a6cd76d8680191a7c866397d8b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 16 Feb 2022 21:07:53 -0600
Subject: [PATCH 01/13] doc: Remove 'synchronized' from --no-sync

Since it would be more accurate to say "unsynchronized".

The corresponding change was made for pgupgrade.sgml in commit 410aa248
---
 doc/src/sgml/ref/pg_rewind.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index e808239aa5b..3231f67845a 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -210,7 +210,7 @@ PostgreSQL documentation
         to be written safely to disk.  This option causes
         <command>pg_rewind</command> to return without waiting, which is
         faster, but means that a subsequent operating system crash can leave
-        the synchronized data directory corrupt.  Generally, this option is
+        the data directory corrupt.  Generally, this option is
         useful for testing but should not be used on a production
         installation.
        </para>
-- 
2.17.1

  [text/x-diff] 0002-doc-pg_column_compression-we-say-method-not-algorith.patch (968B, ../../20220411101005.GD26620@telsasoft.com/3-0002-doc-pg_column_compression-we-say-method-not-algorith.patch)
  download | inline diff:
From d4bde4e9acf6375d8894af0a6d5a1557a29174b3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 19 Feb 2022 11:47:35 -0600
Subject: [PATCH 02/13] doc: pg_column_compression(): we say method not
 algorithm everywhere else

could backpatch to v14
---
 doc/src/sgml/func.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2ecf0482d84..a34eb8b43e0 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -29285,7 +29285,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset((pg_backup_stop()).lsn);
         <returnvalue>text</returnvalue>
        </para>
        <para>
-        Shows the compression algorithm that was used to compress
+        Shows the compression method that was used to compress
         an individual variable-length value. Returns <literal>NULL</literal>
         if the value is not compressed.
        </para></entry>
-- 
2.17.1

  [text/x-diff] 0003-doc-review-update-synopsis-pg_upgrade-optional-newbi.patch (1.1K, ../../20220411101005.GD26620@telsasoft.com/4-0003-doc-review-update-synopsis-pg_upgrade-optional-newbi.patch)
  download | inline diff:
From fb28ed4be7f82337a8e4aa92140bdafc78ee2278 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 20 Dec 2021 19:13:29 -0600
Subject: [PATCH 03/13] doc review: update synopsis: pg_upgrade optional
 newbindir

See also: 959f6d6a1821b7d9068244f500dd80953e768d16
---
 doc/src/sgml/ref/pgupgrade.sgml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index f024c3ef259..8cda8d16d17 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -24,8 +24,7 @@ PostgreSQL documentation
    <command>pg_upgrade</command>
    <arg choice="plain"><option>-b</option></arg>
    <arg choice="plain"><replaceable>oldbindir</replaceable></arg>
-   <arg choice="plain"><option>-B</option></arg>
-   <arg choice="plain"><replaceable>newbindir</replaceable></arg>
+   <arg choice="opt"><option>-B</option> <replaceable>newbindir</replaceable></arg>
    <arg choice="plain"><option>-d</option></arg>
    <arg choice="plain"><replaceable>oldconfigdir</replaceable></arg>
    <arg choice="plain"><option>-D</option></arg>
-- 
2.17.1

  [text/x-diff] 0004-doc-review-basebackup_to_shell.required_role.patch (1.1K, ../../20220411101005.GD26620@telsasoft.com/5-0004-doc-review-basebackup_to_shell.required_role.patch)
  download | inline diff:
From cc2480bbdf667369d920459bea0d497e7b7255dc Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 7 Apr 2022 09:04:23 -0500
Subject: [PATCH 04/13] doc review: basebackup_to_shell.required_role

c6306db24bd913375f99494e38ab315befe44e11

See also:
https://www.postgresql.org/message-id/CA%2BTgmoaBQ5idAh7OsQGAbLY166SVkj7KkKROkTyN5sOF6QDuww%40mail.gmail.com
---
 doc/src/sgml/basebackup-to-shell.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/basebackup-to-shell.sgml b/doc/src/sgml/basebackup-to-shell.sgml
index 9f44071d502..15231ef3939 100644
--- a/doc/src/sgml/basebackup-to-shell.sgml
+++ b/doc/src/sgml/basebackup-to-shell.sgml
@@ -65,8 +65,8 @@
     </term>
     <listitem>
      <para>
-      A role which replication whose privileges users are required to possess
-      in order to make use of the <literal>shell</literal> backup target.
+      The role required in order to
+      make use of the <literal>shell</literal> backup target.
       If this is not set, any replication user may make use of the
       <literal>shell</literal> backup target.
      </para>
-- 
2.17.1

  [text/x-diff] 0005-Extraneous-blank-lines.patch (18.2K, ../../20220411101005.GD26620@telsasoft.com/6-0005-Extraneous-blank-lines.patch)
  download | inline diff:
From 4bcdd17e0bfaa8cd632ed647007e1a681095eb9f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 2 Apr 2022 11:58:06 -0500
Subject: [PATCH 05/13] Extraneous blank lines

I noticed some left behind by d61a361d1, and searched for the others like:

git grep -nB1 '^}' '*.c' |less
... \.c-[0-9]*-$

I've omitted some that involved structures or conditional compilation.
---
 contrib/btree_gist/btree_bit.c                                | 1 -
 contrib/btree_gist/btree_cash.c                               | 1 -
 contrib/btree_gist/btree_float4.c                             | 1 -
 contrib/btree_gist/btree_float8.c                             | 1 -
 contrib/btree_gist/btree_inet.c                               | 1 -
 contrib/btree_gist/btree_interval.c                           | 2 --
 contrib/btree_gist/btree_macaddr.c                            | 1 -
 contrib/btree_gist/btree_macaddr8.c                           | 1 -
 contrib/btree_gist/btree_ts.c                                 | 1 -
 contrib/dblink/dblink.c                                       | 2 --
 contrib/pg_stat_statements/pg_stat_statements.c               | 1 -
 contrib/postgres_fdw/connection.c                             | 1 -
 src/backend/access/nbtree/nbtutils.c                          | 1 -
 src/backend/access/rmgrdesc/gistdesc.c                        | 1 -
 src/backend/access/spgist/spgutils.c                          | 1 -
 src/backend/access/table/tableam.c                            | 1 -
 src/backend/commands/tablecmds.c                              | 1 -
 src/backend/executor/nodeMergejoin.c                          | 1 -
 src/backend/optimizer/geqo/geqo_erx.c                         | 1 -
 src/backend/optimizer/geqo/geqo_ox1.c                         | 1 -
 src/backend/optimizer/geqo/geqo_ox2.c                         | 1 -
 src/backend/optimizer/geqo/geqo_px.c                          | 1 -
 src/backend/replication/logical/snapbuild.c                   | 1 -
 src/backend/replication/pgoutput/pgoutput.c                   | 1 -
 src/backend/statistics/dependencies.c                         | 1 -
 src/backend/storage/sync/sync.c                               | 1 -
 src/backend/tcop/postgres.c                                   | 1 -
 src/backend/tsearch/to_tsany.c                                | 1 -
 src/backend/utils/adt/acl.c                                   | 1 -
 src/backend/utils/adt/json.c                                  | 1 -
 src/backend/utils/adt/jsonfuncs.c                             | 1 -
 src/backend/utils/cache/catcache.c                            | 1 -
 src/backend/utils/resowner/resowner.c                         | 1 -
 src/bin/initdb/initdb.c                                       | 2 --
 src/interfaces/ecpg/ecpglib/misc.c                            | 1 -
 src/interfaces/ecpg/pgtypeslib/numeric.c                      | 1 -
 src/interfaces/ecpg/pgtypeslib/timestamp.c                    | 4 +---
 src/interfaces/libpq/fe-connect.c                             | 1 -
 .../modules/ssl_passphrase_callback/ssl_passphrase_func.c     | 1 -
 39 files changed, 1 insertion(+), 44 deletions(-)

diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c
index 2225244ded5..5b246bcde4b 100644
--- a/contrib/btree_gist/btree_bit.c
+++ b/contrib/btree_gist/btree_bit.c
@@ -104,7 +104,6 @@ gbt_bit_l2n(GBT_VARKEY *leaf, FmgrInfo *flinfo)
 	pfree(o);
 
 	return out;
-
 }
 
 static const gbtree_vinfo tinfo =
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c
index dfa23224b6f..6ac97e2b12a 100644
--- a/contrib/btree_gist/btree_cash.c
+++ b/contrib/btree_gist/btree_cash.c
@@ -195,7 +195,6 @@ gbt_cash_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_float4.c b/contrib/btree_gist/btree_float4.c
index b5d9175e6d5..3cbd9a06dcc 100644
--- a/contrib/btree_gist/btree_float4.c
+++ b/contrib/btree_gist/btree_float4.c
@@ -190,7 +190,6 @@ gbt_float4_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_float8.c b/contrib/btree_gist/btree_float8.c
index 8fe1fedeef8..b95a08e228b 100644
--- a/contrib/btree_gist/btree_float8.c
+++ b/contrib/btree_gist/btree_float8.c
@@ -197,7 +197,6 @@ gbt_float8_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c
index e4b3a946b27..2fb952dca83 100644
--- a/contrib/btree_gist/btree_inet.c
+++ b/contrib/btree_gist/btree_inet.c
@@ -165,7 +165,6 @@ gbt_inet_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c
index a4b3b2b1e6f..c2bf82086df 100644
--- a/contrib/btree_gist/btree_interval.c
+++ b/contrib/btree_gist/btree_interval.c
@@ -173,7 +173,6 @@ gbt_intv_compress(PG_FUNCTION_ARGS)
 	}
 
 	PG_RETURN_POINTER(retval);
-
 }
 
 Datum
@@ -276,7 +275,6 @@ gbt_intv_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, iorg[0], iorg[1], inew[0], inew[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c
index 7f0e9e9c912..17290529c02 100644
--- a/contrib/btree_gist/btree_macaddr.c
+++ b/contrib/btree_gist/btree_macaddr.c
@@ -174,7 +174,6 @@ gbt_macad_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, iorg[0], iorg[1], inew[0], inew[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_macaddr8.c b/contrib/btree_gist/btree_macaddr8.c
index ab4bca5d50d..796cc4efee3 100644
--- a/contrib/btree_gist/btree_macaddr8.c
+++ b/contrib/btree_gist/btree_macaddr8.c
@@ -174,7 +174,6 @@ gbt_macad8_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, iorg[0], iorg[1], inew[0], inew[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 Datum
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index 2671ba961cd..a51900941e5 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -377,7 +377,6 @@ gbt_ts_penalty(PG_FUNCTION_ARGS)
 	penalty_num(result, orgdbl[0], orgdbl[1], newdbl[0], newdbl[1]);
 
 	PG_RETURN_POINTER(result);
-
 }
 
 
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index a06d4bd12db..a561d1d6524 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -1004,7 +1004,6 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res)
 
 			/* clean up GUC settings, if we changed any */
 			restoreLocalGucs(nestlevel);
-
 		}
 	}
 	PG_FINALLY();
@@ -2635,7 +2634,6 @@ deleteConnection(const char *name)
 		ereport(ERROR,
 				(errcode(ERRCODE_UNDEFINED_OBJECT),
 				 errmsg("undefined connection name")));
-
 }
 
 static void
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 1ca67ef6234..df2ce63790b 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -1849,7 +1849,6 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
 
 	if (qbuffer)
 		free(qbuffer);
-
 }
 
 /* Number of output arguments (columns) for pg_stat_statements_info */
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 129ca792214..f9b8c01f3b9 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -1734,7 +1734,6 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS)
 		tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
 	}
 
-
 	PG_RETURN_VOID();
 }
 
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 96c72fc4324..5361b147e30 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -2123,7 +2123,6 @@ btoptions(Datum reloptions, bool validate)
 									  RELOPT_KIND_BTREE,
 									  sizeof(BTOptions),
 									  tab, lengthof(tab));
-
 }
 
 /*
diff --git a/src/backend/access/rmgrdesc/gistdesc.c b/src/backend/access/rmgrdesc/gistdesc.c
index 9cab4fa1580..d0c8e247c1d 100644
--- a/src/backend/access/rmgrdesc/gistdesc.c
+++ b/src/backend/access/rmgrdesc/gistdesc.c
@@ -38,7 +38,6 @@ out_gistxlogDelete(StringInfo buf, gistxlogDelete *xlrec)
 {
 	appendStringInfo(buf, "delete: latestRemovedXid %u, nitems: %u",
 					 xlrec->latestRemovedXid, xlrec->ntodelete);
-
 }
 
 static void
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 1ae7492216a..a171ca8a08a 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -747,7 +747,6 @@ spgoptions(Datum reloptions, bool validate)
 									  RELOPT_KIND_SPGIST,
 									  sizeof(SpGistOptions),
 									  tab, lengthof(tab));
-
 }
 
 /*
diff --git a/src/backend/access/table/tableam.c b/src/backend/access/table/tableam.c
index 4f20c6ac12a..b3d1a6c3f8f 100644
--- a/src/backend/access/table/tableam.c
+++ b/src/backend/access/table/tableam.c
@@ -381,7 +381,6 @@ simple_table_tuple_update(Relation rel, ItemPointer otid,
 			elog(ERROR, "unrecognized table_tuple_update status: %u", result);
 			break;
 	}
-
 }
 
 
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 90edd0bb97d..2840bc527bc 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -3773,7 +3773,6 @@ RenameConstraint(RenameStmt *stmt)
 									stmt->relation->inh),	/* recursive? */
 								   false,	/* recursing? */
 								   0 /* expected inhcount */ );
-
 }
 
 /*
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c
index edb8972c5bf..864e3baf86b 100644
--- a/src/backend/executor/nodeMergejoin.c
+++ b/src/backend/executor/nodeMergejoin.c
@@ -1674,5 +1674,4 @@ ExecReScanMergeJoin(MergeJoinState *node)
 		ExecReScan(node->js.ps.lefttree);
 	if (node->js.ps.righttree->chgParam == NULL)
 		ExecReScan(node->js.ps.righttree);
-
 }
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index 3b92f420e0a..d98c0a59e71 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -226,7 +226,6 @@ gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene, int num_gene)
 	}							/* for (i=1; i<num_gene; i++) */
 
 	return edge_failures;
-
 }
 
 /* remove_gene
diff --git a/src/backend/optimizer/geqo/geqo_ox1.c b/src/backend/optimizer/geqo/geqo_ox1.c
index 10d2d0a33ae..ede7abb4177 100644
--- a/src/backend/optimizer/geqo/geqo_ox1.c
+++ b/src/backend/optimizer/geqo/geqo_ox1.c
@@ -89,7 +89,6 @@ ox1(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 		}
 		p = (p + 1) % num_gene; /* increment tour2-index */
 	}
-
 }
 
 #endif							/* defined(OX1) */
diff --git a/src/backend/optimizer/geqo/geqo_ox2.c b/src/backend/optimizer/geqo/geqo_ox2.c
index 72b9b0fb871..080dbc076cc 100644
--- a/src/backend/optimizer/geqo/geqo_ox2.c
+++ b/src/backend/optimizer/geqo/geqo_ox2.c
@@ -106,7 +106,6 @@ ox2(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 			/* city isn't used yet, so inherit from tour2 */
 			offspring[k] = tour2[k];
 	}
-
 }
 
 #endif							/* defined(OX2) */
diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c
index ad5ad3f1e57..0346554bc09 100644
--- a/src/backend/optimizer/geqo/geqo_px.c
+++ b/src/backend/optimizer/geqo/geqo_px.c
@@ -104,7 +104,6 @@ px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 		}
 
 	}
-
 }
 
 #endif							/* defined(PX) */
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 83fca8a77d9..1119a12db9e 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1380,7 +1380,6 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
 	 * records so incremental cleanup can be performed.
 	 */
 	return true;
-
 }
 
 /* ---
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index fe5accca576..8b55ebdd4d2 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -1066,7 +1066,6 @@ pgoutput_column_list_init(PGOutputData *data, List *publications,
 
 		ReleaseSysCache(cftuple);
 	}	/* loop all subscribed publications */
-
 }
 
 /*
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 34326d55619..b6f31849616 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -199,7 +199,6 @@ DependencyGenerator_free(DependencyGenerator state)
 {
 	pfree(state->dependencies);
 	pfree(state);
-
 }
 
 /* generate next combination */
diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c
index c695d816fc6..e1fb6310038 100644
--- a/src/backend/storage/sync/sync.c
+++ b/src/backend/storage/sync/sync.c
@@ -162,7 +162,6 @@ InitSync(void)
 								 HASH_ELEM | HASH_BLOBS | HASH_CONTEXT);
 		pendingUnlinks = NIL;
 	}
-
 }
 
 /*
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 95dc2e2c835..304cce135aa 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -2636,7 +2636,6 @@ exec_describe_statement_message(const char *stmt_name)
 	}
 	else
 		pq_putemptymessage('n');	/* NoData */
-
 }
 
 /*
diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c
index 1b0a1e244b8..6053a9e31f2 100644
--- a/src/backend/tsearch/to_tsany.c
+++ b/src/backend/tsearch/to_tsany.c
@@ -720,5 +720,4 @@ websearch_to_tsquery(PG_FUNCTION_ARGS)
 	PG_RETURN_DATUM(DirectFunctionCall2(websearch_to_tsquery_byid,
 										ObjectIdGetDatum(cfgId),
 										PointerGetDatum(in)));
-
 }
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 8bdba1c42a5..772c04155c3 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -3094,7 +3094,6 @@ convert_database_priv_string(text *priv_type_text)
 	};
 
 	return convert_any_priv_string(priv_type_text, database_priv_map);
-
 }
 
 
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index 4cf01300d8b..18f19014d0a 100644
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -1501,7 +1501,6 @@ json_object(PG_FUNCTION_ARGS)
 	pfree(result.data);
 
 	PG_RETURN_TEXT_P(rval);
-
 }
 
 /*
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index a682d9c9734..d1356d64166 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -4168,7 +4168,6 @@ json_strip_nulls(PG_FUNCTION_ARGS)
 
 	PG_RETURN_TEXT_P(cstring_to_text_with_len(state->strval->data,
 											  state->strval->len));
-
 }
 
 /*
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index ec073e1ed06..233bcb63180 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1962,7 +1962,6 @@ CatCacheCopyKeys(TupleDesc tupdesc, int nkeys, int *attnos,
 							   att->attbyval,
 							   att->attlen);
 	}
-
 }
 
 /*
diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c
index 3236b1b9195..ceb4b0e3f75 100644
--- a/src/backend/utils/resowner/resowner.c
+++ b/src/backend/utils/resowner/resowner.c
@@ -896,7 +896,6 @@ CreateAuxProcessResourceOwner(void)
 	 * owner.  (This needs to run after, e.g., ShutdownXLOG.)
 	 */
 	on_shmem_exit(ReleaseAuxProcessResourcesCallback, 0);
-
 }
 
 /*
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index ab826da6505..1cb4a5b0d21 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2407,7 +2407,6 @@ setup_locale_encoding(void)
 	if (!check_locale_encoding(lc_ctype, encodingid) ||
 		!check_locale_encoding(lc_collate, encodingid))
 		exit(1);				/* check_locale_encoding printed the error */
-
 }
 
 
@@ -2486,7 +2485,6 @@ setup_text_search(void)
 
 	printf(_("The default text search configuration will be set to \"%s\".\n"),
 		   default_text_search_config);
-
 }
 
 
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index b8dbe5e7f3b..1eef1ec044c 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -191,7 +191,6 @@ ECPGtransactionStatus(const char *connection_name)
 	}
 
 	return PQtransactionStatus(con->connection);
-
 }
 
 bool
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
index dbe4eb21e27..34efc9045f3 100644
--- a/src/interfaces/ecpg/pgtypeslib/numeric.c
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -1308,7 +1308,6 @@ PGTYPESnumeric_cmp(numeric *var1, numeric *var2)
 
 	errno = PGTYPES_NUM_BAD_NUMERIC;
 	return INT_MAX;
-
 }
 
 int
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 3f82ee54a5f..9aff95cf5e3 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -863,8 +863,6 @@ PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout
 {
 	if (TIMESTAMP_NOT_FINITE(*tin))
 		*tout = *tin;
-
-
 	else
 	{
 		if (span->month != 0)
@@ -902,8 +900,8 @@ PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout
 		*tin += span->time;
 		*tout = *tin;
 	}
-	return 0;
 
+	return 0;
 }
 
 
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index cf554d389fa..4c12f1411f7 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -664,7 +664,6 @@ PQconnectdbParams(const char *const *keywords,
 		(void) connectDBComplete(conn);
 
 	return conn;
-
 }
 
 /*
diff --git a/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c b/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
index 7c469fd57e8..b5bb5580a0f 100644
--- a/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
+++ b/src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
@@ -89,5 +89,4 @@ rot13_passphrase(char *buf, int size, int rwflag, void *userdata)
 	}
 
 	return strlen(buf);
-
 }
-- 
2.17.1

  [text/x-diff] 0006-f-blanks-which-involve-tabs.patch (29.5K, ../../20220411101005.GD26620@telsasoft.com/7-0006-f-blanks-which-involve-tabs.patch)
  download | inline diff:
From 8a7a8c331a91d353779500994bc6d3eb2d43d494 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 2 Apr 2022 16:28:41 -0500
Subject: [PATCH 06/13] f!blanks which involve tabs

I excluded things involving conditional compilation and do{}while statements
---
 contrib/intarray/_int_bool.c               | 1 -
 contrib/ltree/ltxtquery_io.c               | 1 -
 contrib/spi/refint.c                       | 2 --
 src/backend/access/gin/ginbtree.c          | 1 -
 src/backend/access/heap/heapam.c           | 1 -
 src/backend/access/heap/vacuumlazy.c       | 1 -
 src/backend/access/nbtree/nbtutils.c       | 2 --
 src/backend/access/transam/xlogrecovery.c  | 1 -
 src/backend/catalog/objectaddress.c        | 2 --
 src/backend/catalog/pg_attrdef.c           | 1 -
 src/backend/commands/subscriptioncmds.c    | 1 -
 src/backend/commands/tablecmds.c           | 2 --
 src/backend/executor/execParallel.c        | 1 -
 src/backend/executor/execReplication.c     | 1 -
 src/backend/executor/nodeAgg.c             | 1 -
 src/backend/jit/llvm/llvmjit_deform.c      | 2 --
 src/backend/jit/llvm/llvmjit_expr.c        | 1 -
 src/backend/libpq/hba.c                    | 1 -
 src/backend/optimizer/geqo/geqo_cx.c       | 1 -
 src/backend/optimizer/geqo/geqo_erx.c      | 2 --
 src/backend/optimizer/geqo/geqo_pmx.c      | 6 ------
 src/backend/optimizer/geqo/geqo_px.c       | 2 --
 src/backend/optimizer/plan/planner.c       | 1 -
 src/backend/postmaster/postmaster.c        | 1 -
 src/backend/replication/logical/worker.c   | 1 -
 src/backend/replication/walsender.c        | 1 -
 src/backend/storage/buffer/bufmgr.c        | 2 --
 src/backend/storage/buffer/freelist.c      | 1 -
 src/backend/storage/ipc/procarray.c        | 1 -
 src/backend/storage/page/bufpage.c         | 2 --
 src/backend/tcop/utility.c                 | 1 -
 src/backend/tsearch/to_tsany.c             | 1 -
 src/backend/tsearch/ts_parse.c             | 2 --
 src/backend/utils/adt/jsonb.c              | 1 -
 src/backend/utils/adt/multirangetypes.c    | 2 --
 src/backend/utils/adt/oracle_compat.c      | 1 -
 src/backend/utils/adt/ruleutils.c          | 1 -
 src/backend/utils/adt/selfuncs.c           | 1 -
 src/backend/utils/adt/timestamp.c          | 2 --
 src/backend/utils/adt/tsvector_op.c        | 1 -
 src/backend/utils/cache/catcache.c         | 1 -
 src/backend/utils/error/elog.c             | 2 --
 src/backend/utils/sort/tuplesort.c         | 1 -
 src/bin/pg_dump/pg_dumpall.c               | 1 -
 src/bin/pg_rewind/parsexlog.c              | 1 -
 src/bin/pg_verifybackup/pg_verifybackup.c  | 2 --
 src/bin/psql/describe.c                    | 2 --
 src/bin/psql/prompt.c                      | 1 -
 src/common/jsonapi.c                       | 3 ---
 src/fe_utils/print.c                       | 1 -
 src/interfaces/ecpg/ecpglib/connect.c      | 1 -
 src/interfaces/ecpg/ecpglib/data.c         | 1 -
 src/interfaces/ecpg/ecpglib/execute.c      | 1 -
 src/interfaces/ecpg/pgtypeslib/dt_common.c | 1 -
 src/interfaces/ecpg/pgtypeslib/interval.c  | 1 -
 src/interfaces/libpq/fe-secure-openssl.c   | 1 -
 src/pl/tcl/pltcl.c                         | 1 -
 src/port/chklocale.c                       | 1 -
 58 files changed, 80 deletions(-)

diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index 4b6a31080e4..3ed88af76d7 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -210,7 +210,6 @@ makepol(WORKSTATE *state)
 						(errcode(ERRCODE_SYNTAX_ERROR),
 						 errmsg("syntax error")));
 				return ERR;
-
 		}
 	}
 
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index d967f92110f..3eca5cb8ff3 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -260,7 +260,6 @@ makepol(QPRS_STATE *state)
 						 errmsg("syntax error")));
 
 				return ERR;
-
 		}
 	}
 	while (lenstack)
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 6fbfef2b121..18062eb1cff 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -497,12 +497,10 @@ check_foreign_key(PG_FUNCTION_ARGS)
 								 nv, (is_char_type > 0) ? "'" : "", (k < nkeys) ? ", " : "");
 					}
 					strcat(sql, " where ");
-
 				}
 				else
 					/* DELETE */
 					snprintf(sql, sizeof(sql), "delete from %s where ", relname);
-
 			}
 
 			/*
diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c
index 8df45478f10..cc6d4e63382 100644
--- a/src/backend/access/gin/ginbtree.c
+++ b/src/backend/access/gin/ginbtree.c
@@ -527,7 +527,6 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
 									   BufferGetBlockNumber(stack->buffer),
 									   BufferGetBlockNumber(rbuffer));
 			}
-
 		}
 		else
 		{
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index a03122df8d6..4f33245670f 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8481,7 +8481,6 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
 		{
 			xlrec.cmin = InvalidCommandId;
 			xlrec.cmax = HeapTupleHeaderGetRawCommandId(hdr);
-
 		}
 		xlrec.combocid = InvalidCommandId;
 	}
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index e1cac74e620..a3c8ccdbe5c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -2073,7 +2073,6 @@ lazy_scan_noprune(LVRelState *vacrel,
 				elog(ERROR, "unexpected HeapTupleSatisfiesVacuum result");
 				break;
 		}
-
 	}
 
 	vacrel->offnum = InvalidOffsetNumber;
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 5361b147e30..9daf57d4038 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -2116,7 +2116,6 @@ btoptions(Datum reloptions, bool validate)
 		offsetof(BTOptions, vacuum_cleanup_index_scale_factor)},
 		{"deduplicate_items", RELOPT_TYPE_BOOL,
 		offsetof(BTOptions, deduplicate_items)}
-
 	};
 
 	return (bytea *) build_reloptions(reloptions, validate,
@@ -2590,7 +2589,6 @@ _bt_check_natts(Relation rel, bool heapkeyspace, Page page, OffsetNumber offnum)
 
 			/* Use generic heapkeyspace pivot tuple handling */
 		}
-
 	}
 
 	/* Handle heapkeyspace pivot tuples (excluding minus infinity items) */
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 4ee29182ac8..5c002359ed6 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -1790,7 +1790,6 @@ PerformWalRecovery(void)
 		/* there are no WAL records following the checkpoint */
 		ereport(LOG,
 				(errmsg("redo is not required")));
-
 	}
 
 	/*
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index ac6043514f1..8377b4f7d4d 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -1007,7 +1007,6 @@ get_object_address(ObjectType objtype, Node *object,
 					address.objectId = get_domain_constraint_oid(domaddr.objectId,
 																 constrname, missing_ok);
 					address.objectSubId = 0;
-
 				}
 				break;
 			case OBJECT_DATABASE:
@@ -5621,7 +5620,6 @@ getObjectIdentityParts(const ObjectAddress *object,
 					systable_endscan(rcscan);
 					table_close(defaclrel, AccessShareLock);
 					break;
-
 				}
 
 				defacl = (Form_pg_default_acl) GETSTRUCT(tup);
diff --git a/src/backend/catalog/pg_attrdef.c b/src/backend/catalog/pg_attrdef.c
index 2d63c6e62a3..c5d4a9912ea 100644
--- a/src/backend/catalog/pg_attrdef.c
+++ b/src/backend/catalog/pg_attrdef.c
@@ -167,7 +167,6 @@ StoreAttrDefault(Relation rel, AttrNumber attnum,
 
 		if (!missingIsNull)
 			pfree(DatumGetPointer(missingval));
-
 	}
 	table_close(attrrel, RowExclusiveLock);
 	heap_freetuple(atttup);
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 2e8d8afead8..b94236f74d3 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -1570,7 +1570,6 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
 		 */
 		if (slotname)
 			ReplicationSlotDropAtPubNode(wrconn, slotname, false);
-
 	}
 	PG_FINALLY();
 	{
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 2840bc527bc..23e572dd227 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -945,7 +945,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
 			ereport(ERROR,
 					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 					 errmsg("specifying a table access method is not supported on a partitioned table")));
-
 	}
 	else if (RELKIND_HAS_TABLE_AM(relkind))
 		accessMethod = default_table_access_method;
@@ -17450,7 +17449,6 @@ ComputePartitionAttrs(ParseState *pstate, Relation rel, List *partParams, AttrNu
 							 errmsg("data type %s has no default operator class for access method \"%s\"",
 									format_type_be(atttype), "btree"),
 							 errhint("You must specify a btree operator class or define a default btree operator class for the data type.")));
-
 			}
 		}
 		else
diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c
index 9a0d5d59ef6..f1fd7f7e8b2 100644
--- a/src/backend/executor/execParallel.c
+++ b/src/backend/executor/execParallel.c
@@ -1439,7 +1439,6 @@ ParallelQueryMain(dsm_segment *seg, shm_toc *toc)
 
 		paramexec_space = dsa_get_address(area, fpes->param_exec);
 		RestoreParamExecParams(paramexec_space, queryDesc->estate);
-
 	}
 	pwcxt.toc = toc;
 	pwcxt.seg = seg;
diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c
index 27989bd723d..b000645d48b 100644
--- a/src/backend/executor/execReplication.c
+++ b/src/backend/executor/execReplication.c
@@ -548,7 +548,6 @@ ExecSimpleRelationDelete(ResultRelInfo *resultRelInfo,
 	{
 		skip_tuple = !ExecBRDeleteTriggers(estate, epqstate, resultRelInfo,
 										   tid, NULL, NULL);
-
 	}
 
 	if (!skip_tuple)
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 23030a32a59..3223d9b24e5 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -4119,7 +4119,6 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
 								 2,
 								 InvalidOid,
 								 (void *) aggstate, NULL);
-
 	}
 
 	/*
diff --git a/src/backend/jit/llvm/llvmjit_deform.c b/src/backend/jit/llvm/llvmjit_deform.c
index a3355860c3e..661f15272b7 100644
--- a/src/backend/jit/llvm/llvmjit_deform.c
+++ b/src/backend/jit/llvm/llvmjit_deform.c
@@ -192,7 +192,6 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc,
 		v_tupleheaderp =
 			l_load_struct_gep(b, v_heapslot, FIELDNO_HEAPTUPLETABLESLOT_TUPLE,
 							  "tupleheader");
-
 	}
 	else if (ops == &TTSOpsMinimalTuple)
 	{
@@ -357,7 +356,6 @@ slot_compile_deform(LLVMJitContext *context, TupleDesc desc,
 
 			LLVMAddCase(v_switch, v_attno, attcheckattnoblocks[attnum]);
 		}
-
 	}
 	else
 	{
diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c
index 9c8f341d966..b6b6512ef1f 100644
--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -2173,7 +2173,6 @@ llvm_compile_expr(ExprState *state)
 										  "");
 
 							LLVMBuildBr(b, opblocks[opno + 1]);
-
 						}
 
 						LLVMPositionBuilderAtEnd(b, b_no_init);
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index cbd17b790d8..327a4b42af7 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -1775,7 +1775,6 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
 			hbaline->pam_use_hostname = true;
 		else
 			hbaline->pam_use_hostname = false;
-
 	}
 	else if (strcmp(name, "ldapurl") == 0)
 	{
diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c
index 3b8d2fe5601..34cc53af53e 100644
--- a/src/backend/optimizer/geqo/geqo_cx.c
+++ b/src/backend/optimizer/geqo/geqo_cx.c
@@ -115,7 +115,6 @@ cx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring,
 		for (i = 0; i < num_gene; i++)
 			if (tour1[i] != offspring[i])
 				num_diffs++;
-
 	}
 
 	return num_diffs;
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index d98c0a59e71..cc0661365f6 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -222,7 +222,6 @@ gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene, int num_gene)
 
 		/* mark this node as incorporated */
 		edge_table[(int) new_gene[i - 1]].unused_edges = -1;
-
 	}							/* for (i=1; i<num_gene; i++) */
 
 	return edge_failures;
@@ -336,7 +335,6 @@ gimme_gene(PlannerInfo *root, Edge edge, Edge *edge_table)
 			elog(ERROR, "minimum_count not set");
 		else if (edge_table[(int) friend].unused_edges == minimum_edges)
 			minimum_count++;
-
 	}							/* for (i=0; i<edge.unused_edges; i++) */
 
 
diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c
index ddbc78172c0..e44fd0bae5a 100644
--- a/src/backend/optimizer/geqo/geqo_pmx.c
+++ b/src/backend/optimizer/geqo/geqo_pmx.c
@@ -131,7 +131,6 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 				j++;
 			}
-
 		}
 
 		if (!(found))
@@ -140,7 +139,6 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 			indx[mx_fail] = k;
 			mx_fail++;
 		}
-
 	}							/* ... for */
 
 
@@ -172,9 +170,7 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 				j++;
 			}
-
 		}						/* ... for	 */
-
 	}							/* ... if	 */
 
 
@@ -206,12 +202,10 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 						j++;
 					}
-
 				}				/* ... if	 */
 
 				i++;
 			}					/* end while */
-
 		}
 	}							/* ... for	 */
 
diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c
index 0346554bc09..914296b53d2 100644
--- a/src/backend/optimizer/geqo/geqo_px.c
+++ b/src/backend/optimizer/geqo/geqo_px.c
@@ -96,13 +96,11 @@ px(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene,
 			{					/* next city in tour2 has been used */
 				tour2_index++;
 			}
-
 		}
 		else
 		{						/* next position in offspring is filled */
 			offspring_index++;
 		}
-
 	}
 }
 
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index b090b087e95..9a4accb4d9d 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6848,7 +6848,6 @@ create_partial_grouping_paths(PlannerInfo *root,
 											   dNumPartialGroups));
 			}
 		}
-
 	}
 
 	if (can_sort && cheapest_partial_path != NULL)
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 3535e9e47d2..3fceda8cff9 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -5851,7 +5851,6 @@ bgworker_should_start_now(BgWorkerStartTime start_time)
 			if (start_time == BgWorkerStart_PostmasterStart)
 				return true;
 			/* fall through */
-
 	}
 
 	return false;
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 9181d3e8636..4171371296f 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -600,7 +600,6 @@ slot_fill_defaults(LogicalRepRelMapEntry *rel, EState *estate,
 			defmap[num_defaults] = attnum;
 			num_defaults++;
 		}
-
 	}
 
 	for (i = 0; i < num_defaults; i++)
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 75400a53f2f..be402613936 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1000,7 +1000,6 @@ parseCreateReplSlotOptions(CreateReplicationSlotCmd *cmd,
 						(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 						 errmsg("unrecognized value for CREATE_REPLICATION_SLOT option \"%s\": \"%s\"",
 								defel->defname, action)));
-
 		}
 		else if (strcmp(defel->defname, "reserve_wal") == 0)
 		{
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index c12028ca0fe..e02ea3a977c 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2676,7 +2676,6 @@ CheckForBufferLeaks(void)
 			PrintBufferLeakWarning(res->buffer);
 			RefCountErrors++;
 		}
-
 	}
 
 	Assert(RefCountErrors == 0);
@@ -3652,7 +3651,6 @@ FlushRelationsAllBuffers(SMgrRelation *smgrs, int nrels)
 					break;
 				}
 			}
-
 		}
 		else
 		{
diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c
index 3b98e68d50f..990e081aaec 100644
--- a/src/backend/storage/buffer/freelist.c
+++ b/src/backend/storage/buffer/freelist.c
@@ -308,7 +308,6 @@ StrategyGetBuffer(BufferAccessStrategy strategy, uint32 *buf_state)
 				return buf;
 			}
 			UnlockBufHdr(buf, local_buf_state);
-
 		}
 	}
 
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index e184a3552c8..beef69eab22 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1848,7 +1848,6 @@ ComputeXidHorizons(ComputeXidHorizonsResult *h)
 			/* Catalog tables need to consider all backends in this db */
 			h->catalog_oldest_nonremovable =
 				TransactionIdOlder(h->catalog_oldest_nonremovable, xmin);
-
 		}
 	}
 
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c
index 366d57ea7ac..cc15396789b 100644
--- a/src/backend/storage/page/bufpage.c
+++ b/src/backend/storage/page/bufpage.c
@@ -563,7 +563,6 @@ compactify_tuples(itemIdCompact itemidbase, int nitems, Page page, bool presorte
 
 			/* update the line pointer to reference the new offset */
 			lp->lp_off = upper;
-
 		}
 
 		/* move the remaining tuples. */
@@ -669,7 +668,6 @@ compactify_tuples(itemIdCompact itemidbase, int nitems, Page page, bool presorte
 
 			/* update the line pointer to reference the new offset */
 			lp->lp_off = upper;
-
 		}
 
 		/* Copy the remaining chunk */
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index f364a9b88a9..0e7b7b31384 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -3741,7 +3741,6 @@ GetCommandLogLevel(Node *parsetree)
 						lev = LOGSTMT_ALL;
 						break;
 				}
-
 			}
 			break;
 
diff --git a/src/backend/tsearch/to_tsany.c b/src/backend/tsearch/to_tsany.c
index 6053a9e31f2..edeffacc2d7 100644
--- a/src/backend/tsearch/to_tsany.c
+++ b/src/backend/tsearch/to_tsany.c
@@ -569,7 +569,6 @@ pushval_morph(Datum opaque, TSQueryParserState state, char *strval, int lenval,
 		}
 
 		pfree(prs.words);
-
 	}
 	else
 		pushStop(state);
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index fe469881612..27b2cca2dfb 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -584,7 +584,6 @@ hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int bu
 			else
 				addHLParsedLex(prs, query, lexs, NULL);
 		} while (norms);
-
 	} while (type > 0);
 
 	FunctionCall1(&(prsobj->prsend), PointerGetDatum(prsdata));
@@ -629,7 +628,6 @@ generateHeadline(HeadlineParsedText *prs)
 					memcpy(ptr, prs->fragdelim, prs->fragdelimlen);
 					ptr += prs->fragdelimlen;
 				}
-
 			}
 			if (wrd->replace)
 			{
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c
index 2043f2e74af..56c588bbabd 100644
--- a/src/backend/utils/adt/jsonb.c
+++ b/src/backend/utils/adt/jsonb.c
@@ -851,7 +851,6 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result,
 					sem.object_field_start = jsonb_in_object_field_start;
 
 					pg_parse_json_or_ereport(lex, &sem);
-
 				}
 				break;
 			case JSONBTYPE_JSONB:
diff --git a/src/backend/utils/adt/multirangetypes.c b/src/backend/utils/adt/multirangetypes.c
index efd8584a3d8..67d7d67fb83 100644
--- a/src/backend/utils/adt/multirangetypes.c
+++ b/src/backend/utils/adt/multirangetypes.c
@@ -1181,7 +1181,6 @@ multirange_minus_internal(Oid mltrngtypoid, TypeCacheEntry *rangetyp,
 				 */
 				range_count3++;
 				r2 = ++i2 >= range_count2 ? NULL : ranges2[i2];
-
 			}
 			else if (range_overlaps_internal(rangetyp, r1, r2))
 			{
@@ -1200,7 +1199,6 @@ multirange_minus_internal(Oid mltrngtypoid, TypeCacheEntry *rangetyp,
 					break;
 				else
 					r2 = ++i2 >= range_count2 ? NULL : ranges2[i2];
-
 			}
 			else
 			{
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index f1673cc1456..a6e043c32c5 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -868,7 +868,6 @@ translate(PG_FUNCTION_ARGS)
 				target += len;
 				retlen += len;
 			}
-
 		}
 		else
 		{
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 3296ad070ed..7e08d7fe6c2 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -9440,7 +9440,6 @@ get_rule_expr(Node *node, deparse_context *context,
 							get_rule_expr_paren((Node *) xexpr->args, context, false, node);
 							break;
 					}
-
 				}
 				if (xexpr->op == IS_XMLSERIALIZE)
 					appendStringInfo(buf, " AS %s",
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index fb4fb987e7f..71cbc1c3d80 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -3628,7 +3628,6 @@ estimate_num_groups_incremental(PlannerInfo *root, List *groupExprs,
 					 */
 					if (estinfo != NULL && varinfo2->isdefault)
 						estinfo->flags |= SELFLAG_USED_DEFAULT;
-
 				}
 
 				/* we're done with this relation */
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 70937eaa461..da73796eac8 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -4898,7 +4898,6 @@ timestamp_part_common(PG_FUNCTION_ARGS, bool retnumeric)
 								lowunits, format_type_be(TIMESTAMPOID))));
 				intresult = 0;
 		}
-
 	}
 	else
 	{
@@ -5123,7 +5122,6 @@ timestamptz_part_common(PG_FUNCTION_ARGS, bool retnumeric)
 								lowunits, format_type_be(TIMESTAMPTZOID))));
 				intresult = 0;
 		}
-
 	}
 	else if (type == RESERV)
 	{
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index 8ba9ef22f56..addc3491518 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -2196,7 +2196,6 @@ insertStatEntry(MemoryContext persistentContext, TSVectorStat *stat, TSVector tx
 			else
 				pnode->right = node;
 		}
-
 	}
 	else
 	{
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index 233bcb63180..6ae7c1f50b8 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -1710,7 +1710,6 @@ SearchCatCacheList(CatCache *cache,
 		 * we'd better do so before we start marking the members as belonging
 		 * to the list.
 		 */
-
 	}
 	PG_CATCH();
 	{
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 72778b896a2..55ee5423afb 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -2683,7 +2683,6 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
 						appendStringInfo(buf, "%*s", padding, psdisp);
 					else
 						appendBinaryStringInfo(buf, psdisp, displen);
-
 				}
 				else if (padding != 0)
 					appendStringInfoSpaces(buf,
@@ -2722,7 +2721,6 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
 							appendStringInfo(buf, "(%s)",
 											 MyProcPort->remote_port);
 					}
-
 				}
 				else if (padding != 0)
 					appendStringInfoSpaces(buf,
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 571fb955327..1174e1a31c9 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -3186,7 +3186,6 @@ mergeonerun(Tuplesortstate *state)
 		{
 			stup.srctape = srcTapeIndex;
 			tuplesort_heap_replace_top(state, &stup);
-
 		}
 		else
 		{
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 6ef3d614211..79a723885ed 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1373,7 +1373,6 @@ dumpDatabases(PGconn *conn)
 				pg_fatal("could not re-open the output file \"%s\": %m",
 						 filename);
 		}
-
 	}
 
 	PQclear(res);
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c
index dfa836d1561..7e7346c79a1 100644
--- a/src/bin/pg_rewind/parsexlog.c
+++ b/src/bin/pg_rewind/parsexlog.c
@@ -98,7 +98,6 @@ extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex,
 		}
 
 		extractPageInfo(xlogreader);
-
 	} while (xlogreader->EndRecPtr < endpoint);
 
 	/*
diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c
index 6671a841502..bd18b4491d5 100644
--- a/src/bin/pg_verifybackup/pg_verifybackup.c
+++ b/src/bin/pg_verifybackup/pg_verifybackup.c
@@ -740,8 +740,6 @@ verify_file_checksum(verifier_context *context, manifest_file *m,
 			close(fd);
 			return;
 		}
-
-
 	}
 	if (rc < 0)
 		report_backup_error(context, "could not read file \"%s\": %m",
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index d04ba2b0290..b0aa0cf2466 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2622,7 +2622,6 @@ describeOneTableDetails(const char *schemaname,
 									  PQgetvalue(result, i, 4));
 
 				printTableAddFooter(&cont, buf.data);
-
 			}
 			PQclear(result);
 		}
@@ -3172,7 +3171,6 @@ describeOneTableDetails(const char *schemaname,
 							case 4:
 								printfPQExpBuffer(&buf, _("Triggers firing on replica only:"));
 								break;
-
 						}
 						printTableAddFooter(&cont, buf.data);
 						have_heading = true;
diff --git a/src/bin/psql/prompt.c b/src/bin/psql/prompt.c
index 10ab390531b..509e6422b7e 100644
--- a/src/bin/psql/prompt.c
+++ b/src/bin/psql/prompt.c
@@ -316,7 +316,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
 					buf[0] = *p;
 					buf[1] = '\0';
 					break;
-
 			}
 			esc = false;
 		}
diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c
index 6666077a934..98e4ef09426 100644
--- a/src/common/jsonapi.c
+++ b/src/common/jsonapi.c
@@ -658,7 +658,6 @@ json_lex(JsonLexContext *lex)
 						lex->token_type = JSON_TOKEN_FALSE;
 					else
 						return JSON_INVALID_TOKEN;
-
 				}
 		}						/* end of switch */
 	}
@@ -856,7 +855,6 @@ json_lex_string(JsonLexContext *lex)
 				lex->token_terminator = s + pg_encoding_mblen_bounded(lex->input_encoding, s);
 				return JSON_ESCAPING_INVALID;
 			}
-
 		}
 		else if (lex->strval != NULL)
 		{
@@ -865,7 +863,6 @@ json_lex_string(JsonLexContext *lex)
 
 			appendStringInfoChar(lex->strval, *s);
 		}
-
 	}
 
 	if (hi_surrogate != -1)
diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c
index dcdb2e0d0cb..fe676a971b9 100644
--- a/src/fe_utils/print.c
+++ b/src/fe_utils/print.c
@@ -1173,7 +1173,6 @@ print_aligned_text(const printTableContent *cont, FILE *fout, bool is_pager)
 			if (opt_border == 2)
 				fputs(dformat->rightvrule, fout);
 			fputc('\n', fout);
-
 		} while (more_lines);
 	}
 
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index a2166b1e12f..8dfcabe3b50 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -315,7 +315,6 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
 			ecpg_free(dbname);
 			dbname = ecpg_strdup(envname, lineno);
 		}
-
 	}
 
 	if (dbname == NULL && connection_name == NULL)
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index 6bc91ef7eb6..a1bba42bb8f 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -564,7 +564,6 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
 						}
 
 						pval += size;
-
 					}
 					break;
 
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 930b6adbe4f..6a7ef0bbf67 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1392,7 +1392,6 @@ ecpg_build_params(struct statement *stmt)
 				if (sqlda->sqln == desc_counter)
 					desc_counter = 0;
 			}
-
 		}
 		else
 		{
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index e8a8a0f0ed3..e0fae3d5f1d 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -1740,7 +1740,6 @@ ParseDateTime(char *timestr, char *lowstr,
 		{
 			(*endstr)++;
 			continue;
-
 		}
 		/* otherwise, something is not right... */
 		else
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index a7e530cb5d2..73bde94aaf0 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -947,7 +947,6 @@ interval2tm(interval span, struct tm *tm, fsec_t *fsec)
 	{
 		tm->tm_year = span.month / MONTHS_PER_YEAR;
 		tm->tm_mon = span.month % MONTHS_PER_YEAR;
-
 	}
 	else
 	{
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 24a598b6e41..42d8d4616e7 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1432,7 +1432,6 @@ initialize_SSL(PGconn *conn)
 			}
 
 			SSLerrfree(err);
-
 		}
 	}
 
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 68c9bd1970e..0dd6d8ab2c2 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -1243,7 +1243,6 @@ pltcl_trigger_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
 		for (i = 0; i < trigdata->tg_trigger->tgnargs; i++)
 			Tcl_ListObjAppendElement(NULL, tcl_cmd,
 									 Tcl_NewStringObj(utf_e2u(trigdata->tg_trigger->tgargs[i]), -1));
-
 	}
 	PG_CATCH();
 	{
diff --git a/src/port/chklocale.c b/src/port/chklocale.c
index 3e777253524..c85d8da3c8b 100644
--- a/src/port/chklocale.c
+++ b/src/port/chklocale.c
@@ -278,7 +278,6 @@ win32_langinfo(const char *ctype)
 					strcpy(r, codepage);
 			}
 		}
-
 	}
 #endif
 
-- 
2.17.1

  [text/x-diff] 0007-comment-spaces.patch (1.9K, ../../20220411101005.GD26620@telsasoft.com/8-0007-comment-spaces.patch)
  download | inline diff:
From 2de156e4ad64ac63eee9284adfb440e7e5a5db5f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 12 Mar 2022 14:55:18 -0600
Subject: [PATCH 07/13] comment spaces

---
 src/backend/storage/file/fd.c     | 2 +-
 src/include/replication/message.h | 2 +-
 src/include/tsearch/ts_type.h     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 14b77f28617..24704b6a023 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -912,7 +912,7 @@ InitFileAccess(void)
 void
 InitTemporaryFileAccess(void)
 {
-	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run*/
+	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run */
 	Assert(!temporary_files_allowed);	/* call me only once */
 
 	/*
diff --git a/src/include/replication/message.h b/src/include/replication/message.h
index 7d7785292f1..b9686c28550 100644
--- a/src/include/replication/message.h
+++ b/src/include/replication/message.h
@@ -32,7 +32,7 @@ typedef struct xl_logical_message
 extern XLogRecPtr LogLogicalMessage(const char *prefix, const char *message,
 									size_t size, bool transactional);
 
-/* RMGR API*/
+/* RMGR API */
 #define XLOG_LOGICAL_MESSAGE	0x00
 void		logicalmsg_redo(XLogReaderState *record);
 void		logicalmsg_desc(StringInfo buf, XLogReaderState *record);
diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h
index a2008f5504b..689b2d1cfb6 100644
--- a/src/include/tsearch/ts_type.h
+++ b/src/include/tsearch/ts_type.h
@@ -171,7 +171,7 @@ typedef struct
 
 extern PGDLLIMPORT const int tsearch_op_priority[OP_COUNT];
 
-/* get operation priority  by its code*/
+/* get operation priority by its code */
 #define OP_PRIORITY(x)	( tsearch_op_priority[(x) - 1] )
 /* get QueryOperator priority */
 #define QO_PRIORITY(x)	OP_PRIORITY(((QueryOperator *) (x))->oper)
-- 
2.17.1

  [text/x-diff] 0008-doc-fixes-productname.patch (4.8K, ../../20220411101005.GD26620@telsasoft.com/9-0008-doc-fixes-productname.patch)
  download | inline diff:
From 79ca2f61e6ab0b04cfb75430a3dadb25711a20d5 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 12:53:01 -0500
Subject: [PATCH 08/13] doc fixes: productname

v15 only
e9537321a74a2b062c8f7a452314b4570913f780

backpatch to v13
ed10f32e37e9a16814c25e400d7826745ae3c797

backpatch to v10
6f9192df61e183826211ad2eaf325c6de5cf3656
507447b5855d4c362706aef9f8885bc5e4d9b4e8
8dc8f44f588d683ab0af8abb130a7711221f5e21
b2aab424675f85799c08d637a71365aeb377fffe
---
 doc/src/sgml/catalogs.sgml        | 2 +-
 doc/src/sgml/client-auth.sgml     | 4 ++--
 doc/src/sgml/ecpg.sgml            | 2 +-
 doc/src/sgml/install-windows.sgml | 2 +-
 doc/src/sgml/installation.sgml    | 2 +-
 doc/src/sgml/sources.sgml         | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 6f285871b64..a533a2153e2 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -12962,7 +12962,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   <para>
    The <structname>pg_shmem_allocations</structname> view shows allocations
    made from the server's main shared memory segment.  This includes both
-   memory allocated by <productname>postgres</productname> itself and memory
+   memory allocated by <productname>PostgreSQL</productname> itself and memory
    allocated by extensions using the mechanisms detailed in
    <xref linkend="xfunc-shared-addin" />.
   </para>
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index 142b0affcb6..28c51d72613 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -1523,7 +1523,7 @@ omicron         bryanh                  guest1
    </note>
 
    <para>
-    The following configuration options are supported for <productname>ident</productname>:
+    The following configuration options are supported for <literal>ident</literal>:
     <variablelist>
      <varlistentry>
       <term><literal>map</literal></term>
@@ -1597,7 +1597,7 @@ omicron         bryanh                  guest1
    </para>
 
    <para>
-    The following configuration options are supported for <productname>peer</productname>:
+    The following configuration options are supported for <literal>peer</literal>:
     <variablelist>
      <varlistentry>
       <term><literal>map</literal></term>
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index cdc4761c602..7f8b4dd5c02 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -8233,7 +8233,7 @@ $COMMIT;
    you functions that have the same name and the same basic behavior but it is
    no drop-in replacement if you are using <productname>Informix</productname> at the moment. Moreover,
    some of the data types are different. For example,
-   <productname>PostgreSQL's</productname> datetime and interval types do not
+   <productname>PostgreSQL</productname>'s datetime and interval types do not
    know about ranges like for example <literal>YEAR TO MINUTE</literal> so you won't
    find support in ECPG for that either.
   </para>
diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index 18101e7a701..43cc5f6f5b2 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -370,7 +370,7 @@ $ENV{MSBFLAGS}="/m";
   </para>
 
   <para>
-   To use a server-side third party library such as <productname>python</productname> or
+   To use a server-side third party library such as <productname>Python</productname> or
    <productname>OpenSSL</productname>, this library <emphasis>must</emphasis> also be
    64-bit. There is no support for loading a 32-bit library in a 64-bit
    server. Several of the third party libraries that PostgreSQL supports may
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index df32025a86f..4a7327cc408 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -273,7 +273,7 @@ su - postgres
 
     <listitem>
      <para>
-      You need <productname>zstd</productname>, if you want to support
+      You need <productname>ZSTD</productname>, if you want to support
       compression of data with that method; see
       <xref linkend="guc-wal-compression"/>.
       The minimum required version is 1.4.0.
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index 1b77efb0879..2d01efc950c 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -63,7 +63,7 @@
 
    <para>
     The <filename>src/tools/editors</filename> directory contains sample settings
-    files that can be used with the <productname>emacs</productname>,
+    files that can be used with the <productname>Emacs</productname>,
     <productname>xemacs</productname> or <productname>vim</productname>
     editors to help ensure that they format code according to these
     conventions.
-- 
2.17.1

  [text/x-diff] 0009-doc-review-locales.patch (3.8K, ../../20220411101005.GD26620@telsasoft.com/10-0009-doc-review-locales.patch)
  download | inline diff:
From f3012f0085131c39ff32e9aeb8911f59dbcad7cb Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 13:04:48 -0500
Subject: [PATCH 09/13] doc review: locales

f2553d43060edb210b36c63187d52a632448e1d2
---
 doc/src/sgml/charset.sgml    | 12 ++++++------
 doc/src/sgml/ref/initdb.sgml |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index d60d3207fd4..b95303fb893 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -314,7 +314,7 @@ initdb --locale=sv_SE
       A locale can be selected separately for each database.  The SQL command
       <command>CREATE DATABASE</command> and its command-line equivalent
       <command>createdb</command> have options for that.  Use this for example
-      if a database cluster houses databases for multiple tennants with
+      if a database cluster houses databases for multiple tenants with
       different requirements.
      </para>
     </listitem>
@@ -346,7 +346,7 @@ initdb --locale=sv_SE
     providers</firstterm>.  This specifies which library supplies the locale
     data.  One standard provider name is <literal>libc</literal>, which uses
     the locales provided by the operating system C library.  These are the
-    locales that most tools provided by the operating system use.  Another
+    locales used by most tools provided by the operating system.  Another
     provider is <literal>icu</literal>, which uses the external
     ICU<indexterm><primary>ICU</primary></indexterm> library.  ICU locales can
     only be used if support for ICU was configured when PostgreSQL was built.
@@ -361,8 +361,8 @@ initdb --locale=sv_SE
 <programlisting>
 initdb --locale-provider=icu --icu-locale=en
 </programlisting>
-    See the description of the respective commands and programs for the
-    respective details.  Note that you can mix locale providers on different
+    See the description of the respective commands and programs for
+    details.  Note that you can mix locale providers at different
     granularities, for example use <literal>libc</literal> by default for the
     cluster but have one database that uses the <literal>icu</literal>
     provider, and then have collation objects using either provider within
@@ -610,8 +610,8 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
     definition has a <firstterm>provider</firstterm> that specifies which
     library supplies the locale data.  One standard provider name
     is <literal>libc</literal>, which uses the locales provided by the
-    operating system C library.  These are the locales that most tools
-    provided by the operating system use.  Another provider
+    operating system C library.  These are the locales used by most tools
+    provided by the operating system.  Another provider
     is <literal>icu</literal>, which uses the external
     ICU<indexterm><primary>ICU</primary></indexterm> library.  ICU locales can only be
     used if support for ICU was configured when PostgreSQL was built.
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index f5d633b0afa..c9ffaaecfb9 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -108,7 +108,7 @@ PostgreSQL documentation
    Alternatively, the ICU library can be used to provide locale services.
    (Again, this only sets the default for subsequently created databases.)  To
    select this option, specify <literal>--locale-provider=icu</literal>.
-   To chose the specific ICU locale ID to apply, use the option
+   To choose the specific ICU locale ID to apply, use the option
    <option>--icu-locale</option>.  Note that
    for implementation reasons and to support legacy code,
    <command>initdb</command> will still select and initialize libc locale
-- 
2.17.1

  [text/x-diff] 0010-doc-review-compute_query_id-regress.patch (1.1K, ../../20220411101005.GD26620@telsasoft.com/11-0010-doc-review-compute_query_id-regress.patch)
  download | inline diff:
From 717eba8e114a835b434cb3c61d3d7d1d9cd13f4f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 12:20:37 -0500
Subject: [PATCH 10/13] doc review: compute_query_id = regress

ebf6c5249b7db525e59563fb149642665c88f747
---
 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 81cacdcbe40..4ddfa2a19a6 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -8095,8 +8095,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
         which lets modules such as <xref linkend="pgstatstatements"/>
         automatically enable it, and <literal>regress</literal> which
         has the same effect as <literal>auto</literal>, except that the
-        query identifier is hidden in the <literal>EXPLAIN</literal> output
-        to facilitate automated regression testing.
+        query identifier is not shown in the <literal>EXPLAIN</literal> output
+        in order to facilitate automated regression testing.
         The default is <literal>auto</literal>.
        </para>
        <note>
-- 
2.17.1

  [text/x-diff] 0011-doc-review-row-filters-for-logical-replication.patch (1.1K, ../../20220411101005.GD26620@telsasoft.com/12-0011-doc-review-row-filters-for-logical-replication.patch)
  download | inline diff:
From 6363fa0035aded2bbe088ab2cc639d63eabaf529 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 12:22:58 -0500
Subject: [PATCH 11/13] doc review: row filters for logical replication

52e4f0cd472d39d07732b99559989ea3b615be78
---
 doc/src/sgml/ref/create_publication.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml
index fb2d013393b..f4b44d99a88 100644
--- a/doc/src/sgml/ref/create_publication.sgml
+++ b/doc/src/sgml/ref/create_publication.sgml
@@ -252,8 +252,8 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
    system columns.
    If your publication contains a partitioned table, the publication parameter
    <literal>publish_via_partition_root</literal> determines if it uses the
-   partition's row filter (if the parameter is false, the default) or the root
-   partitioned table's row filter.
+   partition's row filter (when the parameter is false, which is the default)
+   or the root partitioned table's row filter.
   </para>
 
   <para>
-- 
2.17.1

  [text/x-diff] 0012-doc-review-Add-ALTER-SUBSCRIPTION-.-SKIP.patch (4.4K, ../../20220411101005.GD26620@telsasoft.com/13-0012-doc-review-Add-ALTER-SUBSCRIPTION-.-SKIP.patch)
  download | inline diff:
From 99e8c10faaa919167bc8c47a6f4c6048db1f3c49 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 26 Mar 2022 00:11:01 -0500
Subject: [PATCH 12/13] doc review: Add ALTER SUBSCRIPTION ... SKIP.

208c5d65bbd60e33e272964578cb74182ac726a8
---
 doc/src/sgml/logical-replication.sgml    | 6 +++---
 doc/src/sgml/ref/alter_subscription.sgml | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index 555fbd749cc..f0d02c2d14c 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -363,13 +363,13 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    The LSN of the transaction that contains the change violating the constraint and
    the replication origin name can be found from the server log (LSN 0/14C0378 and
    replication origin <literal>pg_16395</literal> in the above case).  The
-   transaction that produces conflict can be skipped by using
+   transaction that produced the conflict can be skipped by using
    <command>ALTER SUBSCRIPTION ... SKIP</command> with the finish LSN
    (i.e., LSN 0/14C0378).  The finish LSN could be an LSN at which the transaction
    is committed or prepared on the publisher.  Alternatively, the transaction can
    also be skipped by calling the <link linkend="pg-replication-origin-advance">
    <function>pg_replication_origin_advance()</function></link> function
-   transaction.  Before using this function, the subscription needs to be disabled
+   XXX? transaction.  Before using this function, the subscription needs to be disabled
    temporarily either by <command>ALTER SUBSCRIPTION ... DISABLE</command> or, the
    subscription can be used with the <literal>disable_on_error</literal> option.
    Then, you can use <function>pg_replication_origin_advance()</function> function
@@ -377,7 +377,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    and the next LSN of the finish LSN (i.e., 0/14C0379).  The current position of
    origins can be seen in the <link linkend="view-pg-replication-origin-status">
    <structname>pg_replication_origin_status</structname></link> system view.
-   Please note that skipping the whole transaction include skipping changes that
+   Please note that skipping the whole transaction includes skipping changes that
    might not violate any constraint.  This can easily make the subscriber
    inconsistent.
   </para>
diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml
index 7c5203b6d3b..353ea5def23 100644
--- a/doc/src/sgml/ref/alter_subscription.sgml
+++ b/doc/src/sgml/ref/alter_subscription.sgml
@@ -219,13 +219,13 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
      <para>
       Skips applying all changes of the remote transaction.  If incoming data
       violates any constraints, logical replication will stop until it is
-      resolved.  By using <command>ALTER SUBSCRIPTION ... SKIP</command> command,
+      resolved.  By using the <command>ALTER SUBSCRIPTION ... SKIP</command> command,
       the logical replication worker skips all data modification changes within
       the transaction.  This option has no effect on the transactions that are
       already prepared by enabling <literal>two_phase</literal> on
       subscriber.
-      After logical replication worker successfully skips the transaction or
-      finishes a transaction, LSN (stored in
+      After the logical replication worker successfully skips the transaction or
+      finishes a transaction, the LSN (stored in
       <structname>pg_subscription</structname>.<structfield>subskiplsn</structfield>)
       is cleared.  See <xref linkend="logical-replication-conflicts"/> for
       the details of logical replication conflicts.  Using this command requires
@@ -244,7 +244,7 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
           Specifies the finish LSN of the remote transaction whose changes
           are to be skipped by the logical replication worker.  The finish LSN
           is the LSN at which the transaction is either committed or prepared.
-          Skipping individual subtransaction is not supported.  Setting
+          Skipping individual subtransactions is not supported.  Setting
           <literal>NONE</literal> resets the LSN.
          </para>
         </listitem>
-- 
2.17.1

  [text/x-diff] 0013-doc-comma.patch (1.1K, ../../20220411101005.GD26620@telsasoft.com/14-0013-doc-comma.patch)
  download | inline diff:
From 4eaed5e78c3482ce1810a9354370cd7d5a622a70 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 22 Feb 2022 07:44:06 -0600
Subject: [PATCH 13/13] doc: comma

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

diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml
index 203bb41844f..b09dc50bd25 100644
--- a/doc/src/sgml/ref/create_subscription.sgml
+++ b/doc/src/sgml/ref/create_subscription.sgml
@@ -350,7 +350,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
    <literal>FOR ALL TABLES IN SCHEMA</literal>, rows are always published
    regardless of the definition of the other expressions.
    If the subscriber is a <productname>PostgreSQL</productname> version before
-   15 then any row filtering is ignored during the initial data synchronization
+   15, then any row filtering is ignored during the initial data synchronization
    phase. For this case, the user might want to consider deleting any initially
    copied data that would be incompatible with subsequent filtering.
   </para>
-- 
2.17.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-11 10:25  Masahiko Sawada <sawada.mshk@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  1 sibling, 1 reply; 54+ messages in thread

From: Masahiko Sawada @ 2022-04-11 10:25 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: David Rowley <dgrowleyml@gmail.com>; Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <akapila@postgresql.org>

On Mon, Apr 11, 2022 at 7:10 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Mon, Apr 11, 2022 at 04:39:30PM +1200, David Rowley wrote:
> > I'm not entirely certain this is an improvement.  Your commit message
> > I'd say is not true going by git grep "compression algorithm". There
> > are 3 matches in the docs and take [1], for example. I'd say in that
> > one it's better to use "algorithm".  In that case, "method" could be
> > talking about client or server.
>
> I am not wedded to this change; but, for context, I wrote this patch before
> basebackup supported multiple compression ...  "things".  I didn't touch
> basebackup here, since Robert defended that choice of words in another thread
> (starting at 20220320194050.GX28503@telsasoft.com).
>
> This change is for pg_column_compression(), and the only other use of
> "compression algorithm" in the docs is in pgcrypto (which is in contrib).  That
> the docs consistently use "method" suggests continuing to use that rather than
> something else.  It could be described in some central place (like if we
> support common syntax between interfaces which expose compression).
>
> > 0010:
> > I don't understand this change.
>
> The commit message mentions 959f6d6a1, which makes newbindir optional.  But the
> documentation wasn't updated, and seems to indicate that it's still required.
> https://www.postgresql.org/docs/devel/pgupgrade.html
>
> > 0011:
> > I can't quite parse the original. I might not have enough context
> > here.  Robert, Joe? (new to master)
>
> See the link in the commit message where someone else reported the same
> problem.
>
> > 0019:
> > -1. pgindent will fix these.
>
> But two of those are from 2016.
>
> Thanks for amending and pushing those.  There's some more less obvious ones
> attached.
>
> Amit or Masahiko may want to comment on 0012 (doc review: Add ALTER
> SUBSCRIPTION ... SKIP).

Thank you for the patch! I've looked at 0012 patch. Regarding the
following part:

    <function>pg_replication_origin_advance()</function></link> function
-   transaction.  Before using this function, the subscription needs
to be disabled
+   XXX? transaction.  Before using this function, the subscription
needs to be disabled
    temporarily either by <command>ALTER SUBSCRIPTION ...
DISABLE</command> or, the

we can remove "transaction", it seems a typo. The rest looks good to me.

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-11 10:45  Amit Kapila <amit.kapila16@gmail.com>
  parent: Masahiko Sawada <sawada.mshk@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Amit Kapila @ 2022-04-11 10:45 UTC (permalink / raw)
  To: Masahiko Sawada <sawada.mshk@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <akapila@postgresql.org>

On Mon, Apr 11, 2022 at 3:55 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Mon, Apr 11, 2022 at 7:10 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> >
> > Amit or Masahiko may want to comment on 0012 (doc review: Add ALTER
> > SUBSCRIPTION ... SKIP).
>
> Thank you for the patch! I've looked at 0012 patch. Regarding the
> following part:
>
>     <function>pg_replication_origin_advance()</function></link> function
> -   transaction.  Before using this function, the subscription needs
> to be disabled
> +   XXX? transaction.  Before using this function, the subscription
> needs to be disabled
>     temporarily either by <command>ALTER SUBSCRIPTION ...
> DISABLE</command> or, the
>
> we can remove "transaction", it seems a typo.
>

Right.

> The rest looks good to me.
>

+1. I'll take care of pushing this one tomorrow unless we have more
comments on this part.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-11 17:59  Robert Haas <robertmhaas@gmail.com>
  parent: David Rowley <dgrowleyml@gmail.com>
  1 sibling, 0 replies; 54+ messages in thread

From: Robert Haas @ 2022-04-11 17:59 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

On Mon, Apr 11, 2022 at 4:56 AM David Rowley <dgrowleyml@gmail.com> wrote:
> 0011 (Could do with input from Robert and Joe)

Seems like a reasonable change to me.

-- 
Robert Haas
EDB: http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-12 11:26  Amit Kapila <amit.kapila16@gmail.com>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Amit Kapila @ 2022-04-12 11:26 UTC (permalink / raw)
  To: Masahiko Sawada <sawada.mshk@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <akapila@postgresql.org>

On Mon, Apr 11, 2022 at 4:15 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Apr 11, 2022 at 3:55 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> >
> > On Mon, Apr 11, 2022 at 7:10 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > >
> > > Amit or Masahiko may want to comment on 0012 (doc review: Add ALTER
> > > SUBSCRIPTION ... SKIP).
> >
>
> +1. I'll take care of pushing this one tomorrow unless we have more
> comments on this part.
>

I have pushed this one.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-13 17:29  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: David Rowley <dgrowleyml@gmail.com>
  1 sibling, 1 reply; 54+ messages in thread

From: Alvaro Herrera @ 2022-04-13 17:29 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

On 2022-Apr-11, David Rowley wrote:

> and also skipped:
> 0016 (unsure if we should change these of pgindent is not touching it)
> 0017 (unsure if we should change these of pgindent is not touching it)

I verified that pgindent will indeed not touch these changes by running
before and after.  (I accepted one comment placement from that run that
touched a neighboring line.)

I think pgindent is right not to modify vertical space very much, since
in many cases it amounts to a subjective decision.  The patch seemed a
(small) improvement, and it seems hard to make too much of a fuss about
such things.  Pushed them as a single commit.

I hadn't noticed that Justin had posted a refreshed patch series, so I
don't know if the new ones match what I pushed.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Postgres is bloatware by design: it was built to house
 PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-13 17:40  Justin Pryzby <pryzby@telsasoft.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-04-13 17:40 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>

On Wed, Apr 13, 2022 at 07:29:34PM +0200, Alvaro Herrera wrote:
> On 2022-Apr-11, David Rowley wrote:
> 
> > and also skipped:
> > 0016 (unsure if we should change these of pgindent is not touching it)
> > 0017 (unsure if we should change these of pgindent is not touching it)
> 
> I verified that pgindent will indeed not touch these changes by running
> before and after.  (I accepted one comment placement from that run that
> touched a neighboring line.)
> 
> I think pgindent is right not to modify vertical space very much, since
> in many cases it amounts to a subjective decision.  The patch seemed a
> (small) improvement, and it seems hard to make too much of a fuss about
> such things.  Pushed them as a single commit.
> 
> I hadn't noticed that Justin had posted a refreshed patch series, so I
> don't know if the new ones match what I pushed.

There were no changes - I had resent the patches that removed blank lines so it
was apparent that they were "outstanding" / under discussion.

There's (only) a few remaining.

Attachments:

  [text/x-diff] 0001-comment-spaces.patch (1.9K, ../../20220413174056.GQ26620@telsasoft.com/2-0001-comment-spaces.patch)
  download | inline diff:
From 543b9d77763da814cf1a99938252eb16a0a7d131 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 12 Mar 2022 14:55:18 -0600
Subject: [PATCH 1/4] comment spaces

---
 src/backend/storage/file/fd.c     | 2 +-
 src/include/replication/message.h | 2 +-
 src/include/tsearch/ts_type.h     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 14b77f28617..24704b6a023 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -912,7 +912,7 @@ InitFileAccess(void)
 void
 InitTemporaryFileAccess(void)
 {
-	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run*/
+	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run */
 	Assert(!temporary_files_allowed);	/* call me only once */
 
 	/*
diff --git a/src/include/replication/message.h b/src/include/replication/message.h
index 7d7785292f1..b9686c28550 100644
--- a/src/include/replication/message.h
+++ b/src/include/replication/message.h
@@ -32,7 +32,7 @@ typedef struct xl_logical_message
 extern XLogRecPtr LogLogicalMessage(const char *prefix, const char *message,
 									size_t size, bool transactional);
 
-/* RMGR API*/
+/* RMGR API */
 #define XLOG_LOGICAL_MESSAGE	0x00
 void		logicalmsg_redo(XLogReaderState *record);
 void		logicalmsg_desc(StringInfo buf, XLogReaderState *record);
diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h
index a2008f5504b..689b2d1cfb6 100644
--- a/src/include/tsearch/ts_type.h
+++ b/src/include/tsearch/ts_type.h
@@ -171,7 +171,7 @@ typedef struct
 
 extern PGDLLIMPORT const int tsearch_op_priority[OP_COUNT];
 
-/* get operation priority  by its code*/
+/* get operation priority by its code */
 #define OP_PRIORITY(x)	( tsearch_op_priority[(x) - 1] )
 /* get QueryOperator priority */
 #define QO_PRIORITY(x)	OP_PRIORITY(((QueryOperator *) (x))->oper)
-- 
2.17.1

  [text/x-diff] 0002-doc-review-locales.patch (3.8K, ../../20220413174056.GQ26620@telsasoft.com/3-0002-doc-review-locales.patch)
  download | inline diff:
From e84373bd78d6634781536a96a083cf26c87aa53e Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 13:04:48 -0500
Subject: [PATCH 3/4] doc review: locales

f2553d43060edb210b36c63187d52a632448e1d2
---
 doc/src/sgml/charset.sgml    | 12 ++++++------
 doc/src/sgml/ref/initdb.sgml |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index d60d3207fd4..b95303fb893 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -314,7 +314,7 @@ initdb --locale=sv_SE
       A locale can be selected separately for each database.  The SQL command
       <command>CREATE DATABASE</command> and its command-line equivalent
       <command>createdb</command> have options for that.  Use this for example
-      if a database cluster houses databases for multiple tennants with
+      if a database cluster houses databases for multiple tenants with
       different requirements.
      </para>
     </listitem>
@@ -346,7 +346,7 @@ initdb --locale=sv_SE
     providers</firstterm>.  This specifies which library supplies the locale
     data.  One standard provider name is <literal>libc</literal>, which uses
     the locales provided by the operating system C library.  These are the
-    locales that most tools provided by the operating system use.  Another
+    locales used by most tools provided by the operating system.  Another
     provider is <literal>icu</literal>, which uses the external
     ICU<indexterm><primary>ICU</primary></indexterm> library.  ICU locales can
     only be used if support for ICU was configured when PostgreSQL was built.
@@ -361,8 +361,8 @@ initdb --locale=sv_SE
 <programlisting>
 initdb --locale-provider=icu --icu-locale=en
 </programlisting>
-    See the description of the respective commands and programs for the
-    respective details.  Note that you can mix locale providers on different
+    See the description of the respective commands and programs for
+    details.  Note that you can mix locale providers at different
     granularities, for example use <literal>libc</literal> by default for the
     cluster but have one database that uses the <literal>icu</literal>
     provider, and then have collation objects using either provider within
@@ -610,8 +610,8 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
     definition has a <firstterm>provider</firstterm> that specifies which
     library supplies the locale data.  One standard provider name
     is <literal>libc</literal>, which uses the locales provided by the
-    operating system C library.  These are the locales that most tools
-    provided by the operating system use.  Another provider
+    operating system C library.  These are the locales used by most tools
+    provided by the operating system.  Another provider
     is <literal>icu</literal>, which uses the external
     ICU<indexterm><primary>ICU</primary></indexterm> library.  ICU locales can only be
     used if support for ICU was configured when PostgreSQL was built.
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index f5d633b0afa..c9ffaaecfb9 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -108,7 +108,7 @@ PostgreSQL documentation
    Alternatively, the ICU library can be used to provide locale services.
    (Again, this only sets the default for subsequently created databases.)  To
    select this option, specify <literal>--locale-provider=icu</literal>.
-   To chose the specific ICU locale ID to apply, use the option
+   To choose the specific ICU locale ID to apply, use the option
    <option>--icu-locale</option>.  Note that
    for implementation reasons and to support legacy code,
    <command>initdb</command> will still select and initialize libc locale
-- 
2.17.1

  [text/x-diff] 0003-doc-review-row-filters-for-logical-replication.patch (1.1K, ../../20220413174056.GQ26620@telsasoft.com/4-0003-doc-review-row-filters-for-logical-replication.patch)
  download | inline diff:
From 7ebb9ee1761df8a9379e128e2d899a75d28ad2a7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 25 Mar 2022 12:22:58 -0500
Subject: [PATCH 4/4] doc review: row filters for logical replication

52e4f0cd472d39d07732b99559989ea3b615be78
---
 doc/src/sgml/ref/create_publication.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml
index fb2d013393b..f4b44d99a88 100644
--- a/doc/src/sgml/ref/create_publication.sgml
+++ b/doc/src/sgml/ref/create_publication.sgml
@@ -252,8 +252,8 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
    system columns.
    If your publication contains a partitioned table, the publication parameter
    <literal>publish_via_partition_root</literal> determines if it uses the
-   partition's row filter (if the parameter is false, the default) or the root
-   partitioned table's row filter.
+   partition's row filter (when the parameter is false, which is the default)
+   or the root partitioned table's row filter.
   </para>
 
   <para>
-- 
2.17.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-13 20:56  David Rowley <dgrowleyml@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  1 sibling, 1 reply; 54+ messages in thread

From: David Rowley @ 2022-04-13 20:56 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <akapila@postgresql.org>; Masahiko Sawada <sawada.mshk@gmail.com>

On Mon, 11 Apr 2022 at 22:10, Justin Pryzby <pryzby@telsasoft.com> wrote:
> Thanks for amending and pushing those.  There's some more less obvious ones
> attached.

Here are my notes from yesterday that I made when reviewing and
pushing many of the 2nd batch of patches.

0001: Pushed and back patched to v12

0002: Didn't push. Compression method/algorithm.

0003: Pushed and backpatched to v13

0004: Pushed (reviewed by Robert)

0005: Alvaro Pushed
0006: Alvaro Pushed

0007: Not pushed. No space after comment and closing */  pgindent
fixed one of these but not the other 2.  I've not looked into why
pgindent does 1 and not the other 2.

0008: Pushed

I've left out the following change as it does not seem to be bringing
any sort of consistency to the docs overall. It only brings
consistency to a single source file in the docs.

-      You need <productname>zstd</productname>, if you want to support
+      You need <productname>ZSTD</productname>, if you want to support

See: git grep -i ">zstd<"

0009:

This contains a few fixes that look correct. Not sure if the following
has any use as a change:

-    See the description of the respective commands and programs for the
-    respective details.  Note that you can mix locale providers on different
+    See the description of the respective commands and programs for
+    details.  Note that you can mix locale providers at different

0010: Pushed

0011: Not pushed. Not sure if this is worth the change.

0012: Amit Pushed

0013: Not pushed. Adds a missing comma.

David





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-13 21:39  David Rowley <dgrowleyml@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: David Rowley @ 2022-04-13 21:39 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

(For the future, just to make discussions easier, it would be good if
you could have git format-patch -v N to give a unique version number
to these patches)

On Thu, 14 Apr 2022 at 05:40, Justin Pryzby <pryzby@telsasoft.com> wrote:
> There's (only) a few remaining.

I've pushed 0001 and 0002 of the 3rd batch of patches. I left 0003 as
I just didn't feel it was a meaningful enough improvement.

From docs/, if I do:

$ git grep ", which is the default" | wc -l
9

$ git grep ", the default" | wc -l
64

You're proposing to make the score 10, 63.  I'm not sure if that's a
good direction to go in.

David





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-14 00:33  Justin Pryzby <pryzby@telsasoft.com>
  parent: David Rowley <dgrowleyml@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-04-14 00:33 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>

On Thu, Apr 14, 2022 at 09:39:42AM +1200, David Rowley wrote:
> On Thu, 14 Apr 2022 at 05:40, Justin Pryzby <pryzby@telsasoft.com> wrote:
> > There's (only) a few remaining.
> 
> I've pushed 0001 and 0002 of the 3rd batch of patches. I left 0003 as

Thanks

> I just didn't feel it was a meaningful enough improvement.
> 
> From docs/, if I do:
> 
> $ git grep ", which is the default" | wc -l
> 9
> 
> $ git grep ", the default" | wc -l
> 64
> 
> You're proposing to make the score 10, 63.  I'm not sure if that's a
> good direction to go in.

Well, I'm proposing to change the only instance of this:

$ git grep -F ", the default)"
doc/src/sgml/ref/create_publication.sgml:   partition's row filter (if the parameter is false, the default) or the root

Maybe what's needed is more like this.

   If the publication contains a partitioned table, and the publication parameter
   <literal>publish_via_partition_root</literal> is false (the default), then the
   row filter is taken from the partition; otherwise, the row filter is taken
   from the root partitioned table.

I'll plan to keep this around and may come back to it later.

On Thu, Apr 14, 2022 at 08:56:22AM +1200, David Rowley wrote:
> I've left out the following change as it does not seem to be bringing
> any sort of consistency to the docs overall. It only brings
> consistency to a single source file in the docs.
> 
> -      You need <productname>zstd</productname>, if you want to support
> +      You need <productname>ZSTD</productname>, if you want to support
> 
> See: git grep -i ">zstd<"

It may not be worth changing just this one line, but the reason I included it
here is for consistency:

$ git grep 'zstd.*product' doc
doc/src/sgml/config.sgml:        <literal>zstd</literal> (if <productname>PostgreSQL</productname>
$ git grep 'ZSTD.*product' doc
doc/src/sgml/install-windows.sgml:     <term><productname>ZSTD</productname></term>
doc/src/sgml/install-windows.sgml:      Required for supporting <productname>ZSTD</productname> compression
doc/src/sgml/installation.sgml:      You need <productname>ZSTD</productname>, if you want to support
doc/src/sgml/installation.sgml:         Build with <productname>ZSTD</productname> compression support.

If we were to change it, maybe they should all say "Zstandard (zstd)".  ZSTD
looks like an acronym, which I think it is not, and Zstandard indicates how to
pronounce it.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-19 11:05  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 2 replies; 54+ messages in thread

From: Alvaro Herrera @ 2022-04-19 11:05 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <amit.kapila16@gmail.com>

CCing Amit K, because I propose a few relatively minor changes to
logical rep docs.

On 2022-Apr-13, Justin Pryzby wrote:

> $ git grep -F ", the default)"
> doc/src/sgml/ref/create_publication.sgml:   partition's row filter (if the parameter is false, the default) or the root
> 
> Maybe what's needed is more like this.
> 
>    If the publication contains a partitioned table, and the publication parameter
>    <literal>publish_via_partition_root</literal> is false (the default), then the
>    row filter is taken from the partition; otherwise, the row filter is taken
>    from the root partitioned table.

Yeah, more invasive rewording seems called for.  I propose this:

   For publications containing partitioned tables, the row filter for each
   partition is taken from the published partitioned table if the
   publication parameter <literal>publish_via_partition_root</literal> is true,
   or from the partition itself if it is false (the default).

I think we should also mention that this parameter affects row filters,
in the <varlistentry> for the WITH clause.  Currently it has

        <term><literal>publish_via_partition_root</literal> (<type>boolean</type>)</term>
        <listitem>
         <para>
          This parameter determines whether changes in a partitioned table (or
          on its partitions) contained in the publication will be published
          using the identity and schema of the partitioned table rather than
          that of the individual partitions that are actually changed; the
          latter is the default.  Enabling this allows the changes to be
          replicated into a non-partitioned table or a partitioned table
          consisting of a different set of partitions.
         </para>

I propose to add 

        <term><literal>publish_via_partition_root</literal> (<type>boolean</type>)</term>
        <listitem>
         <para>
          This parameter determines whether changes in a partitioned table (or
          on its partitions) contained in the publication will be published
          using the identity and schema of the partitioned table rather than
          that of the individual partitions that are actually changed; the
          latter is the default.  Enabling this allows the changes to be
          replicated into a non-partitioned table or a partitioned table
          consisting of a different set of partitions.
         </para>

        <para>
         This parameter also affects how row filters are chosen for partitions;
         see below for details.
        </para>

More generally, I think we need to connect the WHERE keyword with "row
filters" more explicitly.  Right now, the parameter reference says

      If the optional <literal>WHERE</literal> clause is specified, rows for
      which the <replaceable class="parameter">expression</replaceable>
      evaluates to false or null will not be published. Note that parentheses
      are required around the expression. It has no effect on
      <literal>TRUNCATE</literal> commands.

I propose to make it "If the optional WHERE clause is specified, it
defines a <firstterm>row filter</firstterm> expression.  Rows for which
the row filter expression evaluates to false ..."


> $ git grep 'zstd.*product' doc
> doc/src/sgml/config.sgml:        <literal>zstd</literal> (if <productname>PostgreSQL</productname>
> $ git grep 'ZSTD.*product' doc
> doc/src/sgml/install-windows.sgml:     <term><productname>ZSTD</productname></term>
> doc/src/sgml/install-windows.sgml:      Required for supporting <productname>ZSTD</productname> compression
> doc/src/sgml/installation.sgml:      You need <productname>ZSTD</productname>, if you want to support
> doc/src/sgml/installation.sgml:         Build with <productname>ZSTD</productname> compression support.

I don't see any official sources calling it all-uppercase ZSTD.  In a
quick non-scientific survey, most seem to use Zstd or zstd.  The
non-abbreviated official name is Zstandard, but it's hard to find any
places using that spelling, and I don't think our docs are a place to
educate people on what the official name or pronunciation is.

I propose we standardize on <productname>Zstd</productname> everywhere.
Users can look it up if they're really interested.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-20 03:49  Amit Kapila <amit.kapila16@gmail.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 1 reply; 54+ messages in thread

From: Amit Kapila @ 2022-04-20 03:49 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

On Tue, Apr 19, 2022 at 4:35 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> Yeah, more invasive rewording seems called for.  I propose this:
>
>    For publications containing partitioned tables, the row filter for each
>    partition is taken from the published partitioned table if the
>    publication parameter <literal>publish_via_partition_root</literal> is true,
>    or from the partition itself if it is false (the default).
>
> I think we should also mention that this parameter affects row filters,
> in the <varlistentry> for the WITH clause.  Currently it has
>
>         <term><literal>publish_via_partition_root</literal> (<type>boolean</type>)</term>
>         <listitem>
>          <para>
>           This parameter determines whether changes in a partitioned table (or
>           on its partitions) contained in the publication will be published
>           using the identity and schema of the partitioned table rather than
>           that of the individual partitions that are actually changed; the
>           latter is the default.  Enabling this allows the changes to be
>           replicated into a non-partitioned table or a partitioned table
>           consisting of a different set of partitions.
>          </para>
>
> I propose to add
>
>         <term><literal>publish_via_partition_root</literal> (<type>boolean</type>)</term>
>         <listitem>
>          <para>
>           This parameter determines whether changes in a partitioned table (or
>           on its partitions) contained in the publication will be published
>           using the identity and schema of the partitioned table rather than
>           that of the individual partitions that are actually changed; the
>           latter is the default.  Enabling this allows the changes to be
>           replicated into a non-partitioned table or a partitioned table
>           consisting of a different set of partitions.
>          </para>
>
>         <para>
>          This parameter also affects how row filters are chosen for partitions;
>          see below for details.
>         </para>
>

Your proposed changes look good to me but I think all these places
need to mention 'column list' as well because the behavior is the same
for it.

> More generally, I think we need to connect the WHERE keyword with "row
> filters" more explicitly.  Right now, the parameter reference says
>
>       If the optional <literal>WHERE</literal> clause is specified, rows for
>       which the <replaceable class="parameter">expression</replaceable>
>       evaluates to false or null will not be published. Note that parentheses
>       are required around the expression. It has no effect on
>       <literal>TRUNCATE</literal> commands.
>
> I propose to make it "If the optional WHERE clause is specified, it
> defines a <firstterm>row filter</firstterm> expression.  Rows for which
> the row filter expression evaluates to false ..."
>

Looks good to me.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-20 12:01  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Alvaro Herrera @ 2022-04-20 12:01 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

On 2022-Apr-20, Amit Kapila wrote:

> Your proposed changes look good to me but I think all these places
> need to mention 'column list' as well because the behavior is the same
> for it.

Hmm, you're right.  Added that, and changed the wording somewhat because
some things read awkwardly.  Here's the result in patch form.

Column lists seems not mentioned in logical-replication.sgml, either.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"La verdad no siempre es bonita, pero el hambre de ella sí"

Attachments:

  [text/x-diff] rowfilter-doc.patch (3.0K, ../../202204201201.ecwdyys7lg3l@alvherre.pgsql/2-rowfilter-doc.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml
index 23d883c158..c58478e8f8 100644
--- a/doc/src/sgml/ref/create_publication.sgml
+++ b/doc/src/sgml/ref/create_publication.sgml
@@ -79,7 +79,8 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
      </para>
 
      <para>
-      If the optional <literal>WHERE</literal> clause is specified, rows for
+      If the optional <literal>WHERE</literal> clause is specified, it defines a
+      <firstterm>row filter</firstterm> expression. Rows for
       which the <replaceable class="parameter">expression</replaceable>
       evaluates to false or null will not be published. Note that parentheses
       are required around the expression. It has no effect on
@@ -192,6 +193,11 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
           consisting of a different set of partitions.
          </para>
 
+         <para>
+          This parameter also affects how row filters and column lists are
+          chosen for partitions; see below for details.
+         </para>
+
          <para>
           If this is enabled, <literal>TRUNCATE</literal> operations performed
           directly on partitions are not replicated.
@@ -241,21 +247,28 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
   </para>
 
   <para>
-   A <literal>WHERE</literal> (i.e. row filter) expression must contain only
+   A row filter expression (i.e., the <literal>WHERE</literal> clause) must contain only
    columns that are covered by the <literal>REPLICA IDENTITY</literal>, in
    order for <command>UPDATE</command> and <command>DELETE</command> operations
    to be published. For publication of <command>INSERT</command> operations,
    any column may be used in the <literal>WHERE</literal> expression. The
-   <literal>WHERE</literal> clause allows simple expressions that don't have
+   row filter allows simple expressions that don't have
    user-defined functions, user-defined operators, user-defined types,
    user-defined collations, non-immutable built-in functions, or references to
    system columns.
-   If your publication contains a partitioned table, the publication parameter
-   <literal>publish_via_partition_root</literal> determines if it uses the
-   partition's row filter (if the parameter is false, the default) or the root
-   partitioned table's row filter.
+  </para>
+  
+  <para>
+   For published partitioned tables, the row filter for each
+   partition is taken from the published partitioned table if the
+   publication parameter <literal>publish_via_partition_root</literal> is true,
+   or from the partition itself if it is false (the default).
    See <xref linkend="logical-replication-row-filter"/> for details about row
    filters.
+   Similarly, for published partitioned tables, the column list for each
+   partition is taken from the published partitioned table if the
+   publication parameter <literal>publish_via_partition_root</literal> is true,
+   or from the partition itself if it is false.
   </para>
 
   <para>

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-20 21:32  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 2 replies; 54+ messages in thread

From: Alvaro Herrera @ 2022-04-20 21:32 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <amit.kapila16@gmail.com>

On 2022-Apr-19, Alvaro Herrera wrote:

> I propose we standardize on <productname>Zstd</productname> everywhere.
> Users can look it up if they're really interested.

So the attached.

There are other uses of <literal>zstd</literal>, but those are referring to the
executable program.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"No necesitamos banderas
 No reconocemos fronteras"                  (Jorge González)

Attachments:

  [text/x-diff] 0001-Zstd.patch (2.3K, ../../202204202132.qu3fgasip3o5@alvherre.pgsql/2-0001-Zstd.patch)
  download | inline diff:
From 256904cc5a8718ac081dbf51f6263ab022e503f6 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Wed, 20 Apr 2022 23:26:28 +0200
Subject: [PATCH] Zstd

---
 doc/src/sgml/install-windows.sgml | 6 +++---
 doc/src/sgml/installation.sgml    | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index 43cc5f6f5b..104670d295 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -307,9 +307,9 @@ $ENV{MSBFLAGS}="/m";
     </varlistentry>
 
     <varlistentry>
-     <term><productname>ZSTD</productname></term>
+     <term><productname>Zstd</productname></term>
      <listitem><para>
-      Required for supporting <productname>ZSTD</productname> compression
+      Required for supporting <productname>Zstd</productname> compression
       method. Binaries and source can be downloaded from
       <ulink url="https://github.com/facebook/zstd/releases"></ulink>.
      </para></listitem>
@@ -560,7 +560,7 @@ $ENV{PROVE_TESTS}='t/020*.pl t/010*.pl'
     <varlistentry>
      <term><varname>ZSTD</varname></term>
      <listitem><para>
-      Path to a <application>zstd</application> command. The default is
+      Path to a <application>Zstd</application> command. The default is
       <literal>zstd</literal>, which will search for a command by that
       name in the configured <envar>PATH</envar>.
      </para></listitem>
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index df32025a86..c60484e221 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -273,7 +273,7 @@ su - postgres
 
     <listitem>
      <para>
-      You need <productname>zstd</productname>, if you want to support
+      You need <productname>Zstd</productname>, if you want to support
       compression of data with that method; see
       <xref linkend="guc-wal-compression"/>.
       The minimum required version is 1.4.0.
@@ -996,7 +996,7 @@ build-postgresql:
        <term><option>--with-zstd</option></term>
        <listitem>
         <para>
-         Build with <productname>ZSTD</productname> compression support.
+         Build with <productname>Zstd</productname> compression support.
         </para>
        </listitem>
       </varlistentry>
-- 
2.30.2

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-20 21:38  Justin Pryzby <pryzby@telsasoft.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-04-20 21:38 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <amit.kapila16@gmail.com>

On Wed, Apr 20, 2022 at 11:32:08PM +0200, Alvaro Herrera wrote:
> On 2022-Apr-19, Alvaro Herrera wrote:
> 
> > I propose we standardize on <productname>Zstd</productname> everywhere.
> > Users can look it up if they're really interested.
> 
> So the attached.
> 
> There are other uses of <literal>zstd</literal>, but those are referring to the
> executable program.

This one shouldn't be changed, or not like this?

> @@ -560,7 +560,7 @@ $ENV{PROVE_TESTS}='t/020*.pl t/010*.pl'
>      <varlistentry>
>       <term><varname>ZSTD</varname></term>
>       <listitem><para>
> -      Path to a <application>zstd</application> command. The default is
> +      Path to a <application>Zstd</application> command. The default is
>        <literal>zstd</literal>, which will search for a command by that
>        name in the configured <envar>PATH</envar>.
>       </para></listitem>

Maybe it should say s/a/the/, like:

-      Path to a <application>zstd</application> command. The default is
+      Path to the <application>zstd</application> command. The default is





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-21 02:25  Amit Kapila <amit.kapila16@gmail.com>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 54+ messages in thread

From: Amit Kapila @ 2022-04-21 02:25 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>

On Wed, Apr 20, 2022 at 5:31 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2022-Apr-20, Amit Kapila wrote:
>
> > Your proposed changes look good to me but I think all these places
> > need to mention 'column list' as well because the behavior is the same
> > for it.
>
> Hmm, you're right.  Added that, and changed the wording somewhat because
> some things read awkwardly.  Here's the result in patch form.
>

LGTM.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-21 04:36  Michael Paquier <michael@paquier.xyz>
  parent: Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2022-04-21 04:36 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <amit.kapila16@gmail.com>

On Wed, Apr 20, 2022 at 11:32:08PM +0200, Alvaro Herrera wrote:
> So the attached.
> 
> --- a/doc/src/sgml/install-windows.sgml
> +++ b/doc/src/sgml/install-windows.sgml
> @@ -307,9 +307,9 @@ $ENV{MSBFLAGS}="/m";
>      </varlistentry>
>  
>      <varlistentry>
> -     <term><productname>ZSTD</productname></term>
> +     <term><productname>Zstd</productname></term>
>       <listitem><para>
> -      Required for supporting <productname>ZSTD</productname> compression
> +      Required for supporting <productname>Zstd</productname> compression

Looking at the zstd project itself for reference or just wiki-sensei,
I don't think that this is correct:
https://github.com/facebook/zstd
https://en.wikipedia.org/wiki/Zstd

Their README uses "zstd" in lower-case, while "Zstd" (first letter
upper-case) is used at the beginning of a sentence.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../YmDfTbMhNtOTWoLL@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-21 13:59  Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 54+ messages in thread

From: Peter Eisentraut @ 2022-04-21 13:59 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <amit.kapila16@gmail.com>

On 21.04.22 06:36, Michael Paquier wrote:
> On Wed, Apr 20, 2022 at 11:32:08PM +0200, Alvaro Herrera wrote:
>> So the attached.
>>
>> --- a/doc/src/sgml/install-windows.sgml
>> +++ b/doc/src/sgml/install-windows.sgml
>> @@ -307,9 +307,9 @@ $ENV{MSBFLAGS}="/m";
>>       </varlistentry>
>>   
>>       <varlistentry>
>> -     <term><productname>ZSTD</productname></term>
>> +     <term><productname>Zstd</productname></term>
>>        <listitem><para>
>> -      Required for supporting <productname>ZSTD</productname> compression
>> +      Required for supporting <productname>Zstd</productname> compression
> 
> Looking at the zstd project itself for reference or just wiki-sensei,
> I don't think that this is correct:
> https://github.com/facebook/zstd
> https://en.wikipedia.org/wiki/Zstd
> 
> Their README uses "zstd" in lower-case, while "Zstd" (first letter
> upper-case) is used at the beginning of a sentence.

It is referred to as "Zstandard" at both of those places.  Maybe we 
should use that.  That is also easier to pronounce.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-04-21 17:16  Alvaro Herrera <alvherre@alvh.no-ip.org>
  parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Alvaro Herrera @ 2022-04-21 17:16 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: Michael Paquier <michael@paquier.xyz>; Justin Pryzby <pryzby@telsasoft.com>; David Rowley <dgrowleyml@gmail.com>; pgsql-hackers@postgresql.org, Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <amit.kapila16@gmail.com>

On 2022-Apr-21, Peter Eisentraut wrote:

> It is referred to as "Zstandard" at both of those places.  Maybe we should
> use that.  That is also easier to pronounce.

Yeah, I looked at other places (such as Yann Collet's blog) and I agree
that Zstandard seems to be the accepted spelling of the product.  Pushed
that way.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
Tom: There seems to be something broken here.
Teodor: I'm in sackcloth and ashes...  Fixed.
        http://archives.postgresql.org/message-id/482D1632.8010507@sigaev.ru





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* [PATCH v2022051001 2/2] typos
@ 2022-05-11 00:02  Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Justin Pryzby @ 2022-05-11 00:02 UTC (permalink / raw)

---
 contrib/citext/expected/citext.out          | 2 +-
 contrib/citext/expected/citext_1.out        | 2 +-
 contrib/citext/sql/citext.sql               | 2 +-
 src/backend/executor/execGrouping.c         | 2 +-
 src/backend/parser/parse_expr.c             | 2 +-
 src/backend/replication/basebackup_target.c | 2 +-
 src/backend/utils/adt/int8.c                | 2 +-
 src/bin/pg_basebackup/bbstreamer_tar.c      | 2 +-
 src/bin/pg_rewind/t/007_standby_source.pl   | 2 +-
 src/bin/pg_rewind/t/009_growing_files.pl    | 2 +-
 src/test/regress/expected/psql.out          | 2 +-
 src/test/regress/sql/psql.sql               | 2 +-
 src/test/ssl/t/SSL/Backend/OpenSSL.pm       | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 5afcc50920e..1c555981363 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -2270,7 +2270,7 @@ SELECT COUNT(*) = 8::bigint AS t FROM try;
 
 INSERT INTO try
 VALUES ( to_char(  now()::timestamp,          'HH12:MI:SS') ),
-       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timetamptz
+       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timestamptz
        ( to_char(  '15h 2m 12s'::interval,    'HH24:MI:SS') ),
        ( to_char(  current_date,              '999') ),
        ( to_char(  125::int,                  '999') ),
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index 8aa2b9e1dbc..4a979d7a0d9 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -2270,7 +2270,7 @@ SELECT COUNT(*) = 8::bigint AS t FROM try;
 
 INSERT INTO try
 VALUES ( to_char(  now()::timestamp,          'HH12:MI:SS') ),
-       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timetamptz
+       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timestamptz
        ( to_char(  '15h 2m 12s'::interval,    'HH24:MI:SS') ),
        ( to_char(  current_date,              '999') ),
        ( to_char(  125::int,                  '999') ),
diff --git a/contrib/citext/sql/citext.sql b/contrib/citext/sql/citext.sql
index 8c87be6b1d2..b329253d379 100644
--- a/contrib/citext/sql/citext.sql
+++ b/contrib/citext/sql/citext.sql
@@ -696,7 +696,7 @@ SELECT to_timestamp('05 Dec 2000',         'DD Mon YYYY'::citext)
 SELECT COUNT(*) = 8::bigint AS t FROM try;
 INSERT INTO try
 VALUES ( to_char(  now()::timestamp,          'HH12:MI:SS') ),
-       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timetamptz
+       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timestamptz
        ( to_char(  '15h 2m 12s'::interval,    'HH24:MI:SS') ),
        ( to_char(  current_date,              '999') ),
        ( to_char(  125::int,                  '999') ),
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index 5da4b375300..0cc54a3449e 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -246,7 +246,7 @@ BuildTupleHashTableExt(PlanState *parent,
 }
 
 /*
- * BuildTupleHashTable is a backwards-compatibilty wrapper for
+ * BuildTupleHashTable is a backwards-compatibility wrapper for
  * BuildTupleHashTableExt(), that allocates the hashtable's metadata in
  * tablecxt. Note that hashtables created this way cannot be reset leak-free
  * with ResetTupleHashTable().
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 33eb19a33fc..c1f194cc5b0 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -4536,7 +4536,7 @@ transformJsonParseExpr(ParseState *pstate, JsonParseExpr *jsexpr)
 	else
 	{
 		/*
-		 * Coerce argument to target type using CAST for compatibilty with PG
+		 * Coerce argument to target type using CAST for compatibility with PG
 		 * function-like CASTs.
 		 */
 		arg = transformJsonValueExprExt(pstate, jsexpr->expr, JS_FORMAT_JSON,
diff --git a/src/backend/replication/basebackup_target.c b/src/backend/replication/basebackup_target.c
index cff65611ef6..faa80b2f2ec 100644
--- a/src/backend/replication/basebackup_target.c
+++ b/src/backend/replication/basebackup_target.c
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * basebackup_target.c
- *	  Base backups can be "targetted," which means that they can be sent
+ *	  Base backups can be "targeted," which means that they can be sent
  *	  somewhere other than to the client which requested the backup.
  *	  Furthermore, new targets can be defined by extensions. This file
  *	  contains code to support that functionality.
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index 98d43237556..c7448ec565e 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -1171,7 +1171,7 @@ int28div(PG_FUNCTION_ARGS)
 	PG_RETURN_INT64((int64) arg1 / arg2);
 }
 
-/* Binary arithmetics
+/* Binary arithmetic
  *
  *		int8and		- returns arg1 & arg2
  *		int8or		- returns arg1 | arg2
diff --git a/src/bin/pg_basebackup/bbstreamer_tar.c b/src/bin/pg_basebackup/bbstreamer_tar.c
index fcbad579df1..ef5586c488f 100644
--- a/src/bin/pg_basebackup/bbstreamer_tar.c
+++ b/src/bin/pg_basebackup/bbstreamer_tar.c
@@ -423,7 +423,7 @@ bbstreamer_tar_archiver_content(bbstreamer *streamer,
 		data = buffer;
 		len = pad_bytes;
 
-		/* Don't do this agian unless we replace another header. */
+		/* Don't do this again unless we replace another header. */
 		mystreamer->rearchive_member = false;
 	}
 	else if (context == BBSTREAMER_ARCHIVE_TRAILER)
diff --git a/src/bin/pg_rewind/t/007_standby_source.pl b/src/bin/pg_rewind/t/007_standby_source.pl
index 47320ea5a67..f89a4df09d9 100644
--- a/src/bin/pg_rewind/t/007_standby_source.pl
+++ b/src/bin/pg_rewind/t/007_standby_source.pl
@@ -141,7 +141,7 @@ move(
 # Restart the node.
 $node_c->start;
 
-# set RewindTest::node_primary to point to the rewinded node, so that we can
+# set RewindTest::node_primary to point to the rewound node, so that we can
 # use check_query()
 $node_primary = $node_c;
 
diff --git a/src/bin/pg_rewind/t/009_growing_files.pl b/src/bin/pg_rewind/t/009_growing_files.pl
index 2c81406cc07..a5a58dbe060 100644
--- a/src/bin/pg_rewind/t/009_growing_files.pl
+++ b/src/bin/pg_rewind/t/009_growing_files.pl
@@ -47,7 +47,7 @@ mkdir "$standby_pgdata/tst_both_dir";
 append_to_file "$standby_pgdata/tst_both_dir/file1", 'a';
 
 # Run pg_rewind and pipe the output from the run into the extra file we want
-# to copy. This will ensure that the file is continously growing during the
+# to copy. This will ensure that the file is continuously growing during the
 # copy operation and the result will be an error.
 my $ret = run_log(
 	[
diff --git a/src/test/regress/expected/psql.out b/src/test/regress/expected/psql.out
index 1c5b5d2763d..2a38a93a3b3 100644
--- a/src/test/regress/expected/psql.out
+++ b/src/test/regress/expected/psql.out
@@ -5481,7 +5481,7 @@ INSERT INTO bla VALUES ('Susie');         -- succeeds
 INSERT INTO bla VALUES ('Rosalyn') \;     -- will rollback
 SELECT 'before error' AS show \;          -- will show nevertheless!
   SELECT psql_error('boum!') \;           -- failure
-  SELECT 'after error' AS noshow;         -- hidden by preceeding error
+  SELECT 'after error' AS noshow;         -- hidden by preceding error
      show     
 --------------
  before error
diff --git a/src/test/regress/sql/psql.sql b/src/test/regress/sql/psql.sql
index 6fc0ac6bd17..1149c6a839e 100644
--- a/src/test/regress/sql/psql.sql
+++ b/src/test/regress/sql/psql.sql
@@ -1432,7 +1432,7 @@ INSERT INTO bla VALUES ('Susie');         -- succeeds
 INSERT INTO bla VALUES ('Rosalyn') \;     -- will rollback
 SELECT 'before error' AS show \;          -- will show nevertheless!
   SELECT psql_error('boum!') \;           -- failure
-  SELECT 'after error' AS noshow;         -- hidden by preceeding error
+  SELECT 'after error' AS noshow;         -- hidden by preceding error
 INSERT INTO bla(s) VALUES ('Moe') \;      -- will rollback
   SELECT psql_error('bam!');
 INSERT INTO bla VALUES ('Miss Wormwood'); -- succeeds
diff --git a/src/test/ssl/t/SSL/Backend/OpenSSL.pm b/src/test/ssl/t/SSL/Backend/OpenSSL.pm
index 1546b5081ba..d6d99fa636a 100644
--- a/src/test/ssl/t/SSL/Backend/OpenSSL.pm
+++ b/src/test/ssl/t/SSL/Backend/OpenSSL.pm
@@ -135,7 +135,7 @@ sub get_sslkey
 =item $backend->set_server_cert(params)
 
 Change the configuration to use given server cert, key and crl file(s). The
-following paramters are supported:
+following parameters are supported:
 
 =over
 
-- 
2.17.1


--IiVenqGWf+H9Y6IX--





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-05-11 02:03  Justin Pryzby <pryzby@telsasoft.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-05-11 02:03 UTC (permalink / raw)
  To: pgsql-hackers

I found a bunch more typos; a couple from codespell, and several which are the
result of looking for previously-reported typos, like:

time git log origin --grep '[tT]ypo' --word-diff -U1 |grep -Eo '\[-[[:lower:]]+-\]' |sed 's/^\[-//; s/-\]$//' |sort -u |grep -Fxvwf /usr/share/dict/words >badwords.txt
time grep -rhoFwf badwords.txt doc |sort -u >not-badwords.txt
time grep -Fxvwf not-badwords.txt ./badwords.txt >./badwords.txt.new
time grep -rhoIFwf ./badwords.txt.new src --incl='*.[chly]' --incl='*.p[lm]' |sort |uniq -c |sort -nr |less

Attachments:

  [text/x-diff] v2022051001-0001-doc-ANDed-and-ORed.patch (3.3K, ../../20220511020334.GH19626@telsasoft.com/2-v2022051001-0001-doc-ANDed-and-ORed.patch)
  download | inline diff:
From 2166aa51840094f4b738f4a9af1ad6bd94a97cff Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 18 Apr 2022 10:13:09 -0500
Subject: [PATCH v2022051001 1/2] doc: ANDed and ORed

---
 doc/src/sgml/indexam.sgml             | 2 +-
 doc/src/sgml/indices.sgml             | 4 ++--
 doc/src/sgml/logical-replication.sgml | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index d4163c96e9f..16669f4086a 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -843,7 +843,7 @@ amparallelrescan (IndexScanDesc scan);
    <replaceable>constant</replaceable>, where the index key is one of the columns of the
    index and the operator is one of the members of the operator family
    associated with that index column.  An index scan has zero or more scan
-   keys, which are implicitly ANDed &mdash; the returned tuples are expected
+   keys, which are implicitly AND-ed &mdash; the returned tuples are expected
    to satisfy all the indicated conditions.
   </para>
 
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
index 023157d8884..890c6d3451c 100644
--- a/doc/src/sgml/indices.sgml
+++ b/doc/src/sgml/indices.sgml
@@ -597,7 +597,7 @@ CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST);
    a query like <literal>WHERE x = 42 OR x = 47 OR x = 53 OR x = 99</literal>
    could be broken down into four separate scans of an index on <literal>x</literal>,
    each scan using one of the query clauses.  The results of these scans are
-   then ORed together to produce the result.  Another example is that if we
+   then OR-ed together to produce the result.  Another example is that if we
    have separate indexes on <literal>x</literal> and <literal>y</literal>, one possible
    implementation of a query like <literal>WHERE x = 5 AND y = 6</literal> is to
    use each index with the appropriate query clause and then AND together
@@ -608,7 +608,7 @@ CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST);
    To combine multiple indexes, the system scans each needed index and
    prepares a <firstterm>bitmap</firstterm> in memory giving the locations of
    table rows that are reported as matching that index's conditions.
-   The bitmaps are then ANDed and ORed together as needed by the query.
+   The bitmaps are then AND-ed and OR-ed together as needed by the query.
    Finally, the actual table rows are visited and returned.  The table rows
    are visited in physical order, because that is how the bitmap is laid
    out; this means that any ordering of the original indexes is lost, and
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index 145ea71d61b..d2939fec71c 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -477,7 +477,7 @@
    <para>
     If the subscription has several publications in which the same table has
     been published with different row filters (for the same <literal>publish</literal>
-    operation), those expressions get ORed together, so that rows satisfying
+    operation), those expressions get OR-ed together, so that rows satisfying
     <emphasis>any</emphasis> of the expressions will be replicated. This means all
     the other row filters for the same table become redundant if:
     <itemizedlist>
-- 
2.17.1

  [text/x-diff] v2022051001-0002-typos.patch (8.6K, ../../20220511020334.GH19626@telsasoft.com/3-v2022051001-0002-typos.patch)
  download | inline diff:
From a566141ebb01fc48cb766339553b600755ca4dca Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 10 May 2022 19:02:02 -0500
Subject: [PATCH v2022051001 2/2] typos

---
 contrib/citext/expected/citext.out          | 2 +-
 contrib/citext/expected/citext_1.out        | 2 +-
 contrib/citext/sql/citext.sql               | 2 +-
 src/backend/executor/execGrouping.c         | 2 +-
 src/backend/parser/parse_expr.c             | 2 +-
 src/backend/replication/basebackup_target.c | 2 +-
 src/backend/utils/adt/int8.c                | 2 +-
 src/bin/pg_basebackup/bbstreamer_tar.c      | 2 +-
 src/bin/pg_rewind/t/007_standby_source.pl   | 2 +-
 src/bin/pg_rewind/t/009_growing_files.pl    | 2 +-
 src/test/regress/expected/psql.out          | 2 +-
 src/test/regress/sql/psql.sql               | 2 +-
 src/test/ssl/t/SSL/Backend/OpenSSL.pm       | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 5afcc50920e..1c555981363 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -2270,7 +2270,7 @@ SELECT COUNT(*) = 8::bigint AS t FROM try;
 
 INSERT INTO try
 VALUES ( to_char(  now()::timestamp,          'HH12:MI:SS') ),
-       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timetamptz
+       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timestamptz
        ( to_char(  '15h 2m 12s'::interval,    'HH24:MI:SS') ),
        ( to_char(  current_date,              '999') ),
        ( to_char(  125::int,                  '999') ),
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index 8aa2b9e1dbc..4a979d7a0d9 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -2270,7 +2270,7 @@ SELECT COUNT(*) = 8::bigint AS t FROM try;
 
 INSERT INTO try
 VALUES ( to_char(  now()::timestamp,          'HH12:MI:SS') ),
-       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timetamptz
+       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timestamptz
        ( to_char(  '15h 2m 12s'::interval,    'HH24:MI:SS') ),
        ( to_char(  current_date,              '999') ),
        ( to_char(  125::int,                  '999') ),
diff --git a/contrib/citext/sql/citext.sql b/contrib/citext/sql/citext.sql
index 8c87be6b1d2..b329253d379 100644
--- a/contrib/citext/sql/citext.sql
+++ b/contrib/citext/sql/citext.sql
@@ -696,7 +696,7 @@ SELECT to_timestamp('05 Dec 2000',         'DD Mon YYYY'::citext)
 SELECT COUNT(*) = 8::bigint AS t FROM try;
 INSERT INTO try
 VALUES ( to_char(  now()::timestamp,          'HH12:MI:SS') ),
-       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timetamptz
+       ( to_char(  now() + '1 sec'::interval, 'HH12:MI:SS') ), -- timestamptz
        ( to_char(  '15h 2m 12s'::interval,    'HH24:MI:SS') ),
        ( to_char(  current_date,              '999') ),
        ( to_char(  125::int,                  '999') ),
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index 5da4b375300..0cc54a3449e 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -246,7 +246,7 @@ BuildTupleHashTableExt(PlanState *parent,
 }
 
 /*
- * BuildTupleHashTable is a backwards-compatibilty wrapper for
+ * BuildTupleHashTable is a backwards-compatibility wrapper for
  * BuildTupleHashTableExt(), that allocates the hashtable's metadata in
  * tablecxt. Note that hashtables created this way cannot be reset leak-free
  * with ResetTupleHashTable().
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 33eb19a33fc..c1f194cc5b0 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -4536,7 +4536,7 @@ transformJsonParseExpr(ParseState *pstate, JsonParseExpr *jsexpr)
 	else
 	{
 		/*
-		 * Coerce argument to target type using CAST for compatibilty with PG
+		 * Coerce argument to target type using CAST for compatibility with PG
 		 * function-like CASTs.
 		 */
 		arg = transformJsonValueExprExt(pstate, jsexpr->expr, JS_FORMAT_JSON,
diff --git a/src/backend/replication/basebackup_target.c b/src/backend/replication/basebackup_target.c
index cff65611ef6..faa80b2f2ec 100644
--- a/src/backend/replication/basebackup_target.c
+++ b/src/backend/replication/basebackup_target.c
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * basebackup_target.c
- *	  Base backups can be "targetted," which means that they can be sent
+ *	  Base backups can be "targeted," which means that they can be sent
  *	  somewhere other than to the client which requested the backup.
  *	  Furthermore, new targets can be defined by extensions. This file
  *	  contains code to support that functionality.
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index 98d43237556..c7448ec565e 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -1171,7 +1171,7 @@ int28div(PG_FUNCTION_ARGS)
 	PG_RETURN_INT64((int64) arg1 / arg2);
 }
 
-/* Binary arithmetics
+/* Binary arithmetic
  *
  *		int8and		- returns arg1 & arg2
  *		int8or		- returns arg1 | arg2
diff --git a/src/bin/pg_basebackup/bbstreamer_tar.c b/src/bin/pg_basebackup/bbstreamer_tar.c
index fcbad579df1..ef5586c488f 100644
--- a/src/bin/pg_basebackup/bbstreamer_tar.c
+++ b/src/bin/pg_basebackup/bbstreamer_tar.c
@@ -423,7 +423,7 @@ bbstreamer_tar_archiver_content(bbstreamer *streamer,
 		data = buffer;
 		len = pad_bytes;
 
-		/* Don't do this agian unless we replace another header. */
+		/* Don't do this again unless we replace another header. */
 		mystreamer->rearchive_member = false;
 	}
 	else if (context == BBSTREAMER_ARCHIVE_TRAILER)
diff --git a/src/bin/pg_rewind/t/007_standby_source.pl b/src/bin/pg_rewind/t/007_standby_source.pl
index 47320ea5a67..f89a4df09d9 100644
--- a/src/bin/pg_rewind/t/007_standby_source.pl
+++ b/src/bin/pg_rewind/t/007_standby_source.pl
@@ -141,7 +141,7 @@ move(
 # Restart the node.
 $node_c->start;
 
-# set RewindTest::node_primary to point to the rewinded node, so that we can
+# set RewindTest::node_primary to point to the rewound node, so that we can
 # use check_query()
 $node_primary = $node_c;
 
diff --git a/src/bin/pg_rewind/t/009_growing_files.pl b/src/bin/pg_rewind/t/009_growing_files.pl
index 2c81406cc07..a5a58dbe060 100644
--- a/src/bin/pg_rewind/t/009_growing_files.pl
+++ b/src/bin/pg_rewind/t/009_growing_files.pl
@@ -47,7 +47,7 @@ mkdir "$standby_pgdata/tst_both_dir";
 append_to_file "$standby_pgdata/tst_both_dir/file1", 'a';
 
 # Run pg_rewind and pipe the output from the run into the extra file we want
-# to copy. This will ensure that the file is continously growing during the
+# to copy. This will ensure that the file is continuously growing during the
 # copy operation and the result will be an error.
 my $ret = run_log(
 	[
diff --git a/src/test/regress/expected/psql.out b/src/test/regress/expected/psql.out
index 1c5b5d2763d..2a38a93a3b3 100644
--- a/src/test/regress/expected/psql.out
+++ b/src/test/regress/expected/psql.out
@@ -5481,7 +5481,7 @@ INSERT INTO bla VALUES ('Susie');         -- succeeds
 INSERT INTO bla VALUES ('Rosalyn') \;     -- will rollback
 SELECT 'before error' AS show \;          -- will show nevertheless!
   SELECT psql_error('boum!') \;           -- failure
-  SELECT 'after error' AS noshow;         -- hidden by preceeding error
+  SELECT 'after error' AS noshow;         -- hidden by preceding error
      show     
 --------------
  before error
diff --git a/src/test/regress/sql/psql.sql b/src/test/regress/sql/psql.sql
index 6fc0ac6bd17..1149c6a839e 100644
--- a/src/test/regress/sql/psql.sql
+++ b/src/test/regress/sql/psql.sql
@@ -1432,7 +1432,7 @@ INSERT INTO bla VALUES ('Susie');         -- succeeds
 INSERT INTO bla VALUES ('Rosalyn') \;     -- will rollback
 SELECT 'before error' AS show \;          -- will show nevertheless!
   SELECT psql_error('boum!') \;           -- failure
-  SELECT 'after error' AS noshow;         -- hidden by preceeding error
+  SELECT 'after error' AS noshow;         -- hidden by preceding error
 INSERT INTO bla(s) VALUES ('Moe') \;      -- will rollback
   SELECT psql_error('bam!');
 INSERT INTO bla VALUES ('Miss Wormwood'); -- succeeds
diff --git a/src/test/ssl/t/SSL/Backend/OpenSSL.pm b/src/test/ssl/t/SSL/Backend/OpenSSL.pm
index 1546b5081ba..d6d99fa636a 100644
--- a/src/test/ssl/t/SSL/Backend/OpenSSL.pm
+++ b/src/test/ssl/t/SSL/Backend/OpenSSL.pm
@@ -135,7 +135,7 @@ sub get_sslkey
 =item $backend->set_server_cert(params)
 
 Change the configuration to use given server cert, key and crl file(s). The
-following paramters are supported:
+following parameters are supported:
 
 =over
 
-- 
2.17.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-05-11 06:41  Michael Paquier <michael@paquier.xyz>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Michael Paquier @ 2022-05-11 06:41 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers

On Tue, May 10, 2022 at 09:03:34PM -0500, Justin Pryzby wrote:
> I found a bunch more typos; a couple from codespell, and several which are the
> result of looking for previously-reported typos, like:

Thanks, applied 0002.

Regarding 0001, I don't really know which one of {AND,OR}ed or
{AND,OR}-ed is better.  Note that the code prefers the former, but
your patch changes the docs to use the latter.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Yntal2Nsn7nw7VCW@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2022-07-05 07:51  Noah Misch <noah@leadboat.com>
  parent: David Rowley <dgrowleyml@gmail.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Noah Misch @ 2022-07-05 07:51 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; Robert Haas <robertmhaas@gmail.com>; Joe Conway <mail@joeconway.com>; pgsql-hackers; Fabien COELHO <coelho@cri.ensmp.fr>; Amit Kapila <akapila@postgresql.org>; Masahiko Sawada <sawada.mshk@gmail.com>

On Thu, Apr 14, 2022 at 08:56:22AM +1200, David Rowley wrote:
> 0007: Not pushed. No space after comment and closing */  pgindent
> fixed one of these but not the other 2.  I've not looked into why
> pgindent does 1 and not the other 2.

> -/* get operation priority  by its code*/
> +/* get operation priority by its code */

pgindent never touches comments that start in column zero.  (That's why many
column-0 comments are wrapped to widths other than the standard 78.)





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* [PATCH 1/4] typos
@ 2022-07-05 19:12  Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Justin Pryzby @ 2022-07-05 19:12 UTC (permalink / raw)

---
 doc/src/sgml/brin.sgml                  | 2 +-
 src/backend/commands/dbcommands.c       | 6 +++---
 src/include/replication/reorderbuffer.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml
index 4ee8908b65a..71697155d7c 100644
--- a/doc/src/sgml/brin.sgml
+++ b/doc/src/sgml/brin.sgml
@@ -75,7 +75,7 @@
    summarized will cause the summary information to be updated with data
    from the new tuples.
    When a new page is created that does not fall within the last
-   summarized range, the range that the new page belongs into
+   summarized range, the range that the new page belongs to
    does not automatically acquire a summary tuple;
    those tuples remain unsummarized until a summarization run is
    invoked later, creating the initial summary for that range.
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 7bc53f3a0bb..9f990a8d68f 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -188,7 +188,7 @@ CreateDatabaseUsingWalLog(Oid src_dboid, Oid dst_dboid,
 
 		/*
 		 * If the relation is from the source db's default tablespace then we
-		 * need to create it in the destinations db's default tablespace.
+		 * need to create it in the destination db's default tablespace.
 		 * Otherwise, we need to create in the same tablespace as it is in the
 		 * source database.
 		 */
@@ -1351,8 +1351,8 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
 	/*
 	 * If we're going to be reading data for the to-be-created database into
 	 * shared_buffers, take a lock on it. Nobody should know that this
-	 * database exists yet, but it's good to maintain the invariant that a
-	 * lock an AccessExclusiveLock on the database is sufficient to drop all
+	 * database exists yet, but it's good to maintain the invariant that an
+	 * AccessExclusiveLock on the database is sufficient to drop all
 	 * of its buffers without worrying about more being read later.
 	 *
 	 * Note that we need to do this before entering the
diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h
index d109d0baede..2c9206ace41 100644
--- a/src/include/replication/reorderbuffer.h
+++ b/src/include/replication/reorderbuffer.h
@@ -262,7 +262,7 @@ typedef struct ReorderBufferTXN
 	 * aborted. This can be a
 	 * * plain commit record
 	 * * plain commit record, of a parent transaction
-	 * * prepared tansaction
+	 * * prepared transaction
 	 * * prepared transaction commit
 	 * * plain abort record
 	 * * prepared transaction abort
-- 
2.17.1


--GN/IAAAoV4GJoJGS
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0002-fix-whitespace.patch"



^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* [PATCH 1/9] typos
@ 2022-09-25 23:40  Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Justin Pryzby @ 2022-09-25 23:40 UTC (permalink / raw)

---
 .cirrus.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 69837bcd5ad..048a004e309 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -655,7 +655,7 @@ task:
 
     # Use larger ccache cache, as this task compiles with multiple compilers /
     # flag combinations
-    CCACHE_MAXSIZE: "1GB"
+    CCACHE_MAXSIZE: "1G"
     CCACHE_DIR: "/tmp/ccache_dir"
 
     LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
-- 
2.25.1


--KFztAG8eRSV9hGtP
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0002-comments-grammar-extended-and-other-stats.patch"



^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* typos
@ 2022-12-30 23:12  Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2022-12-30 23:12 UTC (permalink / raw)
  To: pgsql-hackers@lists.postgresql.org



Attachments:

  [text/x-diff] 0001-doc-autoexplain-fix-tag-v16.patch (1.1K, ../../20221230231257.GI1153@telsasoft.com/2-0001-doc-autoexplain-fix-tag-v16.patch)
  download | inline diff:
From b2ce7e523abbe7cc91f08caa70eaa9e9c2526267 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 19 Oct 2022 22:04:50 -0500
Subject: [PATCH 01/16] doc: autoexplain: fix tag (v16)

since: d4bfe41281705c1bcb7093b3d07ce5ff1114341b

https://www.postgresql.org/docs/devel/auto-explain.html
---
 doc/src/sgml/auto-explain.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/auto-explain.sgml b/doc/src/sgml/auto-explain.sgml
index 394fec94e88..0899e55e4ca 100644
--- a/doc/src/sgml/auto-explain.sgml
+++ b/doc/src/sgml/auto-explain.sgml
@@ -73,7 +73,7 @@ LOAD 'auto_explain';
     <listitem>
      <para>
       <varname>auto_explain.log_parameter_max_length</varname> controls the
-      logging of query parameter values. A value of<literal>-1</literal> (the
+      logging of query parameter values. A value of <literal>-1</literal> (the
       default) logs the parameter values in full. <literal>0</literal> disables
       logging of parameter values. A value greater than zero truncates each
       parameter value to that many bytes. Only superusers can change this
-- 
2.25.1

  [text/x-diff] 0002-doc-acronym-UTF.patch (898B, ../../20221230231257.GI1153@telsasoft.com/3-0002-doc-acronym-UTF.patch)
  download | inline diff:
From 631bf8b4ec4c1ece010633ea94cd3a715d7d4134 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:46:20 -0500
Subject: [PATCH 02/16] doc: acronym: UTF

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

diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 445fd175d8e..b3376ee3162 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -74,7 +74,7 @@ initdb --locale=sv_SE
     locale then the specifications can take the form
     <replaceable>language_territory.codeset</replaceable>.  For example,
     <literal>fr_BE.UTF-8</literal> represents the French language (fr) as
-    spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set
+    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character set
     encoding.
    </para>
 
-- 
2.25.1

  [text/x-diff] 0003-doc-typo-since-v10.patch (1.0K, ../../20221230231257.GI1153@telsasoft.com/4-0003-doc-typo-since-v10.patch)
  download | inline diff:
From 4560d86efb47c3847357fc272b5243b6d823a418 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 2 Aug 2022 09:12:00 -0500
Subject: [PATCH 03/16] doc: typo since v10

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

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 43d782fea90..b1066e0efc3 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -1005,7 +1005,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
       constraint. This does not work, however, if any of the partition keys
       is an expression and the partition does not accept
       <literal>NULL</literal> values. If attaching a list partition that will
-      not accept <literal>NULL</literal> values, also add
+      not accept <literal>NULL</literal> values, also add a
       <literal>NOT NULL</literal> constraint to the partition key column,
       unless it's an expression.
      </para>
-- 
2.25.1

  [text/x-diff] 0004-doc-language-fix.patch (963B, ../../20221230231257.GI1153@telsasoft.com/5-0004-doc-language-fix.patch)
  download | inline diff:
From 3f90597c3c175b8bb52584a61489cffcc3a24502 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 7 Sep 2022 13:57:44 -0500
Subject: [PATCH 04/16] doc: language fix

https://www.postgresql.org/message-id/166003595133.302446.16110073265340131615%40wrigleys.postgresql.org
---
 doc/src/sgml/parallel.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml
index e556786e2bd..5acc9537d6f 100644
--- a/doc/src/sgml/parallel.sgml
+++ b/doc/src/sgml/parallel.sgml
@@ -128,7 +128,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
 
   <para>
     In addition, the system must not be running in single-user mode.  Since
-    the entire database system is running in single process in this situation,
+    the entire database system is running as a single process in this situation,
     no background workers will be available.
   </para>
 
-- 
2.25.1

  [text/x-diff] 0005-doc-comma.patch (2.9K, ../../20221230231257.GI1153@telsasoft.com/6-0005-doc-comma.patch)
  download | inline diff:
From 872ccbe2855d1d8e7b107f52629fc18aa6a87b47 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 22 Feb 2022 07:44:06 -0600
Subject: [PATCH 05/16] doc: comma

---
 doc/src/sgml/ref/alter_table.sgml         | 2 +-
 doc/src/sgml/ref/create_subscription.sgml | 2 +-
 doc/src/sgml/sources.sgml                 | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index b1066e0efc3..892df57f702 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -1377,7 +1377,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     type or an unconstrained domain over the new type, a table rewrite is not
     needed. However, indexes must always be rebuilt unless the system can
     verify that the new index would be logically equivalent to the existing
-    one.  For example, if the collation for a column has been changed an index
+    one.  For example, if the collation for a column has been changed, an index
     rebuild is always required because the new sort order might be different.
     However, in the absence of a collation change, a column can be changed
     from <type>text</type> to <type>varchar</type> (or vice versa) without
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml
index f9a1776380b..90bd70050dd 100644
--- a/doc/src/sgml/ref/create_subscription.sgml
+++ b/doc/src/sgml/ref/create_subscription.sgml
@@ -383,7 +383,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
    <literal>FOR TABLES IN SCHEMA</literal>, rows are always published
    regardless of the definition of the other expressions.
    If the subscriber is a <productname>PostgreSQL</productname> version before
-   15 then any row filtering is ignored during the initial data synchronization
+   15, then any row filtering is ignored during the initial data synchronization
    phase. For this case, the user might want to consider deleting any initially
    copied data that would be incompatible with subsequent filtering.
    Because initial data synchronization does not take into account the publication
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index 5186d75d616..e0a6f775b6e 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -935,8 +935,8 @@ BETTER: unrecognized node type: 42
    <simplesect>
     <title>Function-Like Macros and Inline Functions</title>
     <para>
-     Both, macros with arguments and <literal>static inline</literal>
-     functions, may be used. The latter are preferable if there are
+     Both macros with arguments and <literal>static inline</literal>
+     functions may be used. The latter are preferable if there are
      multiple-evaluation hazards when written as a macro, as e.g., the
      case with
 <programlisting>
-- 
2.25.1

  [text/x-diff] 0006-typos.patch (9.0K, ../../20221230231257.GI1153@telsasoft.com/7-0006-typos.patch)
  download | inline diff:
From 759288c53d30d32c608d0316df06f645ffa4dccf Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:40:36 -0500
Subject: [PATCH 06/16] typos

---
 .cirrus.yml                               | 12 ++++++------
 doc/src/sgml/ref/grant.sgml               |  2 +-
 meson.build                               |  4 ++--
 src/backend/optimizer/util/tlist.c        |  2 +-
 src/bin/pg_dump/pg_dumpall.c              |  2 +-
 src/include/lib/ilist.h                   |  2 +-
 src/test/regress/expected/copy.out        |  2 +-
 src/test/regress/expected/expressions.out |  2 +-
 src/test/regress/sql/copy.sql             |  2 +-
 src/test/regress/sql/expressions.sql      |  2 +-
 src/test/ssl/t/SSL/Server.pm              |  2 +-
 11 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 993af888659..082ba84c2b2 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -11,7 +11,7 @@ env:
   CONTAINER_REPO: us-docker.pkg.dev/${GCP_PROJECT}/ci
 
   # The lower depth accelerates git clone. Use a bit of depth so that
-  # concurrent tasks and retrying older jobs has a chance of working.
+  # concurrent tasks and retrying older jobs have a chance of working.
   CIRRUS_CLONE_DEPTH: 500
   # Useful to be able to analyse what in a script takes long
   CIRRUS_LOG_TIMESTAMP: true
@@ -47,7 +47,7 @@ on_failure_meson: &on_failure_meson
 
   # In theory it'd be nice to upload the junit files meson generates, so that
   # cirrus will nicely annotate the commit. Unfortunately the files don't
-  # contain identifieable file + line numbers right now, so the annotations
+  # contain identifiable file + line numbers right now, so the annotations
   # don't end up useful. We could probably improve on that with a some custom
   # conversion script, but ...
   meson_log_artifacts:
@@ -160,7 +160,7 @@ task:
 
   ccache_cache:
     folder: $CCACHE_DIR
-  # Workaround around performance issues due to 32KB block size
+  # Work around performance issues due to 32KB block size
   repartition_script: src/tools/ci/gcp_freebsd_repartition.sh
   create_user_script: |
     pw useradd postgres
@@ -251,7 +251,7 @@ task:
     DEBUGINFOD_URLS: "https://debuginfod.debian.net"
 
     # Enable a reasonable set of sanitizers. Use the linux task for that, as
-    # it one of the fastest tasks (without sanitizers). Also several of the
+    # it's one of the fastest tasks (without sanitizers). Also several of the
     # sanitizers work best on linux.
     #
     # The overhead of alignment sanitizer is low, undefined behaviour has
@@ -600,7 +600,7 @@ task:
     CCACHE_MAXSIZE: "500M"
     CCACHE_SLOPPINESS: pch_defines,time_macros
     CCACHE_DEPEND: 1
-    # for some reason mingw plpython cannot find it's installation without this
+    # for some reason mingw plpython cannot find its installation without this
     PYTHONHOME: C:/msys64/ucrt64
     # prevents MSYS bash from resetting error mode
     MSYS: winjitdebug
@@ -655,7 +655,7 @@ task:
 
     # Use larger ccache cache, as this task compiles with multiple compilers /
     # flag combinations
-    CCACHE_MAXSIZE: "1GB"
+    CCACHE_MAXSIZE: "1G"
     CCACHE_DIR: "/tmp/ccache_dir"
 
     LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml
index c8ca2b1d641..518bdb32d82 100644
--- a/doc/src/sgml/ref/grant.sgml
+++ b/doc/src/sgml/ref/grant.sgml
@@ -253,7 +253,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace
    in a role to one or more other roles.  Membership in a role is significant
    because it potentially allows access to the privileges granted to a role
    to each of its members, and potentially also the ability to make changes
-   to the role itself. However, the actual permisions conferred depend on
+   to the role itself. However, the actual permissions conferred depend on
    the options associated with the grant.
   </para>
 
diff --git a/meson.build b/meson.build
index b872470cdfe..c60dc2c4111 100644
--- a/meson.build
+++ b/meson.build
@@ -21,7 +21,7 @@ project('postgresql',
     'buildtype=release',
     # For compatibility with the autoconf build, set a default prefix. This
     # works even on windows, where it's a drive-relative path (i.e. when on
-    # d:/sompath it'll install to d:/usr/local/pgsql)
+    # d:/somepath it'll install to d:/usr/local/pgsql)
     'prefix=/usr/local/pgsql',
   ]
 )
@@ -1078,7 +1078,7 @@ if not get_option('readline').disabled()
 
     if not at_least_one_header_found
       error('''readline header not found
-If you have @0@ already installed, see see meson-log/meson-log.txt for details on the
+If you have @0@ already installed, see meson-log/meson-log.txt for details on the
 failure. It is possible the compiler isn't looking in the proper directory.
 Use -Dreadline=false to disable readline support.'''.format(readline_dep))
     endif
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c
index 784a1af82df..eed3e3fb75a 100644
--- a/src/backend/optimizer/util/tlist.c
+++ b/src/backend/optimizer/util/tlist.c
@@ -865,7 +865,7 @@ apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target)
  *
  * The outputs of this function are two parallel lists, one a list of
  * PathTargets and the other an integer list of bool flags indicating
- * whether the corresponding PathTarget contains any evaluatable SRFs.
+ * whether the corresponding PathTarget contains any evaluable SRFs.
  * The lists are given in the order they'd need to be evaluated in, with
  * the "lowest" PathTarget first.  So the last list entry is always the
  * originally given PathTarget, and any entries before it indicate evaluation
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 7b40081678b..6f351034039 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1034,7 +1034,7 @@ dumpRoleMembership(PGconn *conn)
 		ht = rolename_create(remaining, NULL);
 
 		/*
-		 * Make repeated passses over the grants for this role until all have
+		 * Make repeated passes over the grants for this role until all have
 		 * been dumped.
 		 */
 		while (remaining > 0)
diff --git a/src/include/lib/ilist.h b/src/include/lib/ilist.h
index 3c543e7c365..d7c4b2da5ed 100644
--- a/src/include/lib/ilist.h
+++ b/src/include/lib/ilist.h
@@ -162,7 +162,7 @@ typedef struct dlist_head
 
 
 /*
- * Doubly linked list iterator type for dlist_head and and dclist_head types.
+ * Doubly linked list iterator type for dlist_head and dclist_head types.
  *
  * Used as state in dlist_foreach() and dlist_reverse_foreach() (and the
  * dclist variant thereof).
diff --git a/src/test/regress/expected/copy.out b/src/test/regress/expected/copy.out
index 3fad1c52d1f..8a8bf43fdea 100644
--- a/src/test/regress/expected/copy.out
+++ b/src/test/regress/expected/copy.out
@@ -182,7 +182,7 @@ create table header_copytest (
 	b int,
 	c text
 );
--- Make sure it works with with dropped columns
+-- Make sure it works with dropped columns
 alter table header_copytest drop column c;
 alter table header_copytest add column c text;
 copy header_copytest to stdout with (header match);
diff --git a/src/test/regress/expected/expressions.out b/src/test/regress/expected/expressions.out
index df432d4c927..2d5342ab281 100644
--- a/src/test/regress/expected/expressions.out
+++ b/src/test/regress/expected/expressions.out
@@ -86,7 +86,7 @@ WARNING:  TIMESTAMP(7) precision reduced to maximum allowed, 6
  t
 (1 row)
 
--- current_role/user/user is tested in rolnames.sql
+-- current_role/user/user is tested in rolenames.sql
 -- current database / catalog
 SELECT current_catalog = current_database();
  ?column? 
diff --git a/src/test/regress/sql/copy.sql b/src/test/regress/sql/copy.sql
index 285022e07c6..f9da7b1508f 100644
--- a/src/test/regress/sql/copy.sql
+++ b/src/test/regress/sql/copy.sql
@@ -204,7 +204,7 @@ create table header_copytest (
 	b int,
 	c text
 );
--- Make sure it works with with dropped columns
+-- Make sure it works with dropped columns
 alter table header_copytest drop column c;
 alter table header_copytest add column c text;
 copy header_copytest to stdout with (header match);
diff --git a/src/test/regress/sql/expressions.sql b/src/test/regress/sql/expressions.sql
index fea5358d252..d315ef5af50 100644
--- a/src/test/regress/sql/expressions.sql
+++ b/src/test/regress/sql/expressions.sql
@@ -29,7 +29,7 @@ SELECT current_timestamp = current_timestamp(7);
 SELECT localtime = localtime(7);
 SELECT localtimestamp = localtimestamp(7);
 
--- current_role/user/user is tested in rolnames.sql
+-- current_role/user/user is tested in rolenames.sql
 
 -- current database / catalog
 SELECT current_catalog = current_database();
diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm
index 9520578e7d9..0a9e5da01e4 100644
--- a/src/test/ssl/t/SSL/Server.pm
+++ b/src/test/ssl/t/SSL/Server.pm
@@ -257,7 +257,7 @@ The certificate file to use. Implementation is SSL backend specific.
 
 =item keyfile => B<value>
 
-The private key to use. Implementation is SSL backend specific.
+The private key file to use. Implementation is SSL backend specific.
 
 =item crlfile => B<value>
 
-- 
2.25.1

  [text/x-diff] 0007-nondecimal.patch (789B, ../../20221230231257.GI1153@telsasoft.com/8-0007-nondecimal.patch)
  download | inline diff:
From 1be0dbbd115e485c7361900dd8301870f7bb261c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 14 Dec 2022 19:04:13 -0600
Subject: [PATCH 07/16] +nondecimal

Per Erik Rijkers
---
 doc/src/sgml/syntax.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
index 956182e7c6a..0ccddea310d 100644
--- a/doc/src/sgml/syntax.sgml
+++ b/doc/src/sgml/syntax.sgml
@@ -722,7 +722,7 @@ $function$
 
     <note>
      <para>
-      Nondecimal integer constants are currently only supported in the range
+      Non-decimal integer constants are currently only supported in the range
       of the <type>bigint</type> type (see <xref
       linkend="datatype-numeric-table"/>).
      </para>
-- 
2.25.1

  [text/x-diff] 0008-do-not-end-messages-with-newlines.patch (1.4K, ../../20221230231257.GI1153@telsasoft.com/9-0008-do-not-end-messages-with-newlines.patch)
  download | inline diff:
From 25683fd3008fa312d4154ff13f172453c2dff42a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 18 Dec 2022 21:33:10 -0600
Subject: [PATCH 08/16] do not end messages with newlines

https://www.postgresql.org/docs/current/error-style-guide.html
---
 src/backend/access/common/bufmask.c | 2 +-
 src/backend/jit/llvm/llvmjit.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/access/common/bufmask.c b/src/backend/access/common/bufmask.c
index 4e953bfd61d..a8f213cf78f 100644
--- a/src/backend/access/common/bufmask.c
+++ b/src/backend/access/common/bufmask.c
@@ -78,7 +78,7 @@ mask_unused_space(Page page)
 	if (pd_lower > pd_upper || pd_special < pd_upper ||
 		pd_lower < SizeOfPageHeaderData || pd_special > BLCKSZ)
 	{
-		elog(ERROR, "invalid page pd_lower %u pd_upper %u pd_special %u\n",
+		elog(ERROR, "invalid page pd_lower %u pd_upper %u pd_special %u",
 			 pd_lower, pd_upper, pd_special);
 	}
 
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 9aca7fc7a47..941425c562c 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -816,7 +816,7 @@ llvm_session_initialize(void)
 
 	if (LLVMGetTargetFromTriple(llvm_triple, &llvm_targetref, &error) != 0)
 	{
-		elog(FATAL, "failed to query triple %s\n", error);
+		elog(FATAL, "failed to query triple %s", error);
 	}
 
 	/*
-- 
2.25.1

  [text/x-diff] 0009-typos-a-vs-an.patch (2.1K, ../../20221230231257.GI1153@telsasoft.com/10-0009-typos-a-vs-an.patch)
  download | inline diff:
From 29c8a8903a282501e133a3a2bd1a4e835a8cc781 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 9 May 2022 10:52:34 -0500
Subject: [PATCH 09/16] typos: a vs an

---
 src/backend/access/spgist/spgutils.c | 2 +-
 src/backend/utils/adt/ruleutils.c    | 2 +-
 src/include/access/relscan.h         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 2c661fcf96f..f2da02eb52d 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -1301,7 +1301,7 @@ spgproperty(Oid index_oid, int attno,
 	/*
 	 * Currently, SP-GiST distance-ordered scans require that there be a
 	 * distance operator in the opclass with the default types. So we assume
-	 * that if such a operator exists, then there's a reason for it.
+	 * that if such an operator exists, then there's a reason for it.
 	 */
 
 	/* First we need to know the column's opclass. */
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 641df1cabe2..cdb40581d5a 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -11391,7 +11391,7 @@ get_opclass_name(Oid opclass, Oid actual_datatype,
 
 /*
  * generate_opclass_name
- *		Compute the name to display for a opclass specified by OID
+ *		Compute the name to display for an opclass specified by OID
  *
  * The result includes all necessary quoting and schema-prefixing.
  */
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index 53a93ccbe71..5a328626fa3 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -58,7 +58,7 @@ typedef struct TableScanDescData *TableScanDesc;
  * TableScanDesc in backend-private memory, and those objects all contain a
  * pointer to this structure.  The information here must be sufficient to
  * properly initialize each new TableScanDesc as workers join the scan, and it
- * must act as a information what to scan for those workers.
+ * must provide information what to scan for those workers.
  */
 typedef struct ParallelTableScanDescData
 {
-- 
2.25.1

  [text/x-diff] 0010-comments-grammar-extended-and-other-stats.patch (6.9K, ../../20221230231257.GI1153@telsasoft.com/11-0010-comments-grammar-extended-and-other-stats.patch)
  download | inline diff:
From 8cef256600d865bb26eb1f7eef5a70f2ffddb2e4 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 10/16] comments grammar: extended (and other) stats

See:
202109272104.7t253iw236fb@alvherre.pgsql
070d2e19e40897d857f570f24888fc30727ed9c0
609b0652af00374b89411ea2613fd5bb92bca92c
a4d75c86bf15220df22de0a92c819ecef9db3849
7300a699502fe5432b05fbc75baca534b080bebb
ccaa3569f58796868303629bc2d63ddddb599b38
---
 src/backend/commands/statscmds.c                 | 4 ++--
 src/backend/statistics/README                    | 2 +-
 src/backend/statistics/dependencies.c            | 8 ++++----
 src/backend/statistics/extended_stats.c          | 4 ++--
 src/backend/utils/adt/pgstatfuncs.c              | 4 ++--
 src/backend/utils/adt/ruleutils.c                | 2 +-
 src/include/statistics/extended_stats_internal.h | 2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 9cfd55d6fc7..64db846ceed 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -377,7 +377,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 
 	/*
 	 * If no statistic type was specified, build them all (but only when the
-	 * statistics is defined on more than one column/expression).
+	 * statistics object is defined on more than one column/expression).
 	 */
 	if ((!requested_type) && (numcols >= 2))
 	{
@@ -432,7 +432,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 	 * similar to why we don't bother with extracting columns from
 	 * expressions. It's either expensive or very easy to defeat for
 	 * determined user, and there's no risk if we allow such statistics (the
-	 * statistics is useless, but harmless).
+	 * statistic is useless, but harmless).
 	 */
 	foreach(cell, stxexprs)
 	{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
 Compatible clause types
 -----------------------
 
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
 
     (a) functional dependencies - equality clauses (AND), possibly IS NULL
 
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 744bc512b65..10bccbe9f72 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -846,7 +846,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
 			AttrNumber	clause_attnum;
 
 			/*
-			 * Had we found incompatible clause in the arguments, treat the
+			 * If we found an incompatible clause in the arguments, treat the
 			 * whole clause as incompatible.
 			 */
 			if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1274,7 +1274,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
 			Node	   *or_expr = NULL;
 
 			/*
-			 * Had we found incompatible expression in the arguments, treat
+			 * If we found an incompatible expression in the arguments, treat
 			 * the whole expression as incompatible.
 			 */
 			if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
@@ -1725,7 +1725,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 
 					/*
 					 * For expressions, we need to do two translations. First
-					 * we have to translate the negative attnum to index in
+					 * we have to translate the negative attnum to an index in
 					 * the list of expressions (in the statistics object).
 					 * Then we need to see if there's a matching clause. The
 					 * index of the unique expression determines the attnum
@@ -1733,7 +1733,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 					 */
 					idx = -(1 + attnum);
 
-					/* Is the expression index is valid? */
+					/* Is the expression index valid? */
 					Assert((idx >= 0) && (idx < list_length(stat->exprs)));
 
 					expr = (Node *) list_nth(stat->exprs, idx);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index c1652cb4c51..cd0e998a3c2 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1214,8 +1214,8 @@ stat_covers_expressions(StatisticExtInfo *stat, List *exprs,
 
 /*
  * choose_best_statistics
- *		Look for and return statistics with the specified 'requiredkind' which
- *		have keys that match at least two of the given attnums.  Return NULL if
+ *		Look for and return the statistics object with the specified 'requiredkind' which
+ *		has keys that match at least two of the given attnums.  Return NULL if
  *		there's no match.
  *
  * The current selection criteria is very simple - we choose the statistics
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 46f98fd67f5..addab4031e2 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1749,7 +1749,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
 }
 
 /*
- * Get the statistics for the replication slot. If the slot statistics is not
+ * Get the statistics for the replication slot. If the slot statistics are not
  * available, return all-zeroes stats.
  */
 Datum
@@ -1821,7 +1821,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
 
 /*
  * Get the subscription statistics for the given subscription. If the
- * subscription statistics is not available, return all-zeros stats.
+ * subscription statistics are not available, return all-zeros stats.
  */
 Datum
 pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index cdb40581d5a..99a9cf49b5f 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1699,7 +1699,7 @@ pg_get_statisticsobj_worker(Oid statextid, bool columns_only, bool missing_ok)
 		 * will create all statistics types on a newer postgres version, if
 		 * the statistics had all options enabled on the original version.
 		 *
-		 * But if the statistics is defined on just a single column, it has to
+		 * But if the statistics are defined on just a single column, it has to
 		 * be an expression statistics. In that case we don't need to specify
 		 * kinds.
 		 */
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index 906919d88ec..f34c4c28098 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -57,7 +57,7 @@ typedef struct SortItem
 	int			count;
 } SortItem;
 
-/* a unified representation of the data the statistics is built on */
+/* a unified representation of the data the statistics object is built on */
 typedef struct StatsBuildData
 {
 	int			numrows;
-- 
2.25.1

  [text/x-diff] 0011-Update-comment-regarding-pg_upgrade-and-sequences.patch (1.1K, ../../20221230231257.GI1153@telsasoft.com/12-0011-Update-comment-regarding-pg_upgrade-and-sequences.patch)
  download | inline diff:
From 9acfbc78f2459f1282ee5363592ff39a8f3a2662 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 25 Jun 2022 10:50:14 -0500
Subject: [PATCH 11/16] Update comment regarding pg_upgrade and sequences

Missed at a7e5457db86642c078888bf666cf6b64636bb190
---
 src/bin/pg_upgrade/info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index f18cf971202..4b059dd2d7c 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -408,8 +408,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	query[0] = '\0';			/* initialize query string to empty */
 
 	/*
-	 * Create a CTE that collects OIDs of regular user tables, including
-	 * matviews and sequences, but excluding toast tables and indexes.  We
+	 * Create a CTE that collects OIDs of regular user tables and
+	 * matviews, but excluding toast tables and indexes.  We
 	 * assume that relations with OIDs >= FirstNormalObjectId belong to the
 	 * user.  (That's probably redundant with the namespace-name exclusions,
 	 * but let's be safe.)
-- 
2.25.1

  [text/x-diff] 0012-fix-whitespace.patch (12.3K, ../../20221230231257.GI1153@telsasoft.com/13-0012-fix-whitespace.patch)
  download | inline diff:
From 0c2bfa73b65cda20db4625f42caf635e8f652706 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 12/16] fix whitespace

weird since c91560defc57f89f7e88632ea14ae77b5cec78ee

See also:
https://www.postgresql.org/message-id/CAFBsxsHtYvE1Txm+NYM5gB1C3EZN_qDPJOOsJK_VsC2DXqZfcA@mail.gmail.com
---
 src/backend/utils/cache/inval.c | 188 ++++++++++++++++----------------
 1 file changed, 94 insertions(+), 94 deletions(-)

diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index eb5782f82a4..53a6c135e50 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -3,100 +3,100 @@
  * inval.c
  *	  POSTGRES cache invalidation dispatcher code.
  *
- *	This is subtle stuff, so pay attention:
- *
- *	When a tuple is updated or deleted, our standard visibility rules
- *	consider that it is *still valid* so long as we are in the same command,
- *	ie, until the next CommandCounterIncrement() or transaction commit.
- *	(See access/heap/heapam_visibility.c, and note that system catalogs are
- *  generally scanned under the most current snapshot available, rather than
- *  the transaction snapshot.)	At the command boundary, the old tuple stops
- *	being valid and the new version, if any, becomes valid.  Therefore,
- *	we cannot simply flush a tuple from the system caches during heap_update()
- *	or heap_delete().  The tuple is still good at that point; what's more,
- *	even if we did flush it, it might be reloaded into the caches by a later
- *	request in the same command.  So the correct behavior is to keep a list
- *	of outdated (updated/deleted) tuples and then do the required cache
- *	flushes at the next command boundary.  We must also keep track of
- *	inserted tuples so that we can flush "negative" cache entries that match
- *	the new tuples; again, that mustn't happen until end of command.
- *
- *	Once we have finished the command, we still need to remember inserted
- *	tuples (including new versions of updated tuples), so that we can flush
- *	them from the caches if we abort the transaction.  Similarly, we'd better
- *	be able to flush "negative" cache entries that may have been loaded in
- *	place of deleted tuples, so we still need the deleted ones too.
- *
- *	If we successfully complete the transaction, we have to broadcast all
- *	these invalidation events to other backends (via the SI message queue)
- *	so that they can flush obsolete entries from their caches.  Note we have
- *	to record the transaction commit before sending SI messages, otherwise
- *	the other backends won't see our updated tuples as good.
- *
- *	When a subtransaction aborts, we can process and discard any events
- *	it has queued.  When a subtransaction commits, we just add its events
- *	to the pending lists of the parent transaction.
- *
- *	In short, we need to remember until xact end every insert or delete
- *	of a tuple that might be in the system caches.  Updates are treated as
- *	two events, delete + insert, for simplicity.  (If the update doesn't
- *	change the tuple hash value, catcache.c optimizes this into one event.)
- *
- *	We do not need to register EVERY tuple operation in this way, just those
- *	on tuples in relations that have associated catcaches.  We do, however,
- *	have to register every operation on every tuple that *could* be in a
- *	catcache, whether or not it currently is in our cache.  Also, if the
- *	tuple is in a relation that has multiple catcaches, we need to register
- *	an invalidation message for each such catcache.  catcache.c's
- *	PrepareToInvalidateCacheTuple() routine provides the knowledge of which
- *	catcaches may need invalidation for a given tuple.
- *
- *	Also, whenever we see an operation on a pg_class, pg_attribute, or
- *	pg_index tuple, we register a relcache flush operation for the relation
- *	described by that tuple (as specified in CacheInvalidateHeapTuple()).
- *	Likewise for pg_constraint tuples for foreign keys on relations.
- *
- *	We keep the relcache flush requests in lists separate from the catcache
- *	tuple flush requests.  This allows us to issue all the pending catcache
- *	flushes before we issue relcache flushes, which saves us from loading
- *	a catcache tuple during relcache load only to flush it again right away.
- *	Also, we avoid queuing multiple relcache flush requests for the same
- *	relation, since a relcache flush is relatively expensive to do.
- *	(XXX is it worth testing likewise for duplicate catcache flush entries?
- *	Probably not.)
- *
- *	Many subsystems own higher-level caches that depend on relcache and/or
- *	catcache, and they register callbacks here to invalidate their caches.
- *	While building a higher-level cache entry, a backend may receive a
- *	callback for the being-built entry or one of its dependencies.  This
- *	implies the new higher-level entry would be born stale, and it might
- *	remain stale for the life of the backend.  Many caches do not prevent
- *	that.  They rely on DDL for can't-miss catalog changes taking
- *	AccessExclusiveLock on suitable objects.  (For a change made with less
- *	locking, backends might never read the change.)  The relation cache,
- *	however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
- *	than the beginning of the next transaction.  Hence, when a relevant
- *	invalidation callback arrives during a build, relcache.c reattempts that
- *	build.  Caches with similar needs could do likewise.
- *
- *	If a relcache flush is issued for a system relation that we preload
- *	from the relcache init file, we must also delete the init file so that
- *	it will be rebuilt during the next backend restart.  The actual work of
- *	manipulating the init file is in relcache.c, but we keep track of the
- *	need for it here.
- *
- *	Currently, inval messages are sent without regard for the possibility
- *	that the object described by the catalog tuple might be a session-local
- *	object such as a temporary table.  This is because (1) this code has
- *	no practical way to tell the difference, and (2) it is not certain that
- *	other backends don't have catalog cache or even relcache entries for
- *	such tables, anyway; there is nothing that prevents that.  It might be
- *	worth trying to avoid sending such inval traffic in the future, if those
- *	problems can be overcome cheaply.
- *
- *	When wal_level=logical, write invalidations into WAL at each command end to
- *	support the decoding of the in-progress transactions.  See
- *	CommandEndInvalidationMessages.
+ * This is subtle stuff, so pay attention:
+ *
+ * When a tuple is updated or deleted, our standard visibility rules
+ * consider that it is *still valid* so long as we are in the same command,
+ * ie, until the next CommandCounterIncrement() or transaction commit.
+ * (See access/heap/heapam_visibility.c, and note that system catalogs are
+ * generally scanned under the most current snapshot available, rather than
+ * the transaction snapshot.)  At the command boundary, the old tuple stops
+ * being valid and the new version, if any, becomes valid.  Therefore,
+ * we cannot simply flush a tuple from the system caches during heap_update()
+ * or heap_delete().  The tuple is still good at that point; what's more,
+ * even if we did flush it, it might be reloaded into the caches by a later
+ * request in the same command.  So the correct behavior is to keep a list
+ * of outdated (updated/deleted) tuples and then do the required cache
+ * flushes at the next command boundary.  We must also keep track of
+ * inserted tuples so that we can flush "negative" cache entries that match
+ * the new tuples; again, that mustn't happen until end of command.
+ *
+ * Once we have finished the command, we still need to remember inserted
+ * tuples (including new versions of updated tuples), so that we can flush
+ * them from the caches if we abort the transaction.  Similarly, we'd better
+ * be able to flush "negative" cache entries that may have been loaded in
+ * place of deleted tuples, so we still need the deleted ones too.
+ *
+ * If we successfully complete the transaction, we have to broadcast all
+ * these invalidation events to other backends (via the SI message queue)
+ * so that they can flush obsolete entries from their caches.  Note we have
+ * to record the transaction commit before sending SI messages, otherwise
+ * the other backends won't see our updated tuples as good.
+ *
+ * When a subtransaction aborts, we can process and discard any events
+ * it has queued.  When a subtransaction commits, we just add its events
+ * to the pending lists of the parent transaction.
+ *
+ * In short, we need to remember until xact end every insert or delete
+ * of a tuple that might be in the system caches.  Updates are treated as
+ * two events, delete + insert, for simplicity.  (If the update doesn't
+ * change the tuple hash value, catcache.c optimizes this into one event.)
+ *
+ * We do not need to register EVERY tuple operation in this way, just those
+ * on tuples in relations that have associated catcaches.  We do, however,
+ * have to register every operation on every tuple that *could* be in a
+ * catcache, whether or not it currently is in our cache.  Also, if the
+ * tuple is in a relation that has multiple catcaches, we need to register
+ * an invalidation message for each such catcache.  catcache.c's
+ * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
+ * catcaches may need invalidation for a given tuple.
+ *
+ * Also, whenever we see an operation on a pg_class, pg_attribute, or
+ * pg_index tuple, we register a relcache flush operation for the relation
+ * described by that tuple (as specified in CacheInvalidateHeapTuple()).
+ * Likewise for pg_constraint tuples for foreign keys on relations.
+ *
+ * We keep the relcache flush requests in lists separate from the catcache
+ * tuple flush requests.  This allows us to issue all the pending catcache
+ * flushes before we issue relcache flushes, which saves us from loading
+ * a catcache tuple during relcache load only to flush it again right away.
+ * Also, we avoid queuing multiple relcache flush requests for the same
+ * relation, since a relcache flush is relatively expensive to do.
+ * (XXX is it worth testing likewise for duplicate catcache flush entries?
+ * Probably not.)
+ *
+ * Many subsystems own higher-level caches that depend on relcache and/or
+ * catcache, and they register callbacks here to invalidate their caches.
+ * While building a higher-level cache entry, a backend may receive a
+ * callback for the being-built entry or one of its dependencies.  This
+ * implies the new higher-level entry would be born stale, and it might
+ * remain stale for the life of the backend.  Many caches do not prevent
+ * that.  They rely on DDL for can't-miss catalog changes taking
+ * AccessExclusiveLock on suitable objects.  (For a change made with less
+ * locking, backends might never read the change.)  The relation cache,
+ * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
+ * than the beginning of the next transaction.  Hence, when a relevant
+ * invalidation callback arrives during a build, relcache.c reattempts that
+ * build.  Caches with similar needs could do likewise.
+ *
+ * If a relcache flush is issued for a system relation that we preload
+ * from the relcache init file, we must also delete the init file so that
+ * it will be rebuilt during the next backend restart.  The actual work of
+ * manipulating the init file is in relcache.c, but we keep track of the
+ * need for it here.
+ *
+ * Currently, inval messages are sent without regard for the possibility
+ * that the object described by the catalog tuple might be a session-local
+ * object such as a temporary table.  This is because (1) this code has
+ * no practical way to tell the difference, and (2) it is not certain that
+ * other backends don't have catalog cache or even relcache entries for
+ * such tables, anyway; there is nothing that prevents that.  It might be
+ * worth trying to avoid sending such inval traffic in the future, if those
+ * problems can be overcome cheaply.
+ *
+ * When wal_level=logical, write invalidations into WAL at each command end to
+ * support the decoding of the in-progress transactions.  See
+ * CommandEndInvalidationMessages.
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
-- 
2.25.1

  [text/x-diff] 0013-move-view-name-outside-of-translated-string.patch (2.0K, ../../20221230231257.GI1153@telsasoft.com/14-0013-move-view-name-outside-of-translated-string.patch)
  download | inline diff:
From b25e3186a37ca3b30912ad9373f3bdb75db74fd1 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 20 Oct 2022 21:05:19 -0500
Subject: [PATCH 13/16] move view name outside of translated string

Noticed during discussion: 20221017202809.GX7745@telsasoft.com
---
 src/backend/utils/misc/guc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index c6326d50532..1dfadee4a0b 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -4191,8 +4191,8 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
 		!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("must be superuser or have privileges of pg_read_all_settings to examine \"%s\"",
-						name)));
+				 errmsg("must be superuser or have privileges of %s to examine \"%s\"",
+						"pg_read_all_settings", name)));
 
 	switch (record->vartype)
 	{
@@ -4238,8 +4238,8 @@ GetConfigOptionResetString(const char *name)
 		!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("must be superuser or have privileges of pg_read_all_settings to examine \"%s\"",
-						name)));
+				 errmsg("must be superuser or have privileges of %s to examine \"%s\"",
+						"pg_read_all_settings", name)));
 
 	switch (record->vartype)
 	{
@@ -5247,8 +5247,8 @@ GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
 		!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("must be superuser or have privileges of pg_read_all_settings to examine \"%s\"",
-						name)));
+				 errmsg("must be superuser or have privileges of %s to examine \"%s\"",
+						"pg_read_all_settings", name)));
 
 	if (varname)
 		*varname = record->name;
-- 
2.25.1

  [text/x-diff] 0014-more.patch (6.7K, ../../20221230231257.GI1153@telsasoft.com/15-0014-more.patch)
  download | inline diff:
From 364763047161a2c4343fedb6df061aaa80db4e07 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 21 Oct 2022 16:07:20 -0500
Subject: [PATCH 14/16] +more

---
 contrib/file_fdw/file_fdw.c            | 4 ++--
 src/backend/backup/basebackup_server.c | 2 +-
 src/backend/commands/copy.c            | 6 +++---
 src/backend/storage/ipc/procarray.c    | 2 +-
 src/backend/storage/ipc/signalfuncs.c  | 4 ++--
 src/backend/tcop/utility.c             | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c
index 67821cd25b3..df6b7e6cb1c 100644
--- a/contrib/file_fdw/file_fdw.c
+++ b/contrib/file_fdw/file_fdw.c
@@ -278,13 +278,13 @@ file_fdw_validator(PG_FUNCTION_ARGS)
 				!has_privs_of_role(GetUserId(), ROLE_PG_READ_SERVER_FILES))
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("only superuser or a role with privileges of the pg_read_server_files role may specify the filename option of a file_fdw foreign table")));
+						 errmsg("only superuser or a role with privileges of the %s role may specify the filename option of a file_fdw foreign table", "pg_read_server_files")));
 
 			if (strcmp(def->defname, "program") == 0 &&
 				!has_privs_of_role(GetUserId(), ROLE_PG_EXECUTE_SERVER_PROGRAM))
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("only superuser or a role with privileges of the pg_execute_server_program role may specify the program option of a file_fdw foreign table")));
+						 errmsg("only superuser or a role with privileges of the %s role may specify the program option of a file_fdw foreign table", "pg_execute_server_program")));
 
 			filename = defGetString(def);
 		}
diff --git a/src/backend/backup/basebackup_server.c b/src/backend/backup/basebackup_server.c
index 0258d7a03b3..23934aef3e5 100644
--- a/src/backend/backup/basebackup_server.c
+++ b/src/backend/backup/basebackup_server.c
@@ -72,7 +72,7 @@ bbsink_server_new(bbsink *next, char *pathname)
 	if (!has_privs_of_role(GetUserId(), ROLE_PG_WRITE_SERVER_FILES))
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("must be superuser or a role with privileges of the pg_write_server_files role to create backup stored on server")));
+				 errmsg("must be superuser or a role with privileges of the %s role to create backup stored on server", "pg_write_server_files")));
 	CommitTransactionCommand();
 
 	/*
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index b8bd78d358b..65a3d147542 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -83,7 +83,7 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
 			if (!has_privs_of_role(GetUserId(), ROLE_PG_EXECUTE_SERVER_PROGRAM))
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("must be superuser or have privileges of the pg_execute_server_program role to COPY to or from an external program"),
+						 errmsg("must be superuser or have privileges of the %s role to COPY to or from an external program", "pg_execute_server_program"),
 						 errhint("Anyone can COPY to stdout or from stdin. "
 								 "psql's \\copy command also works for anyone.")));
 		}
@@ -92,14 +92,14 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
 			if (is_from && !has_privs_of_role(GetUserId(), ROLE_PG_READ_SERVER_FILES))
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("must be superuser or have privileges of the pg_read_server_files role to COPY from a file"),
+						 errmsg("must be superuser or have privileges of the %s role to COPY from a file", "pg_read_server_files"),
 						 errhint("Anyone can COPY to stdout or from stdin. "
 								 "psql's \\copy command also works for anyone.")));
 
 			if (!is_from && !has_privs_of_role(GetUserId(), ROLE_PG_WRITE_SERVER_FILES))
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("must be superuser or have privileges of the pg_write_server_files role to COPY to a file"),
+						 errmsg("must be superuser or have privileges of the %s role to COPY to a file", "pg_write_server_files"),
 						 errhint("Anyone can COPY to stdout or from stdin. "
 								 "psql's \\copy command also works for anyone.")));
 		}
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 0176f302703..5d6d0e1eef0 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -3860,7 +3860,7 @@ TerminateOtherDBBackends(Oid databaseId)
 					!has_privs_of_role(GetUserId(), ROLE_PG_SIGNAL_BACKEND))
 					ereport(ERROR,
 							(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-							 errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")));
+							 errmsg("must be a member of the role whose process is being terminated or member of %s", "pg_signal_backend")));
 			}
 		}
 
diff --git a/src/backend/storage/ipc/signalfuncs.c b/src/backend/storage/ipc/signalfuncs.c
index 6e310b14ebd..3a73dc94ee6 100644
--- a/src/backend/storage/ipc/signalfuncs.c
+++ b/src/backend/storage/ipc/signalfuncs.c
@@ -126,7 +126,7 @@ pg_cancel_backend(PG_FUNCTION_ARGS)
 	if (r == SIGNAL_BACKEND_NOPERMISSION)
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("must be a member of the role whose query is being canceled or member of pg_signal_backend")));
+				 errmsg("must be a member of the role whose query is being canceled or member of %s", "pg_signal_backend")));
 
 	PG_RETURN_BOOL(r == SIGNAL_BACKEND_SUCCESS);
 }
@@ -228,7 +228,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
 	if (r == SIGNAL_BACKEND_NOPERMISSION)
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-				 errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")));
+				 errmsg("must be a member of the role whose process is being terminated or member of %s", "pg_signal_backend")));
 
 	/* Wait only on success and if actually requested */
 	if (r == SIGNAL_BACKEND_SUCCESS && timeout > 0)
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 247d0816ad8..952034a9a39 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -950,7 +950,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
 			if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINT))
 				ereport(ERROR,
 						(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-						 errmsg("must be superuser or have privileges of pg_checkpoint to do CHECKPOINT")));
+						 errmsg("must be superuser or have privileges of %s to do CHECKPOINT", "pg_checkpoint")));
 
 			RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_WAIT |
 							  (RecoveryInProgress() ? 0 : CHECKPOINT_FORCE));
-- 
2.25.1

  [text/x-diff] 0015-Rename-header-comment-and-define.patch (1.5K, ../../20221230231257.GI1153@telsasoft.com/16-0015-Rename-header-comment-and-define.patch)
  download | inline diff:
From 0769faf55da803a0a954f5e291e9068af0b16605 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 19 Nov 2022 10:31:01 -0600
Subject: [PATCH 15/16] Rename header comment and #define

Maybe should fix more of these?
find src/ contrib/ -name '*.h' |xargs awk '/^#ifndef.*_H$/ && FILENAME!~/-/{reg=toupper(gensub(".*/","",1,FILENAME)); if ($0!~reg){print reg,$0}}'
---
 src/backend/utils/misc/guc_internal.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/utils/misc/guc_internal.h b/src/backend/utils/misc/guc_internal.h
index be3940951a2..bd96405cdad 100644
--- a/src/backend/utils/misc/guc_internal.h
+++ b/src/backend/utils/misc/guc_internal.h
@@ -1,16 +1,16 @@
 /*--------------------------------------------------------------------
- * guc_internals.h
+ * guc_internal.h
  *
  * Declarations shared between backend/utils/misc/guc.c and
  * backend/utils/misc/guc-file.l
  *
  * Copyright (c) 2000-2022, PostgreSQL Global Development Group
  *
- * src/include/utils/guc_internals.h
+ * src/include/utils/guc_internal.h
  *--------------------------------------------------------------------
  */
-#ifndef GUC_INTERNALS_H
-#define GUC_INTERNALS_H
+#ifndef GUC_INTERNAL_H
+#define GUC_INTERNAL_H
 
 #include "utils/guc.h"
 
@@ -23,4 +23,4 @@ extern void record_config_file_error(const char *errmsg,
 									 ConfigVariable **head_p,
 									 ConfigVariable **tail_p);
 
-#endif							/* GUC_INTERNALS_H */
+#endif							/* GUC_INTERNAL_H */
-- 
2.25.1

  [text/x-diff] 0016-Add-some-missing-newlines-after-function-definitions.patch (1.5K, ../../20221230231257.GI1153@telsasoft.com/17-0016-Add-some-missing-newlines-after-function-definitions.patch)
  download | inline diff:
From c2f92e70f4800e609a857d73f13012df3bf28345 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 5 Jul 2021 11:16:38 -0500
Subject: [PATCH 16/16] Add some missing newlines after function definitions

---
 src/backend/access/gin/ginlogic.c      | 1 +
 src/backend/access/rmgrdesc/heapdesc.c | 1 +
 src/backend/utils/mmgr/freepage.c      | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c
index c38c27fbae2..62f98f9cfaf 100644
--- a/src/backend/access/gin/ginlogic.c
+++ b/src/backend/access/gin/ginlogic.c
@@ -58,6 +58,7 @@ trueConsistentFn(GinScanKey key)
 	key->recheckCurItem = false;
 	return true;
 }
+
 static GinTernaryValue
 trueTriConsistentFn(GinScanKey key)
 {
diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c
index 325aee93ff8..7556fc2546d 100644
--- a/src/backend/access/rmgrdesc/heapdesc.c
+++ b/src/backend/access/rmgrdesc/heapdesc.c
@@ -114,6 +114,7 @@ heap_desc(StringInfo buf, XLogReaderState *record)
 		appendStringInfo(buf, "off %u", xlrec->offnum);
 	}
 }
+
 void
 heap2_desc(StringInfo buf, XLogReaderState *record)
 {
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index dcf246faf11..1ba424c2298 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -270,6 +270,7 @@ sum_free_pages_recurse(FreePageManager *fpm, FreePageBtree *btp, Size *sum)
 		}
 	}
 }
+
 static Size
 sum_free_pages(FreePageManager *fpm)
 {
-- 
2.25.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-03 07:28  Michael Paquier <michael@paquier.xyz>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 2 replies; 54+ messages in thread

From: Michael Paquier @ 2023-01-03 07:28 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers@lists.postgresql.org

On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:

     # Use larger ccache cache, as this task compiles with multiple compilers /
     # flag combinations
-    CCACHE_MAXSIZE: "1GB"
+    CCACHE_MAXSIZE: "1G"

In 0006, I am not sure how much this matters.  Perhaps somebody more
fluent with Cirrus, though, has a different opinion..

  * pointer to this structure.  The information here must be sufficient to
  * properly initialize each new TableScanDesc as workers join the scan, and it
- * must act as a information what to scan for those workers.
+ * must provide information what to scan for those workers.

This comment in 0009 is obviously incorrect, but I am not sure whether
your new suggestion is an improvement.  Do workers provide such
information or has this structure some information that the workers
rely on?

Not sure that the whitespace issue in 0021 for the header of inval.c
is worth caring about.

0014 and 0013 do not reduce the translation workload, as the messages
include some stuff specific to the GUC names accessed to, or some
specific details about the code paths triggered.

The rest has been applied where they matter.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Y7PZHbDrRMx5O9Hp@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-03 07:33  Amit Kapila <amit.kapila16@gmail.com>
  parent: Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 54+ messages in thread

From: Amit Kapila @ 2023-01-03 07:33 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers@lists.postgresql.org

On Tue, Jan 3, 2023 at 12:58 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
>
>      # Use larger ccache cache, as this task compiles with multiple compilers /
>      # flag combinations
> -    CCACHE_MAXSIZE: "1GB"
> +    CCACHE_MAXSIZE: "1G"
>
> In 0006, I am not sure how much this matters.
>

The other places in that file use M, so maybe, this is more consistent.

One minor comment:
-    spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set
+    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character set

Shouldn't this be <acronym>UTF8</acronym> as we are using in func.sgml?

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-03 08:41  Michael Paquier <michael@paquier.xyz>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2023-01-03 08:41 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers@lists.postgresql.org

On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
> One minor comment:
> -    spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set
> +    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character set
> 
> Shouldn't this be <acronym>UTF8</acronym> as we are using in func.sgml?

Yeah, I was wondering as well why this change is not worse, which is
why I left it out of 33ab0a2.  There is an acronym for UTF in
acronym.sgml, which makes sense to me, but that's the only place where 
this is used.  To add more on top of that, the docs basically need
only UTF8, and we have three references to UTF-16, none of them using
the <acronym> markup.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Y7PqVj4O4PnRsWeW@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-03 16:16  Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 54+ messages in thread

From: Peter Eisentraut @ 2023-01-03 16:16 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; Amit Kapila <amit.kapila16@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers@lists.postgresql.org

On 03.01.23 09:41, Michael Paquier wrote:
> On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
>> One minor comment:
>> -    spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set
>> +    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character set
>>
>> Shouldn't this be <acronym>UTF8</acronym> as we are using in func.sgml?
> 
> Yeah, I was wondering as well why this change is not worse, which is
> why I left it out of 33ab0a2.  There is an acronym for UTF in
> acronym.sgml, which makes sense to me, but that's the only place where
> this is used.  To add more on top of that, the docs basically need
> only UTF8, and we have three references to UTF-16, none of them using
> the <acronym> markup.

The thing is called "UTF-8".  Here, we are not talking about the 
PostgreSQL identifier.






^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-03 21:39  Justin Pryzby <pryzby@telsasoft.com>
  parent: Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2023-01-03 21:39 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers@lists.postgresql.org, Amit Kapila <amit.kapila16@gmail.com>

On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote:
> On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
> 
>      # Use larger ccache cache, as this task compiles with multiple compilers /
>      # flag combinations
> -    CCACHE_MAXSIZE: "1GB"
> +    CCACHE_MAXSIZE: "1G"
> 
> In 0006, I am not sure how much this matters.  Perhaps somebody more
> fluent with Cirrus, though, has a different opinion..

It's got almost nothing to do with cirrus.  It's an environment
variable, and we're using a suffix other than what's
supported/documented by ccache, which only happens to work.

> 0014 and 0013 do not reduce the translation workload, as the messages
> include some stuff specific to the GUC names accessed to, or some
> specific details about the code paths triggered.

It seems to matter because otherwise the translators sometimes re-type
the view name, which (not surprisingly) can get messed up, which is how
I mentioned having noticed this.

On Tue, Jan 03, 2023 at 05:41:58PM +0900, Michael Paquier wrote:
> On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
> > One minor comment:
> > -    spoken in Belgium (BE), with a <acronym>UTF-8</acronym>
> > character set
> > +    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8
> > character set
> > 
> > Shouldn't this be <acronym>UTF8</acronym> as we are using in
> > func.sgml?
> 
> Yeah, I was wondering as well why this change is not worse, which is
> why I left it out of 33ab0a2.  There is an acronym for UTF in
> acronym.sgml, which makes sense to me, but that's the only place where 
> this is used.  To add more on top of that, the docs basically need
> only UTF8, and we have three references to UTF-16, none of them using
> the <acronym> markup.

I changed it for consistency, as it's the only thing that says <>UTF-8<>
anywhere, and charset.sgml already says <>UTF<>-8 elsewhere.

Alternately, I suggest to change charset to say <>UTF8<> in both places.

-- 
Justin





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* [PATCH 6/9] typos
@ 2023-01-05 03:51  Justin Pryzby <pryzbyj@telsasoft.com>
  0 siblings, 0 replies; 54+ messages in thread

From: Justin Pryzby @ 2023-01-05 03:51 UTC (permalink / raw)

misspell-fixer and codespell
---
 src/backend/access/transam/xlogrecovery.c                       | 2 +-
 src/bin/psql/common.c                                           | 2 +-
 .../expected/test_pg_db_role_setting.out                        | 2 +-
 .../test_pg_db_role_setting/sql/test_pg_db_role_setting.sql     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index bc3c3eb3e79..5e657853066 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -2114,7 +2114,7 @@ CheckRecoveryConsistency(void)
 
 		/*
 		 * Check that pg_tblspc doesn't contain any real directories. Replay
-		 * of Database/CREATE_* records may have created ficticious tablespace
+		 * of Database/CREATE_* records may have created fictitious tablespace
 		 * directories that should have been removed by the time consistency
 		 * was reached.
 		 */
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 38f9b10b7c9..00627830c47 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1447,7 +1447,7 @@ ExecQueryAndProcessResults(const char *query,
 		if (!AcceptResult(result, false))
 		{
 			/*
-			 * Some error occured, either a server-side failure or a failure
+			 * Some error occurred, either a server-side failure or a failure
 			 * to submit the command string.  Record that.
 			 */
 			const char *error = PQresultErrorMessage(result);
diff --git a/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out b/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
index bee237cf40b..ec18692c558 100644
--- a/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
+++ b/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
@@ -122,7 +122,7 @@ SHOW test_pg_db_role_setting.user_param;
  bbb
 (1 row)
 
--- module is loaded, and placeholder values are succesfully set
+-- module is loaded, and placeholder values are successfully set
 SELECT load_test_pg_db_role_setting();
  load_test_pg_db_role_setting 
 ------------------------------
diff --git a/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql b/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
index c6095dfa98c..44f231c6b4b 100644
--- a/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
+++ b/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
@@ -56,7 +56,7 @@ ALTER ROLE regress_regular_user SET test_pg_db_role_setting.superuser_param = 'c
 SHOW test_pg_db_role_setting.superuser_param;
 SHOW test_pg_db_role_setting.user_param;
 
--- module is loaded, and placeholder values are succesfully set
+-- module is loaded, and placeholder values are successfully set
 SELECT load_test_pg_db_role_setting();
 
 SHOW test_pg_db_role_setting.superuser_param;
-- 
2.25.1


--KFztAG8eRSV9hGtP
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0007-f-typos-from-43620e328617c1f41a2a54c8cee01723064e3ff.patch"



^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-10 04:57  Justin Pryzby <pryzby@telsasoft.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2023-01-10 04:57 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers@lists.postgresql.org, Amit Kapila <amit.kapila16@gmail.com>

On Tue, Jan 03, 2023 at 03:39:22PM -0600, Justin Pryzby wrote:
> On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote:
> > On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
> > 
> >      # Use larger ccache cache, as this task compiles with multiple compilers /
> >      # flag combinations
> > -    CCACHE_MAXSIZE: "1GB"
> > +    CCACHE_MAXSIZE: "1G"
> > 
> > In 0006, I am not sure how much this matters.  Perhaps somebody more
> > fluent with Cirrus, though, has a different opinion..
> 
> It's got almost nothing to do with cirrus.  It's an environment
> variable, and we're using a suffix other than what's
> supported/documented by ccache, which only happens to work.
> 
> > 0014 and 0013 do not reduce the translation workload, as the messages
> > include some stuff specific to the GUC names accessed to, or some
> > specific details about the code paths triggered.
> 
> It seems to matter because otherwise the translators sometimes re-type
> the view name, which (not surprisingly) can get messed up, which is how
> I mentioned having noticed this.
> 
> On Tue, Jan 03, 2023 at 05:41:58PM +0900, Michael Paquier wrote:
> > On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
> > > One minor comment:
> > > -    spoken in Belgium (BE), with a <acronym>UTF-8</acronym>
> > > character set
> > > +    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8
> > > character set
> > > 
> > > Shouldn't this be <acronym>UTF8</acronym> as we are using in
> > > func.sgml?
> > 
> > Yeah, I was wondering as well why this change is not worse, which is
> > why I left it out of 33ab0a2.  There is an acronym for UTF in
> > acronym.sgml, which makes sense to me, but that's the only place where 
> > this is used.  To add more on top of that, the docs basically need
> > only UTF8, and we have three references to UTF-16, none of them using
> > the <acronym> markup.
> 
> I changed it for consistency, as it's the only thing that says <>UTF-8<>
> anywhere, and charset.sgml already says <>UTF<>-8 elsewhere.
> 
> Alternately, I suggest to change charset to say <>UTF8<> in both places.

As attached.
This also fixes "specualtive" in Amit's recent commit.

-- 
Justin

Attachments:

  [text/x-diff] 0001-typos.patch (656B, ../../20230110045722.GD9837@telsasoft.com/2-0001-typos.patch)
  download | inline diff:
From 8b56d6007e13e3b42bc75da3b9174ecab8a8dd70 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:40:36 -0500
Subject: [PATCH 1/9] typos

---
 .cirrus.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 69837bcd5ad..048a004e309 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -655,7 +655,7 @@ task:
 
     # Use larger ccache cache, as this task compiles with multiple compilers /
     # flag combinations
-    CCACHE_MAXSIZE: "1GB"
+    CCACHE_MAXSIZE: "1G"
     CCACHE_DIR: "/tmp/ccache_dir"
 
     LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
-- 
2.25.1

  [text/x-diff] 0002-comments-grammar-extended-and-other-stats.patch (6.9K, ../../20230110045722.GD9837@telsasoft.com/3-0002-comments-grammar-extended-and-other-stats.patch)
  download | inline diff:
From c082768a857ebd7a0a534ee497761dca0c621f64 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 2/9] comments grammar: extended (and other) stats

See:
202109272104.7t253iw236fb@alvherre.pgsql
070d2e19e40897d857f570f24888fc30727ed9c0
609b0652af00374b89411ea2613fd5bb92bca92c
a4d75c86bf15220df22de0a92c819ecef9db3849
7300a699502fe5432b05fbc75baca534b080bebb
ccaa3569f58796868303629bc2d63ddddb599b38
---
 src/backend/commands/statscmds.c                 | 4 ++--
 src/backend/statistics/README                    | 2 +-
 src/backend/statistics/dependencies.c            | 8 ++++----
 src/backend/statistics/extended_stats.c          | 4 ++--
 src/backend/utils/adt/pgstatfuncs.c              | 4 ++--
 src/backend/utils/adt/ruleutils.c                | 2 +-
 src/include/statistics/extended_stats_internal.h | 2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 26ebd0819d6..2e41745646b 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -377,7 +377,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 
 	/*
 	 * If no statistic type was specified, build them all (but only when the
-	 * statistics is defined on more than one column/expression).
+	 * statistics object is defined on more than one column/expression).
 	 */
 	if ((!requested_type) && (numcols >= 2))
 	{
@@ -432,7 +432,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 	 * similar to why we don't bother with extracting columns from
 	 * expressions. It's either expensive or very easy to defeat for
 	 * determined user, and there's no risk if we allow such statistics (the
-	 * statistics is useless, but harmless).
+	 * statistic is useless, but harmless).
 	 */
 	foreach(cell, stxexprs)
 	{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
 Compatible clause types
 -----------------------
 
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
 
     (a) functional dependencies - equality clauses (AND), possibly IS NULL
 
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index e6e2835345e..a54e038d6a1 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -846,7 +846,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
 			AttrNumber	clause_attnum;
 
 			/*
-			 * Had we found incompatible clause in the arguments, treat the
+			 * If we found an incompatible clause in the arguments, treat the
 			 * whole clause as incompatible.
 			 */
 			if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1274,7 +1274,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
 			Node	   *or_expr = NULL;
 
 			/*
-			 * Had we found incompatible expression in the arguments, treat
+			 * If we found an incompatible expression in the arguments, treat
 			 * the whole expression as incompatible.
 			 */
 			if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
@@ -1725,7 +1725,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 
 					/*
 					 * For expressions, we need to do two translations. First
-					 * we have to translate the negative attnum to index in
+					 * we have to translate the negative attnum to an index in
 					 * the list of expressions (in the statistics object).
 					 * Then we need to see if there's a matching clause. The
 					 * index of the unique expression determines the attnum
@@ -1733,7 +1733,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 					 */
 					idx = -(1 + attnum);
 
-					/* Is the expression index is valid? */
+					/* Is the expression index valid? */
 					Assert((idx >= 0) && (idx < list_length(stat->exprs)));
 
 					expr = (Node *) list_nth(stat->exprs, idx);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index bdc21bb4577..edc7352562c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1214,8 +1214,8 @@ stat_covers_expressions(StatisticExtInfo *stat, List *exprs,
 
 /*
  * choose_best_statistics
- *		Look for and return statistics with the specified 'requiredkind' which
- *		have keys that match at least two of the given attnums.  Return NULL if
+ *		Look for and return the statistics object with the specified 'requiredkind' which
+ *		has keys that match at least two of the given attnums.  Return NULL if
  *		there's no match.
  *
  * The current selection criteria is very simple - we choose the statistics
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6cddd74aa76..fb46153d8bb 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1749,7 +1749,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
 }
 
 /*
- * Get the statistics for the replication slot. If the slot statistics is not
+ * Get the statistics for the replication slot. If the slot statistics are not
  * available, return all-zeroes stats.
  */
 Datum
@@ -1821,7 +1821,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
 
 /*
  * Get the subscription statistics for the given subscription. If the
- * subscription statistics is not available, return all-zeros stats.
+ * subscription statistics are not available, return all-zeros stats.
  */
 Datum
 pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 9ac42efdbc3..da59c85d3d5 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1699,7 +1699,7 @@ pg_get_statisticsobj_worker(Oid statextid, bool columns_only, bool missing_ok)
 		 * will create all statistics types on a newer postgres version, if
 		 * the statistics had all options enabled on the original version.
 		 *
-		 * But if the statistics is defined on just a single column, it has to
+		 * But if the statistics are defined on just a single column, it has to
 		 * be an expression statistics. In that case we don't need to specify
 		 * kinds.
 		 */
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index 7b55eb8ffac..72f94814704 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -57,7 +57,7 @@ typedef struct SortItem
 	int			count;
 } SortItem;
 
-/* a unified representation of the data the statistics is built on */
+/* a unified representation of the data the statistics object is built on */
 typedef struct StatsBuildData
 {
 	int			numrows;
-- 
2.25.1

  [text/x-diff] 0003-fix-whitespace.patch (13.6K, ../../20230110045722.GD9837@telsasoft.com/4-0003-fix-whitespace.patch)
  download | inline diff:
From 6a80a46886d3659a3ccd5783fdf16b2ae750d73b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 3/9] fix whitespace

weird since c91560defc57f89f7e88632ea14ae77b5cec78ee

See also:
https://www.postgresql.org/message-id/CAFBsxsHtYvE1Txm+NYM5gB1C3EZN_qDPJOOsJK_VsC2DXqZfcA@mail.gmail.com
---
 src/backend/utils/cache/inval.c | 188 ++++++++++++++++----------------
 src/backend/utils/mmgr/mcxt.c   |   4 +-
 2 files changed, 96 insertions(+), 96 deletions(-)

diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 0008826f67c..cc7de542b1e 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -3,100 +3,100 @@
  * inval.c
  *	  POSTGRES cache invalidation dispatcher code.
  *
- *	This is subtle stuff, so pay attention:
- *
- *	When a tuple is updated or deleted, our standard visibility rules
- *	consider that it is *still valid* so long as we are in the same command,
- *	ie, until the next CommandCounterIncrement() or transaction commit.
- *	(See access/heap/heapam_visibility.c, and note that system catalogs are
- *  generally scanned under the most current snapshot available, rather than
- *  the transaction snapshot.)	At the command boundary, the old tuple stops
- *	being valid and the new version, if any, becomes valid.  Therefore,
- *	we cannot simply flush a tuple from the system caches during heap_update()
- *	or heap_delete().  The tuple is still good at that point; what's more,
- *	even if we did flush it, it might be reloaded into the caches by a later
- *	request in the same command.  So the correct behavior is to keep a list
- *	of outdated (updated/deleted) tuples and then do the required cache
- *	flushes at the next command boundary.  We must also keep track of
- *	inserted tuples so that we can flush "negative" cache entries that match
- *	the new tuples; again, that mustn't happen until end of command.
- *
- *	Once we have finished the command, we still need to remember inserted
- *	tuples (including new versions of updated tuples), so that we can flush
- *	them from the caches if we abort the transaction.  Similarly, we'd better
- *	be able to flush "negative" cache entries that may have been loaded in
- *	place of deleted tuples, so we still need the deleted ones too.
- *
- *	If we successfully complete the transaction, we have to broadcast all
- *	these invalidation events to other backends (via the SI message queue)
- *	so that they can flush obsolete entries from their caches.  Note we have
- *	to record the transaction commit before sending SI messages, otherwise
- *	the other backends won't see our updated tuples as good.
- *
- *	When a subtransaction aborts, we can process and discard any events
- *	it has queued.  When a subtransaction commits, we just add its events
- *	to the pending lists of the parent transaction.
- *
- *	In short, we need to remember until xact end every insert or delete
- *	of a tuple that might be in the system caches.  Updates are treated as
- *	two events, delete + insert, for simplicity.  (If the update doesn't
- *	change the tuple hash value, catcache.c optimizes this into one event.)
- *
- *	We do not need to register EVERY tuple operation in this way, just those
- *	on tuples in relations that have associated catcaches.  We do, however,
- *	have to register every operation on every tuple that *could* be in a
- *	catcache, whether or not it currently is in our cache.  Also, if the
- *	tuple is in a relation that has multiple catcaches, we need to register
- *	an invalidation message for each such catcache.  catcache.c's
- *	PrepareToInvalidateCacheTuple() routine provides the knowledge of which
- *	catcaches may need invalidation for a given tuple.
- *
- *	Also, whenever we see an operation on a pg_class, pg_attribute, or
- *	pg_index tuple, we register a relcache flush operation for the relation
- *	described by that tuple (as specified in CacheInvalidateHeapTuple()).
- *	Likewise for pg_constraint tuples for foreign keys on relations.
- *
- *	We keep the relcache flush requests in lists separate from the catcache
- *	tuple flush requests.  This allows us to issue all the pending catcache
- *	flushes before we issue relcache flushes, which saves us from loading
- *	a catcache tuple during relcache load only to flush it again right away.
- *	Also, we avoid queuing multiple relcache flush requests for the same
- *	relation, since a relcache flush is relatively expensive to do.
- *	(XXX is it worth testing likewise for duplicate catcache flush entries?
- *	Probably not.)
- *
- *	Many subsystems own higher-level caches that depend on relcache and/or
- *	catcache, and they register callbacks here to invalidate their caches.
- *	While building a higher-level cache entry, a backend may receive a
- *	callback for the being-built entry or one of its dependencies.  This
- *	implies the new higher-level entry would be born stale, and it might
- *	remain stale for the life of the backend.  Many caches do not prevent
- *	that.  They rely on DDL for can't-miss catalog changes taking
- *	AccessExclusiveLock on suitable objects.  (For a change made with less
- *	locking, backends might never read the change.)  The relation cache,
- *	however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
- *	than the beginning of the next transaction.  Hence, when a relevant
- *	invalidation callback arrives during a build, relcache.c reattempts that
- *	build.  Caches with similar needs could do likewise.
- *
- *	If a relcache flush is issued for a system relation that we preload
- *	from the relcache init file, we must also delete the init file so that
- *	it will be rebuilt during the next backend restart.  The actual work of
- *	manipulating the init file is in relcache.c, but we keep track of the
- *	need for it here.
- *
- *	Currently, inval messages are sent without regard for the possibility
- *	that the object described by the catalog tuple might be a session-local
- *	object such as a temporary table.  This is because (1) this code has
- *	no practical way to tell the difference, and (2) it is not certain that
- *	other backends don't have catalog cache or even relcache entries for
- *	such tables, anyway; there is nothing that prevents that.  It might be
- *	worth trying to avoid sending such inval traffic in the future, if those
- *	problems can be overcome cheaply.
- *
- *	When wal_level=logical, write invalidations into WAL at each command end to
- *	support the decoding of the in-progress transactions.  See
- *	CommandEndInvalidationMessages.
+ * This is subtle stuff, so pay attention:
+ *
+ * When a tuple is updated or deleted, our standard visibility rules
+ * consider that it is *still valid* so long as we are in the same command,
+ * ie, until the next CommandCounterIncrement() or transaction commit.
+ * (See access/heap/heapam_visibility.c, and note that system catalogs are
+ * generally scanned under the most current snapshot available, rather than
+ * the transaction snapshot.)  At the command boundary, the old tuple stops
+ * being valid and the new version, if any, becomes valid.  Therefore,
+ * we cannot simply flush a tuple from the system caches during heap_update()
+ * or heap_delete().  The tuple is still good at that point; what's more,
+ * even if we did flush it, it might be reloaded into the caches by a later
+ * request in the same command.  So the correct behavior is to keep a list
+ * of outdated (updated/deleted) tuples and then do the required cache
+ * flushes at the next command boundary.  We must also keep track of
+ * inserted tuples so that we can flush "negative" cache entries that match
+ * the new tuples; again, that mustn't happen until end of command.
+ *
+ * Once we have finished the command, we still need to remember inserted
+ * tuples (including new versions of updated tuples), so that we can flush
+ * them from the caches if we abort the transaction.  Similarly, we'd better
+ * be able to flush "negative" cache entries that may have been loaded in
+ * place of deleted tuples, so we still need the deleted ones too.
+ *
+ * If we successfully complete the transaction, we have to broadcast all
+ * these invalidation events to other backends (via the SI message queue)
+ * so that they can flush obsolete entries from their caches.  Note we have
+ * to record the transaction commit before sending SI messages, otherwise
+ * the other backends won't see our updated tuples as good.
+ *
+ * When a subtransaction aborts, we can process and discard any events
+ * it has queued.  When a subtransaction commits, we just add its events
+ * to the pending lists of the parent transaction.
+ *
+ * In short, we need to remember until xact end every insert or delete
+ * of a tuple that might be in the system caches.  Updates are treated as
+ * two events, delete + insert, for simplicity.  (If the update doesn't
+ * change the tuple hash value, catcache.c optimizes this into one event.)
+ *
+ * We do not need to register EVERY tuple operation in this way, just those
+ * on tuples in relations that have associated catcaches.  We do, however,
+ * have to register every operation on every tuple that *could* be in a
+ * catcache, whether or not it currently is in our cache.  Also, if the
+ * tuple is in a relation that has multiple catcaches, we need to register
+ * an invalidation message for each such catcache.  catcache.c's
+ * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
+ * catcaches may need invalidation for a given tuple.
+ *
+ * Also, whenever we see an operation on a pg_class, pg_attribute, or
+ * pg_index tuple, we register a relcache flush operation for the relation
+ * described by that tuple (as specified in CacheInvalidateHeapTuple()).
+ * Likewise for pg_constraint tuples for foreign keys on relations.
+ *
+ * We keep the relcache flush requests in lists separate from the catcache
+ * tuple flush requests.  This allows us to issue all the pending catcache
+ * flushes before we issue relcache flushes, which saves us from loading
+ * a catcache tuple during relcache load only to flush it again right away.
+ * Also, we avoid queuing multiple relcache flush requests for the same
+ * relation, since a relcache flush is relatively expensive to do.
+ * (XXX is it worth testing likewise for duplicate catcache flush entries?
+ * Probably not.)
+ *
+ * Many subsystems own higher-level caches that depend on relcache and/or
+ * catcache, and they register callbacks here to invalidate their caches.
+ * While building a higher-level cache entry, a backend may receive a
+ * callback for the being-built entry or one of its dependencies.  This
+ * implies the new higher-level entry would be born stale, and it might
+ * remain stale for the life of the backend.  Many caches do not prevent
+ * that.  They rely on DDL for can't-miss catalog changes taking
+ * AccessExclusiveLock on suitable objects.  (For a change made with less
+ * locking, backends might never read the change.)  The relation cache,
+ * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
+ * than the beginning of the next transaction.  Hence, when a relevant
+ * invalidation callback arrives during a build, relcache.c reattempts that
+ * build.  Caches with similar needs could do likewise.
+ *
+ * If a relcache flush is issued for a system relation that we preload
+ * from the relcache init file, we must also delete the init file so that
+ * it will be rebuilt during the next backend restart.  The actual work of
+ * manipulating the init file is in relcache.c, but we keep track of the
+ * need for it here.
+ *
+ * Currently, inval messages are sent without regard for the possibility
+ * that the object described by the catalog tuple might be a session-local
+ * object such as a temporary table.  This is because (1) this code has
+ * no practical way to tell the difference, and (2) it is not certain that
+ * other backends don't have catalog cache or even relcache entries for
+ * such tables, anyway; there is nothing that prevents that.  It might be
+ * worth trying to avoid sending such inval traffic in the future, if those
+ * problems can be overcome cheaply.
+ *
+ * When wal_level=logical, write invalidations into WAL at each command end to
+ * support the decoding of the in-progress transactions.  See
+ * CommandEndInvalidationMessages.
  *
  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 8b6591abfb2..392602a020f 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -929,7 +929,7 @@ MemoryContextCheck(MemoryContext context)
  * context creation routines, not by the unwashed masses.
  *
  * The memory context creation procedure goes like this:
- *	1.  Context-type-specific routine makes some initial space allocation,
+ *	1.	Context-type-specific routine makes some initial space allocation,
  *		including enough space for the context header.  If it fails,
  *		it can ereport() with no damage done.
  *	2.	Context-type-specific routine sets up all type-specific fields of
@@ -939,7 +939,7 @@ MemoryContextCheck(MemoryContext context)
  *		the initial space allocation should be freed before ereport'ing.
  *	3.	Context-type-specific routine calls MemoryContextCreate() to fill in
  *		the generic header fields and link the context into the context tree.
- *	4.  We return to the context-type-specific routine, which finishes
+ *	4.	We return to the context-type-specific routine, which finishes
  *		up type-specific initialization.  This routine can now do things
  *		that might fail (like allocate more memory), so long as it's
  *		sure the node is left in a state that delete will handle.
-- 
2.25.1

  [text/x-diff] 0004-doc-acronym-UTF.patch (766B, ../../20230110045722.GD9837@telsasoft.com/5-0004-doc-acronym-UTF.patch)
  download | inline diff:
From 6c9ab2b6afbfb40239b37d23950736d903b45ee7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:46:20 -0500
Subject: [PATCH 4/9] doc: acronym: UTF

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

diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 3032392b801..1b17c1fa8c1 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -2727,7 +2727,7 @@ RESET client_encoding;
 
        <listitem>
         <para>
-         <acronym>UTF</acronym>-8 (8-bit UCS/Unicode Transformation
+         <acronym>UTF-8</acronym> (8-bit UCS/Unicode Transformation
          Format) is defined here.
         </para>
        </listitem>
-- 
2.25.1

  [text/x-diff] 0005-doc-speculative-Perform-apply-of-large-transactions-.patch (915B, ../../20230110045722.GD9837@telsasoft.com/6-0005-doc-speculative-Perform-apply-of-large-transactions-.patch)
  download | inline diff:
From 899185d3f6f79c22e856ee3ea36e1fb089d0c6ed Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 9 Jan 2023 22:38:16 -0600
Subject: [PATCH 5/9] doc: speculative: Perform apply of large transactions by
 parallel workers.

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

diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index 5b1c73269b9..7c8fc3f654b 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -1580,7 +1580,7 @@
   </para>
 
   <para>
-   A specualtive insertion lock consists of a transaction ID and a speculative
+   A speculative insertion lock consists of a transaction ID and a speculative
    insertion token. The speculative insertion token is displayed in the
    <structfield>objid</structfield> column.
   </para>
-- 
2.25.1

  [text/x-diff] 0006-typos.patch (3.1K, ../../20230110045722.GD9837@telsasoft.com/7-0006-typos.patch)
  download | inline diff:
From f872b6ee52953522eef113a1e0801d0b05fabfbe Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 4 Jan 2023 21:51:30 -0600
Subject: [PATCH 6/9] typos

misspell-fixer and codespell
---
 src/backend/access/transam/xlogrecovery.c                       | 2 +-
 src/bin/psql/common.c                                           | 2 +-
 .../expected/test_pg_db_role_setting.out                        | 2 +-
 .../test_pg_db_role_setting/sql/test_pg_db_role_setting.sql     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index bc3c3eb3e79..5e657853066 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -2114,7 +2114,7 @@ CheckRecoveryConsistency(void)
 
 		/*
 		 * Check that pg_tblspc doesn't contain any real directories. Replay
-		 * of Database/CREATE_* records may have created ficticious tablespace
+		 * of Database/CREATE_* records may have created fictitious tablespace
 		 * directories that should have been removed by the time consistency
 		 * was reached.
 		 */
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 38f9b10b7c9..00627830c47 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1447,7 +1447,7 @@ ExecQueryAndProcessResults(const char *query,
 		if (!AcceptResult(result, false))
 		{
 			/*
-			 * Some error occured, either a server-side failure or a failure
+			 * Some error occurred, either a server-side failure or a failure
 			 * to submit the command string.  Record that.
 			 */
 			const char *error = PQresultErrorMessage(result);
diff --git a/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out b/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
index bee237cf40b..ec18692c558 100644
--- a/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
+++ b/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
@@ -122,7 +122,7 @@ SHOW test_pg_db_role_setting.user_param;
  bbb
 (1 row)
 
--- module is loaded, and placeholder values are succesfully set
+-- module is loaded, and placeholder values are successfully set
 SELECT load_test_pg_db_role_setting();
  load_test_pg_db_role_setting 
 ------------------------------
diff --git a/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql b/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
index c6095dfa98c..44f231c6b4b 100644
--- a/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
+++ b/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
@@ -56,7 +56,7 @@ ALTER ROLE regress_regular_user SET test_pg_db_role_setting.superuser_param = 'c
 SHOW test_pg_db_role_setting.superuser_param;
 SHOW test_pg_db_role_setting.user_param;
 
--- module is loaded, and placeholder values are succesfully set
+-- module is loaded, and placeholder values are successfully set
 SELECT load_test_pg_db_role_setting();
 
 SHOW test_pg_db_role_setting.superuser_param;
-- 
2.25.1

  [text/x-diff] 0007-f-typos-from-43620e328617c1f41a2a54c8cee01723064e3ff.patch (1.2K, ../../20230110045722.GD9837@telsasoft.com/8-0007-f-typos-from-43620e328617c1f41a2a54c8cee01723064e3ff.patch)
  download | inline diff:
From 0b0db64fb0f9782d536a0d35c3276cd0ec769809 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 3 Jan 2023 15:05:24 -0600
Subject: [PATCH 7/9] f!typos from 43620e328617c1f41a2a54c8cee01723064e3ffa

---
 src/backend/utils/mmgr/mcxt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 392602a020f..1c9eadeb167 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -717,9 +717,9 @@ MemoryContextStatsDetail(MemoryContext context, int max_children,
 		 * to the connected client.
 		 *
 		 * We don't buffer the information about all memory contexts in a
-		 * backend into StringInfo and log it as one message. Otherwise which
-		 * may require the buffer to be enlarged very much and lead to OOM
-		 * error since there can be a large number of memory contexts in a
+		 * backend into StringInfo and log it as one message. That would
+		 * require the buffer to be enlarged and could even incur an OOM
+		 * condition since there can be a large number of memory contexts in a
 		 * backend. Instead, we log one message per memory context.
 		 */
 		ereport(LOG_SERVER_ONLY,
-- 
2.25.1

  [text/x-diff] 0008-doc-review-v16-Add-USER-SET-parameter-values-for-pg_.patch (3.1K, ../../20230110045722.GD9837@telsasoft.com/9-0008-doc-review-v16-Add-USER-SET-parameter-values-for-pg_.patch)
  download | inline diff:
From 04c4fb3608ece1b80bbd86c6e9692da06f1c61b3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 6 Jan 2023 11:17:49 -0600
Subject: [PATCH 8/9] doc review: v16: Add USER SET parameter values for
 pg_db_role_setting

096dd80f3ccc103c8e078fca05e6ccfb2071aa91
---
 doc/src/sgml/ref/alter_database.sgml | 6 +++---
 doc/src/sgml/ref/alter_role.sgml     | 6 +++---
 doc/src/sgml/ref/psql-ref.sgml       | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml
index 181e9d36205..0962f32e134 100644
--- a/doc/src/sgml/ref/alter_database.sgml
+++ b/doc/src/sgml/ref/alter_database.sgml
@@ -211,9 +211,9 @@ ALTER DATABASE <replaceable class="parameter">name</replaceable> RESET ALL
       <term><literal>USER SET</literal></term>
       <listitem>
        <para>
-        Specifies that variable should be set on behalf of ordinary role.
-        That lets non-superuser and non-replication role to set placeholder
-        variables, with permission requirements is not known yet;
+        Specifies that the variable should be set on behalf of an ordinary role.
+        That allows non-superuser and non-replication roles to set placeholder
+        variables, whose permission requirements are not known yet;
         see <xref linkend="runtime-config-custom"/>. The variable won't
         be set if it appears to require superuser privileges.
        </para>
diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml
index f5c1264942f..d7c5e8debce 100644
--- a/doc/src/sgml/ref/alter_role.sgml
+++ b/doc/src/sgml/ref/alter_role.sgml
@@ -239,9 +239,9 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
       <term><literal>USER SET</literal></term>
       <listitem>
        <para>
-        Specifies that variable should be set on behalf of ordinary role.
-        That lets non-superuser and non-replication role to set placeholder
-        variables, with permission requirements is not known yet;
+        Specifies that the variable should be set on behalf of an ordinary role.
+        That allows non-superuser and non-replication roles to set placeholder
+        variables, whose permission requirements are not known yet;
         see <xref linkend="runtime-config-custom"/>. The variable won't
         be set if it appears to require superuser privileges.
        </para>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 1a117dbecba..dc6528dc11d 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1901,8 +1901,8 @@ INSERT INTO tbl1 VALUES ($1, $2) \bind 'first value' 'second value' \g
         </para>
 
         <para>
-        Since <productname>PostgreSQL</productname> 16 the output includes
-        column with the values of
+        Since <productname>PostgreSQL</productname> 16, the output includes a
+        column with the values of the
         <link linkend="sql-alterrole-user-set"><literal>USER SET</literal></link>
         flag for each setting.
         </para>
-- 
2.25.1

  [text/x-diff] 0009-remove-declared-but-undefined-functions.patch (2.2K, ../../20230110045722.GD9837@telsasoft.com/10-0009-remove-declared-but-undefined-functions.patch)
  download | inline diff:
From a268bc969f057c591db1e4b219d2fc30352d1a60 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 9 Jan 2023 13:21:02 -0600
Subject: [PATCH 9/9] remove declared but undefined functions

See:
b060dbe0001a1d6bf26cd294710f3cb203868d46
773df883e8f7543958d0d719c025b5f47c5a67f0
5b48925ad6ea04d1dfb5f893d1fa9dadd2a6a205
---
 src/bin/pg_dump/compress_io.h     | 2 --
 src/include/access/gist_private.h | 2 --
 src/include/access/xlogreader.h   | 2 --
 3 files changed, 6 deletions(-)

diff --git a/src/bin/pg_dump/compress_io.h b/src/bin/pg_dump/compress_io.h
index c04773a4006..a429dc4789d 100644
--- a/src/bin/pg_dump/compress_io.h
+++ b/src/bin/pg_dump/compress_io.h
@@ -54,8 +54,6 @@ typedef struct cfp cfp;
 
 extern cfp *cfopen(const char *path, const char *mode,
 				   const pg_compress_specification compression_spec);
-extern cfp *cfdopen(int fd, const char *mode,
-					pg_compress_specification compression_spec);
 extern cfp *cfopen_read(const char *path, const char *mode);
 extern cfp *cfopen_write(const char *path, const char *mode,
 						 const pg_compress_specification compression_spec);
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index f2bb4455f57..8af33d7b40d 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -549,8 +549,6 @@ extern void gistSplitByKey(Relation r, Page page, IndexTuple *itup,
 /* gistbuild.c */
 extern IndexBuildResult *gistbuild(Relation heap, Relation index,
 								   struct IndexInfo *indexInfo);
-extern void gistValidateBufferingOption(const char *value);
-
 /* gistbuildbuffers.c */
 extern GISTBuildBuffers *gistInitBuildBuffers(int pagesPerBuffer, int levelStep,
 											  int maxLevel);
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h
index da64f99f0b3..d77bb2ab9bc 100644
--- a/src/include/access/xlogreader.h
+++ b/src/include/access/xlogreader.h
@@ -332,8 +332,6 @@ extern XLogReaderState *XLogReaderAllocate(int wal_segment_size,
 										   const char *waldir,
 										   XLogReaderRoutine *routine,
 										   void *private_data);
-extern XLogReaderRoutine *LocalXLogReaderRoutine(void);
-
 /* Free an XLogReader */
 extern void XLogReaderFree(XLogReaderState *state);
 
-- 
2.25.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-10 06:54  Amit Kapila <amit.kapila16@gmail.com>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Amit Kapila @ 2023-01-10 06:54 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-hackers@lists.postgresql.org

On Tue, Jan 10, 2023 at 10:27 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Tue, Jan 03, 2023 at 03:39:22PM -0600, Justin Pryzby wrote:
> > On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote:
> > > On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
> > >
> > >      # Use larger ccache cache, as this task compiles with multiple compilers /
> > >      # flag combinations
> > > -    CCACHE_MAXSIZE: "1GB"
> > > +    CCACHE_MAXSIZE: "1G"
> > >
> > > In 0006, I am not sure how much this matters.  Perhaps somebody more
> > > fluent with Cirrus, though, has a different opinion..
> >
> > It's got almost nothing to do with cirrus.  It's an environment
> > variable, and we're using a suffix other than what's
> > supported/documented by ccache, which only happens to work.
> >
> > > 0014 and 0013 do not reduce the translation workload, as the messages
> > > include some stuff specific to the GUC names accessed to, or some
> > > specific details about the code paths triggered.
> >
> > It seems to matter because otherwise the translators sometimes re-type
> > the view name, which (not surprisingly) can get messed up, which is how
> > I mentioned having noticed this.
> >
> > On Tue, Jan 03, 2023 at 05:41:58PM +0900, Michael Paquier wrote:
> > > On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
> > > > One minor comment:
> > > > -    spoken in Belgium (BE), with a <acronym>UTF-8</acronym>
> > > > character set
> > > > +    spoken in Belgium (BE), with a <acronym>UTF</acronym>-8
> > > > character set
> > > >
> > > > Shouldn't this be <acronym>UTF8</acronym> as we are using in
> > > > func.sgml?
> > >
> > > Yeah, I was wondering as well why this change is not worse, which is
> > > why I left it out of 33ab0a2.  There is an acronym for UTF in
> > > acronym.sgml, which makes sense to me, but that's the only place where
> > > this is used.  To add more on top of that, the docs basically need
> > > only UTF8, and we have three references to UTF-16, none of them using
> > > the <acronym> markup.
> >
> > I changed it for consistency, as it's the only thing that says <>UTF-8<>
> > anywhere, and charset.sgml already says <>UTF<>-8 elsewhere.
> >
> > Alternately, I suggest to change charset to say <>UTF8<> in both places.
>
> As attached.
> This also fixes "specualtive" in Amit's recent commit.
>

Thanks for noticing this. I'll take care of this and some other typo
patches together.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-10 07:48  Michael Paquier <michael@paquier.xyz>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2023-01-10 07:48 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers@lists.postgresql.org

On Tue, Jan 10, 2023 at 12:24:40PM +0530, Amit Kapila wrote:
> Thanks for noticing this. I'll take care of this and some other typo
> patches together.

Does this include 0010?  I was just looking at the whole set and this
one looked like a cleanup worth on its own so I was going to handle
it, until I saw your update.  If you are also looking at that, I won't
stand in your way, of course :) 
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Y70YN3RpQNBUJDeS@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-10 08:25  Amit Kapila <amit.kapila16@gmail.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 54+ messages in thread

From: Amit Kapila @ 2023-01-10 08:25 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers@lists.postgresql.org

On Tue, Jan 10, 2023 at 1:18 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, Jan 10, 2023 at 12:24:40PM +0530, Amit Kapila wrote:
> > Thanks for noticing this. I'll take care of this and some other typo
> > patches together.
>
> Does this include 0010?  I was just looking at the whole set and this
> one looked like a cleanup worth on its own so I was going to handle
> it, until I saw your update.  If you are also looking at that, I won't
> stand in your way, of course :)
>

I have not yet started, so please go ahead.

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-01-11 06:26  Michael Paquier <michael@paquier.xyz>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2023-01-11 06:26 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers@lists.postgresql.org

On Tue, Jan 10, 2023 at 01:55:56PM +0530, Amit Kapila wrote:
> I have not yet started, so please go ahead.

Okay, I have looked at that and fixed the whole new things, including
the typo you have introduced.  0001~0004 have been left out, as of the
same reasons as upthread.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Y75Wgpu0GLU3ArGv@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-02-08 15:56  Justin Pryzby <pryzby@telsasoft.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 54+ messages in thread

From: Justin Pryzby @ 2023-02-08 15:56 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Amit Kapila <amit.kapila16@gmail.com>; pgsql-hackers@lists.postgresql.org

Some more accumulated/new typos.

Attachments:

  [text/x-diff] 0001-use-an-SQL-rather-than-a-SQL.patch (1.8K, ../../20230208155644.GM1653@telsasoft.com/2-0001-use-an-SQL-rather-than-a-SQL.patch)
  download | inline diff:
From 6c79a0d4e0251dbbac38babb60bb2d0fbae3da8d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 11 Jan 2023 12:52:25 -0600
Subject: [PATCH 01/10] use "an SQL" rather than a SQL

Per 04539e
---
 doc/src/sgml/ecpg.sgml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index a76cf3538f1..f52165165dc 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -1506,7 +1506,7 @@ EXEC SQL TYPE serial_t IS long;
      </para>
 
      <para>
-      Any word you declare as a typedef cannot be used as a SQL keyword
+      Any word you declare as a typedef cannot be used as an SQL keyword
       in <literal>EXEC SQL</literal> commands later in the same program.
       For example, this won't work:
 <programlisting>
@@ -1518,7 +1518,7 @@ EXEC SQL START TRANSACTION;
 </programlisting>
       ECPG will report a syntax error for <literal>START
       TRANSACTION</literal>, because it no longer
-      recognizes <literal>START</literal> as a SQL keyword,
+      recognizes <literal>START</literal> as an SQL keyword,
       only as a typedef.
       (If you have such a conflict, and renaming the typedef
       seems impractical, you could write the SQL command
@@ -1530,7 +1530,7 @@ EXEC SQL START TRANSACTION;
        In <productname>PostgreSQL</productname> releases before v16, use
        of SQL keywords as typedef names was likely to result in syntax
        errors associated with use of the typedef itself, rather than use
-       of the name as a SQL keyword.  The new behavior is less likely to
+       of the name as an SQL keyword.  The new behavior is less likely to
        cause problems when an existing ECPG application is recompiled in
        a new <productname>PostgreSQL</productname> release with new
        keywords.
-- 
2.25.1

  [text/x-diff] 0002-comment-typos.patch (8.7K, ../../20230208155644.GM1653@telsasoft.com/3-0002-comment-typos.patch)
  download | inline diff:
From fef49b822bad849722ec9b043ffd676c80492d0d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 15 Jan 2023 17:00:06 -0600
Subject: [PATCH 02/10] comment typos

---
 src/backend/commands/dbcommands.c              | 2 +-
 src/backend/executor/execMain.c                | 2 +-
 src/backend/jit/llvm/llvmjit_inline.cpp        | 2 +-
 src/backend/replication/logical/snapbuild.c    | 2 +-
 src/backend/replication/walsender.c            | 6 +++---
 src/bin/pg_dump/pg_backup_custom.c             | 2 +-
 src/bin/pg_dump/pg_dumpall.c                   | 2 +-
 src/include/lib/ilist.h                        | 2 +-
 src/test/regress/expected/alter_table.out      | 2 +-
 src/test/regress/expected/create_procedure.out | 2 +-
 src/test/regress/sql/alter_table.sql           | 2 +-
 src/test/regress/sql/create_procedure.sql      | 2 +-
 src/test/subscription/t/031_column_list.pl     | 2 +-
 13 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 1f4ce2fb9cf..ef05633bb05 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -3090,7 +3090,7 @@ dbase_redo(XLogReaderState *record)
 
 		/*
 		 * There's a case where the copy source directory is missing for the
-		 * same reason above.  Create the emtpy source directory so that
+		 * same reason above.  Create the empty source directory so that
 		 * copydir below doesn't fail.  The directory will be dropped soon by
 		 * recovery.
 		 */
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index a5115b9c1f7..39bfb48dc22 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -134,7 +134,7 @@ ExecutorStart(QueryDesc *queryDesc, int eflags)
 	/*
 	 * In some cases (e.g. an EXECUTE statement) a query execution will skip
 	 * parse analysis, which means that the query_id won't be reported.  Note
-	 * that it's harmless to report the query_id multiple time, as the call
+	 * that it's harmless to report the query_id multiple times, as the call
 	 * will be ignored if the top level query_id has already been reported.
 	 */
 	pgstat_report_query_id(queryDesc->plannedstmt->queryId, false);
diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp
index dc35e002f51..c765add8564 100644
--- a/src/backend/jit/llvm/llvmjit_inline.cpp
+++ b/src/backend/jit/llvm/llvmjit_inline.cpp
@@ -753,7 +753,7 @@ function_inlinable(llvm::Function &F,
 		/* import referenced function itself */
 		importVars.insert(referencedFunction->getName());
 
-		/* import referenced function and its dependants */
+		/* import referenced function and its dependents */
 		for (auto& recImportVar : recImportVars)
 			importVars.insert(recImportVar.first());
 	}
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 829c5681120..62542827e4b 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1816,7 +1816,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
 	fsync_fname("pg_logical/snapshots", true);
 
 	/*
-	 * Now there's no way we can loose the dumped state anymore, remember this
+	 * Now there's no way we can lose the dumped state anymore, remember this
 	 * as a serialization point.
 	 */
 	builder->last_serialized_snapshot = lsn;
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 4ed3747e3f9..75e8363e248 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2050,9 +2050,9 @@ PhysicalConfirmReceivedLocation(XLogRecPtr lsn)
 
 	/*
 	 * One could argue that the slot should be saved to disk now, but that'd
-	 * be energy wasted - the worst lost information can do here is give us
-	 * wrong information in a statistics view - we'll just potentially be more
-	 * conservative in removing files.
+	 * be energy wasted - the worst thing lost information could cause here is
+	 * to give wrong information in a statistics view - we'll just potentially
+	 * be more conservative in removing files.
 	 */
 }
 
diff --git a/src/bin/pg_dump/pg_backup_custom.c b/src/bin/pg_dump/pg_backup_custom.c
index d1e54644a94..7529367a7b9 100644
--- a/src/bin/pg_dump/pg_backup_custom.c
+++ b/src/bin/pg_dump/pg_backup_custom.c
@@ -99,7 +99,7 @@ static size_t _CustomReadFunc(ArchiveHandle *AH, char **buf, size_t *buflen);
  *	It's task is to create any extra archive context (using AH->formatData),
  *	and to initialize the supported function pointers.
  *
- *	It should also prepare whatever it's input source is for reading/writing,
+ *	It should also prepare whatever its input source is for reading/writing,
  *	and in the case of a read mode connection, it should load the Header & TOC.
  */
 void
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index fbd1c6fc85b..cd421c59443 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -995,7 +995,7 @@ dumpRoleMembership(PGconn *conn)
 		fprintf(OPF, "--\n-- Role memberships\n--\n\n");
 
 	/*
-	 * We can't dump these GRANT commands in arbitary order, because a role
+	 * We can't dump these GRANT commands in arbitrary order, because a role
 	 * that is named as a grantor must already have ADMIN OPTION on the
 	 * role for which it is granting permissions, except for the boostrap
 	 * superuser, who can always be named as the grantor.
diff --git a/src/include/lib/ilist.h b/src/include/lib/ilist.h
index e03aa1c683b..095107a99c4 100644
--- a/src/include/lib/ilist.h
+++ b/src/include/lib/ilist.h
@@ -39,7 +39,7 @@
  * operations that can be done without branches (and thus faster) on lists
  * that use circular representation.  However, it is often convenient to
  * initialize list headers to zeroes rather than setting them up with an
- * explicit initialization function, so we also allow the NULL initalization.
+ * explicit initialization function, so we also allow the NULL initialization.
  *
  * EXAMPLES
  *
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 9e5f6c1a804..97bfc3475b6 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -2566,7 +2566,7 @@ select * from at_view_2;
 drop view at_view_2;
 drop view at_view_1;
 drop table at_base_table;
--- check adding a column not iself requiring a rewrite, together with
+-- check adding a column not itself requiring a rewrite, together with
 -- a column requiring a default (bug #16038)
 -- ensure that rewrites aren't silently optimized away, removing the
 -- value of the test
diff --git a/src/test/regress/expected/create_procedure.out b/src/test/regress/expected/create_procedure.out
index 46c827f9791..f2a677fa552 100644
--- a/src/test/regress/expected/create_procedure.out
+++ b/src/test/regress/expected/create_procedure.out
@@ -100,7 +100,7 @@ SELECT * FROM cp_test ORDER BY b COLLATE "C";
  1 | xyzzy
 (4 rows)
 
--- utitlity functions currently not supported here
+-- utility functions currently not supported here
 CREATE PROCEDURE ptestx()
 LANGUAGE SQL
 BEGIN ATOMIC
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index f58b2f75d5b..b5d57a771ae 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -1635,7 +1635,7 @@ drop view at_view_2;
 drop view at_view_1;
 drop table at_base_table;
 
--- check adding a column not iself requiring a rewrite, together with
+-- check adding a column not itself requiring a rewrite, together with
 -- a column requiring a default (bug #16038)
 
 -- ensure that rewrites aren't silently optimized away, removing the
diff --git a/src/test/regress/sql/create_procedure.sql b/src/test/regress/sql/create_procedure.sql
index 75cc0fcf2a6..35b872779ef 100644
--- a/src/test/regress/sql/create_procedure.sql
+++ b/src/test/regress/sql/create_procedure.sql
@@ -42,7 +42,7 @@ CALL ptest1s('b');
 
 SELECT * FROM cp_test ORDER BY b COLLATE "C";
 
--- utitlity functions currently not supported here
+-- utility functions currently not supported here
 CREATE PROCEDURE ptestx()
 LANGUAGE SQL
 BEGIN ATOMIC
diff --git a/src/test/subscription/t/031_column_list.pl b/src/test/subscription/t/031_column_list.pl
index 7c313e26eea..fd77757352a 100644
--- a/src/test/subscription/t/031_column_list.pl
+++ b/src/test/subscription/t/031_column_list.pl
@@ -1034,7 +1034,7 @@ is( $node_subscriber->safe_psql('postgres', "SELECT * FROM s1.t ORDER BY a"),
 4|5|6),
 	'two publications, publishing the same relation');
 
-# Now resync the subcription, but with publications in the opposite order.
+# Now resync the subscription, but with publications in the opposite order.
 # The result should be the same.
 
 $node_subscriber->safe_psql(
-- 
2.25.1

  [text/x-diff] 0003-Avoid-hardcoded-reference-only-to-.gz.patch (1.2K, ../../20230208155644.GM1653@telsasoft.com/4-0003-Avoid-hardcoded-reference-only-to-.gz.patch)
  download | inline diff:
From 226d9e218b2bfb6e7421dd50e53cfec4c7857ef4 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 28 Jan 2023 12:48:13 -0600
Subject: [PATCH 03/10] Avoid hardcoded reference (only) to .gz

This should've been updated at:
dab298471ff2f91f33bc25bfb73e435d3ab02148
751b8d23b788580bbff7463e3959f9a92a95b28a

Ideally it doesn't reference any specific compression algorithm at all.
---
 src/bin/pg_basebackup/pg_basebackup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 1d3ef2c694e..414771ec87c 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -2015,8 +2015,8 @@ BaseBackup(char *compression_algorithm, char *compression_detail,
 			 * If we write the data out to a tar file, it will be named
 			 * base.tar if it's the main data directory or <tablespaceoid>.tar
 			 * if it's for another tablespace. CreateBackupStreamer() will
-			 * arrange to add .gz to the archive name if pg_basebackup is
-			 * performing compression.
+			 * arrange to add an extension to the archive name if pg_basebackup
+			 * is performing compression.
 			 */
 			if (PQgetisnull(res, i, 0))
 			{
-- 
2.25.1

  [text/x-diff] 0004-duplicate-words.patch (3.6K, ../../20230208155644.GM1653@telsasoft.com/5-0004-duplicate-words.patch)
  download | inline diff:
From b8296980b51629418336ba1c0a4ae3a57b73d8f9 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 17 Jan 2023 22:28:42 -0600
Subject: [PATCH 04/10] duplicate words

---
 contrib/postgres_fdw/deparse.c        | 2 +-
 doc/src/sgml/ref/create_database.sgml | 2 +-
 doc/src/sgml/ref/create_schema.sgml   | 2 +-
 src/include/partitioning/partdesc.h   | 2 +-
 src/include/port/simd.h               | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 8a847deb13b..09d6dd60ddc 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -2412,7 +2412,7 @@ deparseAnalyzeInfoSql(StringInfo buf, Relation rel)
  *
  * We could also do "ORDER BY random() LIMIT x", which would always pick
  * the expected number of rows, but it requires sorting so it may be much
- * more expensive (particularly on large tables, which is what what the
+ * more expensive (particularly on large tables, which is what the
  * remote sampling is meant to improve).
  */
 void
diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index f3df2def864..91c39c52303 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -89,7 +89,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
         The role name of the user who will own the new database,
         or <literal>DEFAULT</literal> to use the default (namely, the
         user executing the command).  To create a database owned by another
-        role, you must must be able to <literal>SET ROLE</literal> to that
+        role, you must be able to <literal>SET ROLE</literal> to that
         role.
        </para>
       </listitem>
diff --git a/doc/src/sgml/ref/create_schema.sgml b/doc/src/sgml/ref/create_schema.sgml
index 04b0c28731e..ed69298ccc6 100644
--- a/doc/src/sgml/ref/create_schema.sgml
+++ b/doc/src/sgml/ref/create_schema.sgml
@@ -89,7 +89,7 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp
        <para>
         The role name of the user who will own the new schema.  If omitted,
         defaults to the user executing the command.  To create a schema
-        owned by another role, you must must be able to
+        owned by another role, you must be able to
         <literal>SET ROLE</literal> to that role.
        </para>
       </listitem>
diff --git a/src/include/partitioning/partdesc.h b/src/include/partitioning/partdesc.h
index 7d71fb6e931..e157eae9c1e 100644
--- a/src/include/partitioning/partdesc.h
+++ b/src/include/partitioning/partdesc.h
@@ -31,7 +31,7 @@ typedef struct PartitionDescData
 	int			nparts;			/* Number of partitions */
 	bool		detached_exist; /* Are there any detached partitions? */
 	Oid		   *oids;			/* Array of 'nparts' elements containing
-								 * partition OIDs in order of the their bounds */
+								 * partition OIDs in order of their bounds */
 	bool	   *is_leaf;		/* Array of 'nparts' elements storing whether
 								 * the corresponding 'oids' element belongs to
 								 * a leaf partition or not */
diff --git a/src/include/port/simd.h b/src/include/port/simd.h
index c836360d4b7..1fa6c3bc6c4 100644
--- a/src/include/port/simd.h
+++ b/src/include/port/simd.h
@@ -345,7 +345,7 @@ vector8_ssub(const Vector8 v1, const Vector8 v2)
 #endif							/* ! USE_NO_SIMD */
 
 /*
- * Return a vector with all bits set in each lane where the the corresponding
+ * Return a vector with all bits set in each lane where the corresponding
  * lanes in the inputs are equal.
  */
 #ifndef USE_NO_SIMD
-- 
2.25.1

  [text/x-diff] 0005-WIP-avoid-whitespace-preceding-following-else.patch (12.9K, ../../20230208155644.GM1653@telsasoft.com/6-0005-WIP-avoid-whitespace-preceding-following-else.patch)
  download | inline diff:
From fe2c8749fd0ca92a433e5beca00014266074ff4d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 12 Jan 2023 21:23:09 -0600
Subject: [PATCH 05/10] WIP: avoid whitespace preceding/following 'else'

---
 contrib/dblink/dblink.c                                      | 1 -
 contrib/spi/refint.c                                         | 1 -
 src/backend/commands/functioncmds.c                          | 1 -
 src/backend/commands/tablecmds.c                             | 1 -
 src/backend/executor/nodeTidrangescan.c                      | 1 -
 src/backend/libpq/be-secure-openssl.c                        | 1 -
 src/backend/optimizer/geqo/geqo_erx.c                        | 1 -
 src/backend/optimizer/geqo/geqo_pmx.c                        | 1 -
 src/backend/optimizer/geqo/geqo_pool.c                       | 1 -
 src/backend/optimizer/util/clauses.c                         | 1 -
 src/backend/replication/logical/origin.c                     | 1 -
 src/backend/replication/logical/snapbuild.c                  | 1 -
 src/backend/rewrite/rowsecurity.c                            | 1 -
 src/backend/utils/adt/formatting.c                           | 1 -
 src/backend/utils/adt/pgstatfuncs.c                          | 5 -----
 .../mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c  | 1 -
 src/backend/utils/mmgr/mcxt.c                                | 1 -
 src/bin/pg_amcheck/pg_amcheck.c                              | 3 ---
 src/bin/psql/command.c                                       | 4 ----
 src/interfaces/libpq/fe-connect.c                            | 1 -
 20 files changed, 29 deletions(-)

diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 78a8bcee6e3..263e35442b3 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -2428,7 +2428,6 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk
 		ereport(ERROR,
 				(errcode(ERRCODE_CARDINALITY_VIOLATION),
 				 errmsg("source criteria matched more than one record")));
-
 	else if (ret == SPI_OK_SELECT && SPI_processed == 1)
 	{
 		SPITupleTable *tuptable = SPI_tuptable;
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 18062eb1cff..31e95663466 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -456,7 +456,6 @@ check_foreign_key(PG_FUNCTION_ARGS)
 			 * updates new key values in referenced tables
 			 */
 
-
 			else if (action == 'c')
 			{
 				if (is_update == 1)
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index 69f66dfe7da..bfd44d3b2c6 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -1575,7 +1575,6 @@ CreateCast(CreateCastStmt *stmt)
 		ereport(WARNING,
 				(errcode(ERRCODE_WRONG_OBJECT_TYPE),
 				 errmsg("cast will be ignored because the source data type is a domain")));
-
 	else if (targettyptype == TYPTYPE_DOMAIN)
 		ereport(WARNING,
 				(errcode(ERRCODE_WRONG_OBJECT_TYPE),
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 1293545947e..debbe8a73ef 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -17002,7 +17002,6 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
 	}
 	else if (IsA(stmt, AlterObjectSchemaStmt))
 		reltype = ((AlterObjectSchemaStmt *) stmt)->objectType;
-
 	else if (IsA(stmt, AlterTableStmt))
 		reltype = ((AlterTableStmt *) stmt)->objtype;
 	else
diff --git a/src/backend/executor/nodeTidrangescan.c b/src/backend/executor/nodeTidrangescan.c
index 2124c55ef53..5f0c9f06879 100644
--- a/src/backend/executor/nodeTidrangescan.c
+++ b/src/backend/executor/nodeTidrangescan.c
@@ -183,7 +183,6 @@ TidRangeEval(TidRangeScanState *node)
 			if (ItemPointerCompare(&lb, &lowerBound) > 0)
 				ItemPointerCopy(&lb, &lowerBound);
 		}
-
 		else if (tidopexpr->exprtype == TIDEXPR_UPPER_BOUND)
 		{
 			ItemPointerData ub;
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index e3c7c12aa0e..4e721b705d5 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -1630,7 +1630,6 @@ default_openssl_tls_init(SSL_CTX *context, bool isServerStart)
 		if (ssl_passphrase_command[0] && ssl_passphrase_command_supports_reload)
 			SSL_CTX_set_default_passwd_cb(context, ssl_external_passwd_cb);
 		else
-
 			/*
 			 * If reloading and no external command is configured, override
 			 * OpenSSL's default handling of passphrase-protected files,
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index 21ad7854118..26b58f43dee 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -212,7 +212,6 @@ gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene, int num_gene)
 
 		if (edge_table[new_gene[i - 1]].unused_edges > 0)
 			new_gene[i] = gimme_gene(root, edge_table[(int) new_gene[i - 1]], edge_table);
-
 		else
 		{						/* cope with fault */
 			edge_failures++;
diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c
index e44fd0bae5a..dd35d269281 100644
--- a/src/backend/optimizer/geqo/geqo_pmx.c
+++ b/src/backend/optimizer/geqo/geqo_pmx.c
@@ -112,7 +112,6 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
 
 		if (tour1[k] == tour2[k])
 			found = 1;			/* find match in tour2 */
-
 		else
 		{
 			found = 0;			/* substitute elements */
diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c
index e45bd7286b2..584dc020fda 100644
--- a/src/backend/optimizer/geqo/geqo_pool.c
+++ b/src/backend/optimizer/geqo/geqo_pool.c
@@ -218,7 +218,6 @@ spread_chromo(PlannerInfo *root, Chromosome *chromo, Pool *pool)
 		else if (bot - top <= 1)
 			index = bot;
 
-
 		/*
 		 * these 2 cases move the search indices since a new location has not
 		 * yet been found.
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 76e25118f94..080180e2d0d 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -733,7 +733,6 @@ max_parallel_hazard_walker(Node *node, max_parallel_hazard_context *context)
 		if (max_parallel_hazard_test(PROPARALLEL_RESTRICTED, context))
 			return true;
 	}
-
 	else if (IsA(node, NextValueExpr))
 	{
 		if (max_parallel_hazard_test(PROPARALLEL_UNSAFE, context))
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index 2c04c8707dc..04b084d298e 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -1133,7 +1133,6 @@ replorigin_session_setup(RepOriginId node, int acquired_by)
 		/* not our slot */
 		if (curstate->roident != node)
 			continue;
-
 		else if (curstate->acquired_by != 0 && acquired_by == 0)
 		{
 			ereport(ERROR,
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 62542827e4b..e45e0e56756 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1647,7 +1647,6 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
 		ereport(ERROR,
 				(errcode_for_file_access(),
 				 errmsg("could not stat file \"%s\": %m", path)));
-
 	else if (ret == 0)
 	{
 		/*
diff --git a/src/backend/rewrite/rowsecurity.c b/src/backend/rewrite/rowsecurity.c
index 569c1c94679..0666e7ba06a 100644
--- a/src/backend/rewrite/rowsecurity.c
+++ b/src/backend/rewrite/rowsecurity.c
@@ -727,7 +727,6 @@ add_security_quals(int rt_index,
 		*securityQuals = list_append_unique(*securityQuals, rowsec_expr);
 	}
 	else
-
 		/*
 		 * A permissive policy must exist for rows to be visible at all.
 		 * Therefore, if there were no permissive policies found, return a
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index f3f4db5ef60..7ac400ce092 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -5082,7 +5082,6 @@ NUM_prepare_locale(NUMProc *Np)
 		 */
 		if (lconv->decimal_point && *lconv->decimal_point)
 			Np->decimal = lconv->decimal_point;
-
 		else
 			Np->decimal = ".";
 
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 67374934022..1797416427d 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -814,7 +814,6 @@ pg_stat_get_backend_activity_start(PG_FUNCTION_ARGS)
 
 	if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
 		PG_RETURN_NULL();
-
 	else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
 		PG_RETURN_NULL();
 
@@ -840,7 +839,6 @@ pg_stat_get_backend_xact_start(PG_FUNCTION_ARGS)
 
 	if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
 		PG_RETURN_NULL();
-
 	else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
 		PG_RETURN_NULL();
 
@@ -862,7 +860,6 @@ pg_stat_get_backend_start(PG_FUNCTION_ARGS)
 
 	if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
 		PG_RETURN_NULL();
-
 	else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
 		PG_RETURN_NULL();
 
@@ -886,7 +883,6 @@ pg_stat_get_backend_client_addr(PG_FUNCTION_ARGS)
 
 	if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
 		PG_RETURN_NULL();
-
 	else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
 		PG_RETURN_NULL();
 
@@ -931,7 +927,6 @@ pg_stat_get_backend_client_port(PG_FUNCTION_ARGS)
 
 	if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
 		PG_RETURN_NULL();
-
 	else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
 		PG_RETURN_NULL();
 
diff --git a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
index bae24681668..9d344e9a8e4 100644
--- a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
+++ b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
@@ -162,7 +162,6 @@ euc_jis_20042shift_jis_2004(const unsigned char *euc, unsigned char *p, int len,
 			else
 				*p++ = ten + 0x9e;
 		}
-
 		else if (l == 2)		/* JIS X 0213 plane 1? */
 		{
 			ku = c1 - 0xa0;
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 0b00802df70..4646ae50277 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -711,7 +711,6 @@ MemoryContextStatsDetail(MemoryContext context, int max_children,
 				grand_totals.freespace, grand_totals.freechunks,
 				grand_totals.totalspace - grand_totals.freespace);
 	else
-
 		/*
 		 * Use LOG_SERVER_ONLY to prevent the memory contexts from being sent
 		 * to the connected client.
diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c
index 68f8180c19f..4b770d83a70 100644
--- a/src/bin/pg_amcheck/pg_amcheck.c
+++ b/src/bin/pg_amcheck/pg_amcheck.c
@@ -1017,18 +1017,15 @@ verify_heap_slot_handler(PGresult *res, PGconn *conn, void *context)
 					   PQgetvalue(res, i, 0),	/* blkno */
 					   PQgetvalue(res, i, 1),	/* offnum */
 					   PQgetvalue(res, i, 2));	/* attnum */
-
 			else if (!PQgetisnull(res, i, 1))
 				printf(_("heap table \"%s.%s.%s\", block %s, offset %s:\n"),
 					   rel->datinfo->datname, rel->nspname, rel->relname,
 					   PQgetvalue(res, i, 0),	/* blkno */
 					   PQgetvalue(res, i, 1));	/* offnum */
-
 			else if (!PQgetisnull(res, i, 0))
 				printf(_("heap table \"%s.%s.%s\", block %s:\n"),
 					   rel->datinfo->datname, rel->nspname, rel->relname,
 					   PQgetvalue(res, i, 0));	/* blkno */
-
 			else
 				printf(_("heap table \"%s.%s.%s\":\n"),
 					   rel->datinfo->datname, rel->nspname, rel->relname);
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index b5201edf555..3e0b37a17ca 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -1992,7 +1992,6 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
 				success = do_lo_export(opt1, opt2);
 			}
 		}
-
 		else if (strcmp(cmd + 3, "import") == 0)
 		{
 			if (!opt1)
@@ -2006,12 +2005,10 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
 				success = do_lo_import(opt1, opt2);
 			}
 		}
-
 		else if (strcmp(cmd + 3, "list") == 0)
 			success = listLargeObjects(false);
 		else if (strcmp(cmd + 3, "list+") == 0)
 			success = listLargeObjects(true);
-
 		else if (strcmp(cmd + 3, "unlink") == 0)
 		{
 			if (!opt1)
@@ -2022,7 +2019,6 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
 			else
 				success = do_lo_unlink(opt1);
 		}
-
 		else
 			status = PSQL_CMD_UNKNOWN;
 
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 50b5df3490b..00ba10b01b4 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7012,7 +7012,6 @@ passwordFromFile(const char *hostname, const char *port, const char *dbname,
 	if (hostname == NULL || hostname[0] == '\0')
 		hostname = DefaultHost;
 	else if (is_unixsock_path(hostname))
-
 		/*
 		 * We should probably use canonicalize_path(), but then we have to
 		 * bring path.c into libpq, and it doesn't seem worth it.
-- 
2.25.1

  [text/x-diff] 0006-doc-typo-pg_used_reserved_connections.patch (1.1K, ../../20230208155644.GM1653@telsasoft.com/7-0006-doc-typo-pg_used_reserved_connections.patch)
  download | inline diff:
From 25547eaf0cd16ffcd49894922c3f478a4b005308 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 20 Jan 2023 17:39:35 -0600
Subject: [PATCH 06/10] doc typo: pg_used_reserved_connections

v16: 6e2775e4d4e47775f0d933e4a93c148024a3bc63
---
 doc/src/sgml/config.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index d190be1925d..8c56b134a84 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -718,7 +718,7 @@ include_dir 'conf.d'
        <para>
         Determines the number of connection <quote>slots</quote> that are
         reserved for connections by roles with privileges of the
-        <link linkend="predefined-roles-table"><literal>pg_used_reserved_connections</literal></link>
+        <link linkend="predefined-roles-table"><literal>pg_use_reserved_connections</literal></link>
         role.  Whenever the number of free connection slots is greater than
         <xref linkend="guc-superuser-reserved-connections"/> but less than or
         equal to the sum of <varname>superuser_reserved_connections</varname>
-- 
2.25.1

  [text/x-diff] 0007-cirrus-ccache-use-G-rather-than-GB-suffix.patch (739B, ../../20230208155644.GM1653@telsasoft.com/8-0007-cirrus-ccache-use-G-rather-than-GB-suffix.patch)
  download | inline diff:
From 83556cfd8be8c1f0f27cbed3ffd42dfae038ddd3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 13 Nov 2022 14:03:27 -0600
Subject: [PATCH 07/10] cirrus/ccache: use G rather than GB suffix..

the former being the documented spelling.
---
 .cirrus.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index f2129787529..10ec7ac406a 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -665,7 +665,7 @@ task:
 
     # Use larger ccache cache, as this task compiles with multiple compilers /
     # flag combinations
-    CCACHE_MAXSIZE: "1GB"
+    CCACHE_MAXSIZE: "1G"
     CCACHE_DIR: "/tmp/ccache_dir"
 
     LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
-- 
2.25.1

  [text/x-diff] 0008-comments-grammar-extended-and-other-stats.patch (7.0K, ../../20230208155644.GM1653@telsasoft.com/9-0008-comments-grammar-extended-and-other-stats.patch)
  download | inline diff:
From cc3c1536bd6f6d69d960c2cecc5e32ca814c9a21 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 08/10] comments grammar: extended (and other) stats

See:
202109272104.7t253iw236fb@alvherre.pgsql
070d2e19e40897d857f570f24888fc30727ed9c0
609b0652af00374b89411ea2613fd5bb92bca92c
a4d75c86bf15220df22de0a92c819ecef9db3849
7300a699502fe5432b05fbc75baca534b080bebb
ccaa3569f58796868303629bc2d63ddddb599b38
---
 src/backend/commands/statscmds.c                 | 4 ++--
 src/backend/statistics/README                    | 2 +-
 src/backend/statistics/dependencies.c            | 8 ++++----
 src/backend/statistics/extended_stats.c          | 4 ++--
 src/backend/utils/adt/pgstatfuncs.c              | 4 ++--
 src/backend/utils/adt/ruleutils.c                | 4 ++--
 src/include/statistics/extended_stats_internal.h | 2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 26ebd0819d6..2e41745646b 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -377,7 +377,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 
 	/*
 	 * If no statistic type was specified, build them all (but only when the
-	 * statistics is defined on more than one column/expression).
+	 * statistics object is defined on more than one column/expression).
 	 */
 	if ((!requested_type) && (numcols >= 2))
 	{
@@ -432,7 +432,7 @@ CreateStatistics(CreateStatsStmt *stmt)
 	 * similar to why we don't bother with extracting columns from
 	 * expressions. It's either expensive or very easy to defeat for
 	 * determined user, and there's no risk if we allow such statistics (the
-	 * statistics is useless, but harmless).
+	 * statistic is useless, but harmless).
 	 */
 	foreach(cell, stxexprs)
 	{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
 Compatible clause types
 -----------------------
 
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
 
     (a) functional dependencies - equality clauses (AND), possibly IS NULL
 
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index e6e2835345e..a54e038d6a1 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -846,7 +846,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
 			AttrNumber	clause_attnum;
 
 			/*
-			 * Had we found incompatible clause in the arguments, treat the
+			 * If we found an incompatible clause in the arguments, treat the
 			 * whole clause as incompatible.
 			 */
 			if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1274,7 +1274,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
 			Node	   *or_expr = NULL;
 
 			/*
-			 * Had we found incompatible expression in the arguments, treat
+			 * If we found an incompatible expression in the arguments, treat
 			 * the whole expression as incompatible.
 			 */
 			if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
@@ -1725,7 +1725,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 
 					/*
 					 * For expressions, we need to do two translations. First
-					 * we have to translate the negative attnum to index in
+					 * we have to translate the negative attnum to an index in
 					 * the list of expressions (in the statistics object).
 					 * Then we need to see if there's a matching clause. The
 					 * index of the unique expression determines the attnum
@@ -1733,7 +1733,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 					 */
 					idx = -(1 + attnum);
 
-					/* Is the expression index is valid? */
+					/* Is the expression index valid? */
 					Assert((idx >= 0) && (idx < list_length(stat->exprs)));
 
 					expr = (Node *) list_nth(stat->exprs, idx);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 572d9b44643..e18398cd428 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1214,8 +1214,8 @@ stat_covers_expressions(StatisticExtInfo *stat, List *exprs,
 
 /*
  * choose_best_statistics
- *		Look for and return statistics with the specified 'requiredkind' which
- *		have keys that match at least two of the given attnums.  Return NULL if
+ *		Look for and return the statistics object with the specified 'requiredkind' which
+ *		has keys that match at least two of the given attnums.  Return NULL if
  *		there's no match.
  *
  * The current selection criteria is very simple - we choose the statistics
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 1797416427d..268ff16f99c 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1755,7 +1755,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
 }
 
 /*
- * Get the statistics for the replication slot. If the slot statistics is not
+ * Get the statistics for the replication slot. If the slot statistics are not
  * available, return all-zeroes stats.
  */
 Datum
@@ -1827,7 +1827,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
 
 /*
  * Get the subscription statistics for the given subscription. If the
- * subscription statistics is not available, return all-zeros stats.
+ * subscription statistics are not available, return all-zeros stats.
  */
 Datum
 pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 9ac42efdbc3..075c4d0ad86 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1699,8 +1699,8 @@ pg_get_statisticsobj_worker(Oid statextid, bool columns_only, bool missing_ok)
 		 * will create all statistics types on a newer postgres version, if
 		 * the statistics had all options enabled on the original version.
 		 *
-		 * But if the statistics is defined on just a single column, it has to
-		 * be an expression statistics. In that case we don't need to specify
+		 * But if the statistics are defined on just a single column, it has to
+		 * be a statistics expression. In that case we don't need to specify
 		 * kinds.
 		 */
 		if ((!ndistinct_enabled || !dependencies_enabled || !mcv_enabled) &&
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index 7b55eb8ffac..72f94814704 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -57,7 +57,7 @@ typedef struct SortItem
 	int			count;
 } SortItem;
 
-/* a unified representation of the data the statistics is built on */
+/* a unified representation of the data the statistics object is built on */
 typedef struct StatsBuildData
 {
 	int			numrows;
-- 
2.25.1

  [text/x-diff] 0009-fix-whitespace.patch (15.1K, ../../20230208155644.GM1653@telsasoft.com/10-0009-fix-whitespace.patch)
  download | inline diff:
From f2e68b7c2f5dd727815fbe24390996324d692d43 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 09/10] fix whitespace

weird since c91560defc57f89f7e88632ea14ae77b5cec78ee

See also:
https://www.postgresql.org/message-id/CAFBsxsHtYvE1Txm+NYM5gB1C3EZN_qDPJOOsJK_VsC2DXqZfcA@mail.gmail.com
---
 src/backend/commands/indexcmds.c            |   2 +-
 src/backend/utils/activity/backend_status.c |   2 +-
 src/backend/utils/cache/inval.c             | 188 ++++++++++----------
 src/backend/utils/mmgr/mcxt.c               |   4 +-
 4 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 16ec0b114e6..38e6d9ebe7e 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2313,7 +2313,7 @@ GetDefaultOpClass(Oid type_id, Oid am_id)
  *	extended statistics, etc.
  *
  *	The parameters are typically: the original table name, the original field
- *	name, and a "type" string (such as "seq" or "pkey").    The field name
+ *	name, and a "type" string (such as "seq" or "pkey").  The field name
  *	and/or type can be NULL if not relevant.
  *
  *	The result is a palloc'd string.
diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c
index 608d01ea0dd..f6e847ff3b6 100644
--- a/src/backend/utils/activity/backend_status.c
+++ b/src/backend/utils/activity/backend_status.c
@@ -786,7 +786,7 @@ pgstat_read_current_status(void)
 		 * Follow the protocol of retrying if st_changecount changes while we
 		 * copy the entry, or if it's odd.  (The check for odd is needed to
 		 * cover the case where we are able to completely copy the entry while
-		 * the source backend is between increment steps.)	We use a volatile
+		 * the source backend is between increment steps.)  We use a volatile
 		 * pointer here to ensure the compiler doesn't try to get cute.
 		 */
 		for (;;)
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 0008826f67c..cc7de542b1e 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -3,100 +3,100 @@
  * inval.c
  *	  POSTGRES cache invalidation dispatcher code.
  *
- *	This is subtle stuff, so pay attention:
- *
- *	When a tuple is updated or deleted, our standard visibility rules
- *	consider that it is *still valid* so long as we are in the same command,
- *	ie, until the next CommandCounterIncrement() or transaction commit.
- *	(See access/heap/heapam_visibility.c, and note that system catalogs are
- *  generally scanned under the most current snapshot available, rather than
- *  the transaction snapshot.)	At the command boundary, the old tuple stops
- *	being valid and the new version, if any, becomes valid.  Therefore,
- *	we cannot simply flush a tuple from the system caches during heap_update()
- *	or heap_delete().  The tuple is still good at that point; what's more,
- *	even if we did flush it, it might be reloaded into the caches by a later
- *	request in the same command.  So the correct behavior is to keep a list
- *	of outdated (updated/deleted) tuples and then do the required cache
- *	flushes at the next command boundary.  We must also keep track of
- *	inserted tuples so that we can flush "negative" cache entries that match
- *	the new tuples; again, that mustn't happen until end of command.
- *
- *	Once we have finished the command, we still need to remember inserted
- *	tuples (including new versions of updated tuples), so that we can flush
- *	them from the caches if we abort the transaction.  Similarly, we'd better
- *	be able to flush "negative" cache entries that may have been loaded in
- *	place of deleted tuples, so we still need the deleted ones too.
- *
- *	If we successfully complete the transaction, we have to broadcast all
- *	these invalidation events to other backends (via the SI message queue)
- *	so that they can flush obsolete entries from their caches.  Note we have
- *	to record the transaction commit before sending SI messages, otherwise
- *	the other backends won't see our updated tuples as good.
- *
- *	When a subtransaction aborts, we can process and discard any events
- *	it has queued.  When a subtransaction commits, we just add its events
- *	to the pending lists of the parent transaction.
- *
- *	In short, we need to remember until xact end every insert or delete
- *	of a tuple that might be in the system caches.  Updates are treated as
- *	two events, delete + insert, for simplicity.  (If the update doesn't
- *	change the tuple hash value, catcache.c optimizes this into one event.)
- *
- *	We do not need to register EVERY tuple operation in this way, just those
- *	on tuples in relations that have associated catcaches.  We do, however,
- *	have to register every operation on every tuple that *could* be in a
- *	catcache, whether or not it currently is in our cache.  Also, if the
- *	tuple is in a relation that has multiple catcaches, we need to register
- *	an invalidation message for each such catcache.  catcache.c's
- *	PrepareToInvalidateCacheTuple() routine provides the knowledge of which
- *	catcaches may need invalidation for a given tuple.
- *
- *	Also, whenever we see an operation on a pg_class, pg_attribute, or
- *	pg_index tuple, we register a relcache flush operation for the relation
- *	described by that tuple (as specified in CacheInvalidateHeapTuple()).
- *	Likewise for pg_constraint tuples for foreign keys on relations.
- *
- *	We keep the relcache flush requests in lists separate from the catcache
- *	tuple flush requests.  This allows us to issue all the pending catcache
- *	flushes before we issue relcache flushes, which saves us from loading
- *	a catcache tuple during relcache load only to flush it again right away.
- *	Also, we avoid queuing multiple relcache flush requests for the same
- *	relation, since a relcache flush is relatively expensive to do.
- *	(XXX is it worth testing likewise for duplicate catcache flush entries?
- *	Probably not.)
- *
- *	Many subsystems own higher-level caches that depend on relcache and/or
- *	catcache, and they register callbacks here to invalidate their caches.
- *	While building a higher-level cache entry, a backend may receive a
- *	callback for the being-built entry or one of its dependencies.  This
- *	implies the new higher-level entry would be born stale, and it might
- *	remain stale for the life of the backend.  Many caches do not prevent
- *	that.  They rely on DDL for can't-miss catalog changes taking
- *	AccessExclusiveLock on suitable objects.  (For a change made with less
- *	locking, backends might never read the change.)  The relation cache,
- *	however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
- *	than the beginning of the next transaction.  Hence, when a relevant
- *	invalidation callback arrives during a build, relcache.c reattempts that
- *	build.  Caches with similar needs could do likewise.
- *
- *	If a relcache flush is issued for a system relation that we preload
- *	from the relcache init file, we must also delete the init file so that
- *	it will be rebuilt during the next backend restart.  The actual work of
- *	manipulating the init file is in relcache.c, but we keep track of the
- *	need for it here.
- *
- *	Currently, inval messages are sent without regard for the possibility
- *	that the object described by the catalog tuple might be a session-local
- *	object such as a temporary table.  This is because (1) this code has
- *	no practical way to tell the difference, and (2) it is not certain that
- *	other backends don't have catalog cache or even relcache entries for
- *	such tables, anyway; there is nothing that prevents that.  It might be
- *	worth trying to avoid sending such inval traffic in the future, if those
- *	problems can be overcome cheaply.
- *
- *	When wal_level=logical, write invalidations into WAL at each command end to
- *	support the decoding of the in-progress transactions.  See
- *	CommandEndInvalidationMessages.
+ * This is subtle stuff, so pay attention:
+ *
+ * When a tuple is updated or deleted, our standard visibility rules
+ * consider that it is *still valid* so long as we are in the same command,
+ * ie, until the next CommandCounterIncrement() or transaction commit.
+ * (See access/heap/heapam_visibility.c, and note that system catalogs are
+ * generally scanned under the most current snapshot available, rather than
+ * the transaction snapshot.)  At the command boundary, the old tuple stops
+ * being valid and the new version, if any, becomes valid.  Therefore,
+ * we cannot simply flush a tuple from the system caches during heap_update()
+ * or heap_delete().  The tuple is still good at that point; what's more,
+ * even if we did flush it, it might be reloaded into the caches by a later
+ * request in the same command.  So the correct behavior is to keep a list
+ * of outdated (updated/deleted) tuples and then do the required cache
+ * flushes at the next command boundary.  We must also keep track of
+ * inserted tuples so that we can flush "negative" cache entries that match
+ * the new tuples; again, that mustn't happen until end of command.
+ *
+ * Once we have finished the command, we still need to remember inserted
+ * tuples (including new versions of updated tuples), so that we can flush
+ * them from the caches if we abort the transaction.  Similarly, we'd better
+ * be able to flush "negative" cache entries that may have been loaded in
+ * place of deleted tuples, so we still need the deleted ones too.
+ *
+ * If we successfully complete the transaction, we have to broadcast all
+ * these invalidation events to other backends (via the SI message queue)
+ * so that they can flush obsolete entries from their caches.  Note we have
+ * to record the transaction commit before sending SI messages, otherwise
+ * the other backends won't see our updated tuples as good.
+ *
+ * When a subtransaction aborts, we can process and discard any events
+ * it has queued.  When a subtransaction commits, we just add its events
+ * to the pending lists of the parent transaction.
+ *
+ * In short, we need to remember until xact end every insert or delete
+ * of a tuple that might be in the system caches.  Updates are treated as
+ * two events, delete + insert, for simplicity.  (If the update doesn't
+ * change the tuple hash value, catcache.c optimizes this into one event.)
+ *
+ * We do not need to register EVERY tuple operation in this way, just those
+ * on tuples in relations that have associated catcaches.  We do, however,
+ * have to register every operation on every tuple that *could* be in a
+ * catcache, whether or not it currently is in our cache.  Also, if the
+ * tuple is in a relation that has multiple catcaches, we need to register
+ * an invalidation message for each such catcache.  catcache.c's
+ * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
+ * catcaches may need invalidation for a given tuple.
+ *
+ * Also, whenever we see an operation on a pg_class, pg_attribute, or
+ * pg_index tuple, we register a relcache flush operation for the relation
+ * described by that tuple (as specified in CacheInvalidateHeapTuple()).
+ * Likewise for pg_constraint tuples for foreign keys on relations.
+ *
+ * We keep the relcache flush requests in lists separate from the catcache
+ * tuple flush requests.  This allows us to issue all the pending catcache
+ * flushes before we issue relcache flushes, which saves us from loading
+ * a catcache tuple during relcache load only to flush it again right away.
+ * Also, we avoid queuing multiple relcache flush requests for the same
+ * relation, since a relcache flush is relatively expensive to do.
+ * (XXX is it worth testing likewise for duplicate catcache flush entries?
+ * Probably not.)
+ *
+ * Many subsystems own higher-level caches that depend on relcache and/or
+ * catcache, and they register callbacks here to invalidate their caches.
+ * While building a higher-level cache entry, a backend may receive a
+ * callback for the being-built entry or one of its dependencies.  This
+ * implies the new higher-level entry would be born stale, and it might
+ * remain stale for the life of the backend.  Many caches do not prevent
+ * that.  They rely on DDL for can't-miss catalog changes taking
+ * AccessExclusiveLock on suitable objects.  (For a change made with less
+ * locking, backends might never read the change.)  The relation cache,
+ * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
+ * than the beginning of the next transaction.  Hence, when a relevant
+ * invalidation callback arrives during a build, relcache.c reattempts that
+ * build.  Caches with similar needs could do likewise.
+ *
+ * If a relcache flush is issued for a system relation that we preload
+ * from the relcache init file, we must also delete the init file so that
+ * it will be rebuilt during the next backend restart.  The actual work of
+ * manipulating the init file is in relcache.c, but we keep track of the
+ * need for it here.
+ *
+ * Currently, inval messages are sent without regard for the possibility
+ * that the object described by the catalog tuple might be a session-local
+ * object such as a temporary table.  This is because (1) this code has
+ * no practical way to tell the difference, and (2) it is not certain that
+ * other backends don't have catalog cache or even relcache entries for
+ * such tables, anyway; there is nothing that prevents that.  It might be
+ * worth trying to avoid sending such inval traffic in the future, if those
+ * problems can be overcome cheaply.
+ *
+ * When wal_level=logical, write invalidations into WAL at each command end to
+ * support the decoding of the in-progress transactions.  See
+ * CommandEndInvalidationMessages.
  *
  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 4646ae50277..bdaa9539e40 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -928,7 +928,7 @@ MemoryContextCheck(MemoryContext context)
  * context creation routines, not by the unwashed masses.
  *
  * The memory context creation procedure goes like this:
- *	1.  Context-type-specific routine makes some initial space allocation,
+ *	1.	Context-type-specific routine makes some initial space allocation,
  *		including enough space for the context header.  If it fails,
  *		it can ereport() with no damage done.
  *	2.	Context-type-specific routine sets up all type-specific fields of
@@ -938,7 +938,7 @@ MemoryContextCheck(MemoryContext context)
  *		the initial space allocation should be freed before ereport'ing.
  *	3.	Context-type-specific routine calls MemoryContextCreate() to fill in
  *		the generic header fields and link the context into the context tree.
- *	4.  We return to the context-type-specific routine, which finishes
+ *	4.	We return to the context-type-specific routine, which finishes
  *		up type-specific initialization.  This routine can now do things
  *		that might fail (like allocate more memory), so long as it's
  *		sure the node is left in a state that delete will handle.
-- 
2.25.1

  [text/x-diff] 0010-WIP-whitespace-issues.patch (47.8K, ../../20230208155644.GM1653@telsasoft.com/11-0010-WIP-whitespace-issues.patch)
  download | inline diff:
From 9a38d4fbf2a3b441505c169533f1b96726c8b03b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 31 Jan 2023 13:32:59 -0600
Subject: [PATCH 10/10] WIP: whitespace issues

TODO:
git grep '\*.*\w.*        \w' '*.c'
git grep '\*.* .* .*\w.*        \w' '*.c'
---
 contrib/pg_trgm/trgm_regexp.c              | 2 +-
 src/backend/access/common/tupconvert.c     | 2 +-
 src/backend/access/gin/ginfast.c           | 2 +-
 src/backend/access/heap/heapam.c           | 2 +-
 src/backend/access/heap/hio.c              | 2 +-
 src/backend/access/nbtree/nbtutils.c       | 2 +-
 src/backend/access/transam/clog.c          | 2 +-
 src/backend/access/transam/multixact.c     | 2 +-
 src/backend/access/transam/xlog.c          | 2 +-
 src/backend/catalog/aclchk.c               | 2 +-
 src/backend/catalog/namespace.c            | 6 +++---
 src/backend/catalog/pg_proc.c              | 2 +-
 src/backend/catalog/pg_shdepend.c          | 4 ++--
 src/backend/commands/analyze.c             | 2 +-
 src/backend/commands/dbcommands.c          | 2 +-
 src/backend/commands/opclasscmds.c         | 4 ++--
 src/backend/commands/vacuum.c              | 2 +-
 src/backend/executor/execAmi.c             | 2 +-
 src/backend/executor/execExpr.c            | 2 +-
 src/backend/executor/functions.c           | 2 +-
 src/backend/executor/nodeAgg.c             | 2 +-
 src/backend/executor/nodeGather.c          | 2 +-
 src/backend/executor/nodeGatherMerge.c     | 2 +-
 src/backend/executor/nodeIncrementalSort.c | 2 +-
 src/backend/lib/rbtree.c                   | 2 +-
 src/backend/libpq/be-secure-openssl.c      | 2 +-
 src/backend/optimizer/path/clausesel.c     | 2 +-
 src/backend/optimizer/path/costsize.c      | 6 +++---
 src/backend/optimizer/path/joinpath.c      | 2 +-
 src/backend/optimizer/path/pathkeys.c      | 2 +-
 src/backend/optimizer/plan/createplan.c    | 4 ++--
 src/backend/optimizer/plan/initsplan.c     | 2 +-
 src/backend/optimizer/prep/prepjointree.c  | 2 +-
 src/backend/optimizer/util/orclauses.c     | 2 +-
 src/backend/optimizer/util/pathnode.c      | 2 +-
 src/backend/optimizer/util/var.c           | 2 +-
 src/backend/parser/parse_coerce.c          | 2 +-
 src/backend/postmaster/postmaster.c        | 2 +-
 src/backend/statistics/extended_stats.c    | 2 +-
 src/backend/storage/file/fd.c              | 2 +-
 src/backend/storage/lmgr/lock.c            | 4 ++--
 src/backend/storage/smgr/smgr.c            | 2 +-
 src/backend/tcop/postgres.c                | 2 +-
 src/backend/tsearch/ts_parse.c             | 2 +-
 src/backend/utils/adt/acl.c                | 2 +-
 src/backend/utils/adt/like_support.c       | 2 +-
 src/backend/utils/adt/selfuncs.c           | 4 ++--
 src/backend/utils/adt/varlena.c            | 6 +++---
 src/backend/utils/cache/plancache.c        | 2 +-
 src/backend/utils/cache/relcache.c         | 2 +-
 src/backend/utils/cache/ts_cache.c         | 2 +-
 src/backend/utils/misc/guc.c               | 2 +-
 src/backend/utils/mmgr/dsa.c               | 2 +-
 src/bin/initdb/initdb.c                    | 2 +-
 src/bin/pg_dump/dumputils.c                | 2 +-
 src/bin/pg_dump/pg_dump.c                  | 2 +-
 src/bin/pg_test_timing/pg_test_timing.c    | 2 +-
 src/bin/pg_upgrade/server.c                | 2 +-
 src/interfaces/ecpg/ecpglib/prepare.c      | 2 +-
 src/interfaces/ecpg/pgtypeslib/timestamp.c | 2 +-
 60 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c
index 9a00564ae4f..5f41ff1e5d1 100644
--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -1608,7 +1608,7 @@ selectColorTrigrams(TrgmNFA *trgmNFA)
 
 		/*
 		 * Does any arc of this color trigram connect initial and final
-		 * states?	If so we can't remove it.
+		 * states?  If so we can't remove it.
 		 */
 		foreach(cell, trgmInfo->arcs)
 		{
diff --git a/src/backend/access/common/tupconvert.c b/src/backend/access/common/tupconvert.c
index d303fe010a2..128d407e24a 100644
--- a/src/backend/access/common/tupconvert.c
+++ b/src/backend/access/common/tupconvert.c
@@ -93,7 +93,7 @@ convert_tuples_by_position(TupleDesc indesc,
 
 /*
  * Set up for tuple conversion, matching input and output columns by name.
- * (Dropped columns are ignored in both input and output.)	This is intended
+ * (Dropped columns are ignored in both input and output.)  This is intended
  * for use when the rowtypes are related by inheritance, so we expect an exact
  * match of both type and typmod.  The error messages will be a bit unhelpful
  * unless both rowtypes are named composite types.
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index ca7d770d864..ec3bd4f4baf 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -889,7 +889,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
 		vacuum_delay_point();
 
 		/*
-		 * Is it time to flush memory to disk?	Flush if we are at the end of
+		 * Is it time to flush memory to disk?  Flush if we are at the end of
 		 * the pending list, or if we have a full row and memory is getting
 		 * full.
 		 */
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 7eb79cee58d..1e752972a4d 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -3915,7 +3915,7 @@ HeapDetermineColumnsInfo(Relation relation,
 		/*
 		 * Extract the corresponding values.  XXX this is pretty inefficient
 		 * if there are many indexed columns.  Should we do a single
-		 * heap_deform_tuple call on each tuple, instead?	But that doesn't
+		 * heap_deform_tuple call on each tuple, instead?  But that doesn't
 		 * work for system columns ...
 		 */
 		value1 = heap_getattr(oldtup, attrnum, tupdesc, &isnull1);
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index e152807d2dc..4d38667fcee 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -716,7 +716,7 @@ loop:
 	 *
 	 * XXX should we enter the new page into the free space map immediately,
 	 * or just keep it for this backend's exclusive use in the short run
-	 * (until VACUUM sees it)?	Seems to depend on whether you expect the
+	 * (until VACUUM sees it)?  Seems to depend on whether you expect the
 	 * current backend to make more insertions or not, which is probably a
 	 * good bet most of the time.  So for now, don't add it to FSM yet.
 	 */
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 7da499c4dd5..634735b7306 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -1713,7 +1713,7 @@ _bt_check_rowcompare(ScanKey skey, IndexTuple tuple, int tupnatts,
  * any items from the page, and so there is no need to search left from the
  * recorded offset.  (This observation also guarantees that the item is still
  * the right one to delete, which might otherwise be questionable since heap
- * TIDs can get recycled.)	This holds true even if the page has been modified
+ * TIDs can get recycled.)  This holds true even if the page has been modified
  * by inserts and page splits, so there is no need to consult the LSN.
  *
  * If the pin was released after reading the page, then we re-read it.  If it
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 4a431d58767..d6dc5739a4f 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -626,7 +626,7 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
  * an LSN that is late enough to be able to guarantee that if we flush up to
  * that LSN then we will have flushed the transaction's commit record to disk.
  * The result is not necessarily the exact LSN of the transaction's commit
- * record!	For example, for long-past transactions (those whose clog pages
+ * record!  For example, for long-past transactions (those whose clog pages
  * already migrated to disk), we'll return InvalidXLogRecPtr.  Also, because
  * we group transactions on the same clog page to conserve storage, we might
  * return the LSN of a later transaction that falls into the same group.
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fe6698d5ffa..1d9fec7c3e7 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2668,7 +2668,7 @@ SetOffsetVacuumLimit(bool is_startup)
 	LWLockRelease(MultiXactGenLock);
 
 	/*
-	 * Do we need an emergency autovacuum?	If we're not sure, assume yes.
+	 * Do we need an emergency autovacuum?  If we're not sure, assume yes.
 	 */
 	return !oldestOffsetKnown ||
 		(nextOffset - oldestOffset > MULTIXACT_MEMBER_SAFE_THRESHOLD);
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f9f0f6db8d1..231276e189d 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -2658,7 +2658,7 @@ XLogFlush(XLogRecPtr record)
 	 * the whole system due to corruption on one data page.  In particular, if
 	 * the bad page is encountered again during recovery then we would be
 	 * unable to restart the database at all!  (This scenario actually
-	 * happened in the field several times with 7.1 releases.)	As of 8.4, bad
+	 * happened in the field several times with 7.1 releases.)  As of 8.4, bad
 	 * LSNs encountered during recovery are UpdateMinRecoveryPoint's problem;
 	 * the only time we can reach here during recovery is while flushing the
 	 * end-of-recovery checkpoint record, and we don't expect that to have a
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index c4232344aab..ff990020e52 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4056,7 +4056,7 @@ object_ownercheck(Oid classid, Oid objectid, Oid roleid)
  * Note: roles do not have owners per se; instead we use this test in
  * places where an ownership-like permissions test is needed for a role.
  * Be sure to apply it to the role trying to do the operation, not the
- * role being operated on!	Also note that this generally should not be
+ * role being operated on!  Also note that this generally should not be
  * considered enough privilege if the target role is a superuser.
  * (We don't handle that consideration here because we want to give a
  * separate error message for such cases, so the caller has to deal with it.)
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 14e57adee2b..dee850d8bdf 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -88,7 +88,7 @@
  *
  * The textual specification of search_path can include "$user" to refer to
  * the namespace named the same as the current user, if any.  (This is just
- * ignored if there is no such namespace.)	Also, it can include "pg_temp"
+ * ignored if there is no such namespace.)  Also, it can include "pg_temp"
  * to refer to the current backend's temp namespace.  This is usually also
  * ignorable if the temp namespace hasn't been set up, but there's a special
  * case: if "pg_temp" appears first then it should be the default creation
@@ -1710,7 +1710,7 @@ OpernameGetCandidates(List *names, char oprkind, bool missing_schema_ok)
 
 			/*
 			 * Okay, it's in the search path, but does it have the same
-			 * arguments as something we already accepted?	If so, keep only
+			 * arguments as something we already accepted?  If so, keep only
 			 * the one that appears earlier in the search path.
 			 *
 			 * If we have an ordered list from SearchSysCacheList (the normal
@@ -3813,7 +3813,7 @@ recomputeNamespacePath(void)
 	 * Convert the list of names to a list of OIDs.  If any names are not
 	 * recognizable or we don't have read access, just leave them out of the
 	 * list.  (We can't raise an error, since the search_path setting has
-	 * already been accepted.)	Don't make duplicate entries, either.
+	 * already been accepted.)  Don't make duplicate entries, either.
 	 */
 	oidlist = NIL;
 	temp_missing = false;
diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c
index 14d552fe2dd..380a948bc58 100644
--- a/src/backend/catalog/pg_proc.c
+++ b/src/backend/catalog/pg_proc.c
@@ -687,7 +687,7 @@ ProcedureCreate(const char *procedureName,
 		 * check_function_bodies is off, we don't do this, because that would
 		 * create dump ordering hazards that pg_dump doesn't know how to deal
 		 * with.  (For example, a SET clause might refer to a not-yet-created
-		 * text search configuration.)	This means that the validator
+		 * text search configuration.)  This means that the validator
 		 * shouldn't complain about anything that might depend on a GUC
 		 * parameter when check_function_bodies is off.
 		 */
diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c
index 64d326f073c..fe1868d3b3c 100644
--- a/src/backend/catalog/pg_shdepend.c
+++ b/src/backend/catalog/pg_shdepend.c
@@ -186,7 +186,7 @@ recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
  * an object's owner.
  *
  * There must be no more than one existing entry for the given dependent
- * object and dependency type!	So in practice this can only be used for
+ * object and dependency type!  So in practice this can only be used for
  * updating SHARED_DEPENDENCY_OWNER and SHARED_DEPENDENCY_TABLESPACE
  * entries, which should have that property.
  *
@@ -476,7 +476,7 @@ getOidListDiff(Oid *list1, int *nlist1, Oid *list2, int *nlist2)
  *
  * NOTE: Both input arrays must be sorted and de-duped.  (Typically they
  * are extracted from an ACL array by aclmembers(), which takes care of
- * both requirements.)	The arrays are pfreed before return.
+ * both requirements.)  The arrays are pfreed before return.
  */
 void
 updateAclDependencies(Oid classId, Oid objectId, int32 objsubId,
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 65750958bb2..02d3676011e 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -1026,7 +1026,7 @@ examine_attribute(Relation onerel, int attnum, Node *index_expr)
 	 * type of the opclass, which is not interesting for our purposes.  (Note:
 	 * if we did anything with non-expression index columns, we'd need to
 	 * figure out where to get the correct type info from, but for now that's
-	 * not a problem.)	It's not clear whether anyone will care about the
+	 * not a problem.)  It's not clear whether anyone will care about the
 	 * typmod, but we store that too just in case.
 	 */
 	if (index_expr)
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index ef05633bb05..dccb86597d6 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -2083,7 +2083,7 @@ movedb(const char *dbname, const char *tblspcname)
 	 *
 	 * (This is OK because we know we aren't inside a transaction block.)
 	 *
-	 * XXX would it be safe/better to do this inside the ensure block?	Not
+	 * XXX would it be safe/better to do this inside the ensure block?  Not
 	 * convinced it's a good idea; consider elog just after the transaction
 	 * really commits.
 	 */
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 864e35e45b4..a4cc0354baf 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -1702,7 +1702,7 @@ dropProcedures(List *opfamilyname, Oid amoid, Oid opfamilyoid,
  * Subroutine for ALTER OPERATOR CLASS SET SCHEMA/RENAME
  *
  * Is there an operator class with the given name and signature already
- * in the given namespace?	If so, raise an appropriate error message.
+ * in the given namespace?  If so, raise an appropriate error message.
  */
 void
 IsThereOpClassInNamespace(const char *opcname, Oid opcmethod,
@@ -1725,7 +1725,7 @@ IsThereOpClassInNamespace(const char *opcname, Oid opcmethod,
  * Subroutine for ALTER OPERATOR FAMILY SET SCHEMA/RENAME
  *
  * Is there an operator family with the given name and signature already
- * in the given namespace?	If so, raise an appropriate error message.
+ * in the given namespace?  If so, raise an appropriate error message.
  */
 void
 IsThereOpFamilyInNamespace(const char *opfname, Oid opfmethod,
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index aa79d9de4d4..bf9466101a7 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -319,7 +319,7 @@ vacuum(List *relations, VacuumParams *params,
 	/*
 	 * We cannot run VACUUM inside a user transaction block; if we were inside
 	 * a transaction, then our commit- and start-transaction-command calls
-	 * would not have the intended effect!	There are numerous other subtle
+	 * would not have the intended effect!  There are numerous other subtle
 	 * dependencies on this, too.
 	 *
 	 * ANALYZE (without VACUUM) can run either way.
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 9d18ce8c6b2..084b91f6617 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -370,7 +370,7 @@ ExecMarkPos(PlanState *node)
  * the mark operation.  It is unspecified what happens to the plan node's
  * result TupleTableSlot.  (In most cases the result slot is unchanged by
  * a restore, but the node may choose to clear it or to load it with the
- * restored-to tuple.)	Hence the caller should discard any previously
+ * restored-to tuple.)  Hence the caller should discard any previously
  * returned TupleTableSlot after doing a restore.
  */
 void
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 812ead95bc6..797b4fa67c1 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -1946,7 +1946,7 @@ ExecInitExprRec(Expr *node, ExprState *state,
 						/*
 						 * Guard against ALTER COLUMN TYPE on rowtype since
 						 * the RowExpr was created.  XXX should we check
-						 * typmod too?	Not sure we can be sure it'll be the
+						 * typmod too?  Not sure we can be sure it'll be the
 						 * same.
 						 */
 						if (exprType((Node *) e) != att->atttypid)
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 50e06ec6931..662c4a7d7ba 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -1668,7 +1668,7 @@ check_sql_fn_retval(List *queryTreeLists,
 	 * Otherwise, if it's INSERT/UPDATE/DELETE with RETURNING, it returns
 	 * that. Otherwise, the function return type must be VOID.
 	 *
-	 * Note: eventually replace this test with QueryReturnsTuples?	We'd need
+	 * Note: eventually replace this test with QueryReturnsTuples?  We'd need
 	 * a more general method of determining the output type, though.  Also, it
 	 * seems too dangerous to consider FETCH or EXECUTE as returning a
 	 * determinable rowtype, since they depend on relatively short-lived
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 20d23696a53..004724741fd 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -34,7 +34,7 @@
  *	  input tuples and eliminate duplicates (if required) before performing
  *	  the above-depicted process.  (However, we don't do that for ordered-set
  *	  aggregates; their "ORDER BY" inputs are ordinary aggregate arguments
- *	  so far as this module is concerned.)	Note that partial aggregation
+ *	  so far as this module is concerned.)  Note that partial aggregation
  *	  is not supported in these cases, since we couldn't ensure global
  *	  ordering or distinctness of the inputs.
  *
diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c
index 307fc10eea7..2c0530426a5 100644
--- a/src/backend/executor/nodeGather.c
+++ b/src/backend/executor/nodeGather.c
@@ -200,7 +200,7 @@ ExecGather(PlanState *pstate)
 			}
 			else
 			{
-				/* No workers?	Then never mind. */
+				/* No workers?  Then never mind. */
 				node->nreaders = 0;
 				node->reader = NULL;
 			}
diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c
index 9d5e1a46e9e..71052bf08e6 100644
--- a/src/backend/executor/nodeGatherMerge.c
+++ b/src/backend/executor/nodeGatherMerge.c
@@ -241,7 +241,7 @@ ExecGatherMerge(PlanState *pstate)
 			}
 			else
 			{
-				/* No workers?	Then never mind. */
+				/* No workers?  Then never mind. */
 				node->nreaders = 0;
 				node->reader = NULL;
 			}
diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c
index 12bc22f33c6..26ceafec5f8 100644
--- a/src/backend/executor/nodeIncrementalSort.c
+++ b/src/backend/executor/nodeIncrementalSort.c
@@ -69,7 +69,7 @@
  *	the entire result set is available.
  *
  *	The hybrid mode approach allows us to optimize for both very small
- *	groups (where the overhead of a new tuplesort is high) and very	large
+ *	groups (where the overhead of a new tuplesort is high) and very large
  *	groups (where we can lower cost by not having to sort on already sorted
  *	columns), albeit at some extra cost while switching between modes.
  *
diff --git a/src/backend/lib/rbtree.c b/src/backend/lib/rbtree.c
index f362dce220f..91eab40397f 100644
--- a/src/backend/lib/rbtree.c
+++ b/src/backend/lib/rbtree.c
@@ -87,7 +87,7 @@ static RBTNode sentinel =
  *
  * The freefunc should just be pfree or equivalent; it should NOT attempt
  * to free any subsidiary data, because the node passed to it may not contain
- * valid data!	freefunc can be NULL if caller doesn't require retail
+ * valid data!  freefunc can be NULL if caller doesn't require retail
  * space reclamation.
  *
  * The RBTree node is palloc'd in the caller's memory context.  Note that
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 4e721b705d5..6a7f87f17c8 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -1025,7 +1025,7 @@ load_dh_file(char *filename, bool isServerStart)
  *	Load hardcoded DH parameters.
  *
  *	If DH parameters cannot be loaded from a specified file, we can load
- *	the	hardcoded DH parameters supplied with the backend to prevent
+ *	the hardcoded DH parameters supplied with the backend to prevent
  *	problems.
  */
 static DH  *
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index 435438a1735..b7dd77ca882 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -610,7 +610,7 @@ treat_as_join_clause(PlannerInfo *root, Node *clause, RestrictInfo *rinfo,
 		 * Otherwise, it's a join if there's more than one base relation used.
 		 * We can optimize this calculation if an rinfo was passed.
 		 *
-		 * XXX	Since we know the clause is being evaluated at a join, the
+		 * XXX  Since we know the clause is being evaluated at a join, the
 		 * only way it could be single-relation is if it was delayed by outer
 		 * joins.  We intentionally count only baserels here, not OJs that
 		 * might be present in rinfo->clause_relids, so that we direct such
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 7918bb6f0db..991b95ab812 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -47,7 +47,7 @@
  * plan nodes below the LIMIT node) are set without regard to any LIMIT, so
  * that this equation works properly.  (Note: while path->rows is never zero
  * for ordinary relations, it is zero for paths for provably-empty relations,
- * so beware of division-by-zero.)	The LIMIT is applied as a top-level
+ * so beware of division-by-zero.)  The LIMIT is applied as a top-level
  * plan node.
  *
  * For largely historical reasons, most of the routines in this module use
@@ -2439,7 +2439,7 @@ cost_material(Path *path,
 	 * if it is exactly the same then there will be a cost tie between
 	 * nestloop with A outer, materialized B inner and nestloop with B outer,
 	 * materialized A inner.  The extra cost ensures we'll prefer
-	 * materializing the smaller rel.)	Note that this is normally a good deal
+	 * materializing the smaller rel.)  Note that this is normally a good deal
 	 * less than cpu_tuple_cost; which is OK because a Material plan node
 	 * doesn't do qual-checking or projection, so it's got less overhead than
 	 * most plan nodes.
@@ -3613,7 +3613,7 @@ final_cost_mergejoin(PlannerInfo *root, MergePath *path,
 	 * never spill to disk, since it only has to remember tuples back to the
 	 * last mark.  (If there are a huge number of duplicates, our other cost
 	 * factors will make the path so expensive that it probably won't get
-	 * chosen anyway.)	So we don't use cost_rescan here.
+	 * chosen anyway.)  So we don't use cost_rescan here.
 	 *
 	 * Note: keep this estimate in sync with create_mergejoin_plan's labeling
 	 * of the generated Material node.
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c
index 9d4a9197ee6..b5ca895f9cb 100644
--- a/src/backend/optimizer/path/joinpath.c
+++ b/src/backend/optimizer/path/joinpath.c
@@ -230,7 +230,7 @@ add_paths_to_joinrel(PlannerInfo *root,
 	 * is usually no need to create a parameterized result path unless there
 	 * is a join order restriction that prevents joining one of our input rels
 	 * directly to the parameter source rel instead of joining to the other
-	 * input rel.  (But see allow_star_schema_join().)	This restriction
+	 * input rel.  (But see allow_star_schema_join().)  This restriction
 	 * reduces the number of parameterized paths we have to deal with at
 	 * higher join levels, without compromising the quality of the resulting
 	 * plan.  We express the restriction as a Relids set that must overlap the
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index c4e7f97f687..175bb1d407c 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -896,7 +896,7 @@ convert_subquery_pathkeys(PlannerInfo *root, RelOptInfo *rel,
 				 * expression is *not* volatile in the outer query: it's just
 				 * a Var referencing whatever the subquery emitted. (IOW, the
 				 * outer query isn't going to re-execute the volatile
-				 * expression itself.)	So this is okay.
+				 * expression itself.)  So this is okay.
 				 */
 				outer_ec =
 					get_eclass_for_sort_expr(root,
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 134130476e4..38bc21ce7b7 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -936,7 +936,7 @@ use_physical_tlist(PlannerInfo *root, Path *path, int flags)
 	 * to emit any sort/group columns that are not simple Vars.  (If they are
 	 * simple Vars, they should appear in the physical tlist, and
 	 * apply_pathtarget_labeling_to_tlist will take care of getting them
-	 * labeled again.)	We also have to check that no two sort/group columns
+	 * labeled again.)  We also have to check that no two sort/group columns
 	 * are the same Var, else that element of the physical tlist would need
 	 * conflicting ressortgroupref labels.
 	 */
@@ -4210,7 +4210,7 @@ create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path,
 	 * 0, but there can be no Var with relid 0 in the rel's targetlist or the
 	 * restriction clauses, so we skip this in that case.  Note that any such
 	 * columns in base relations that were joined are assumed to be contained
-	 * in fdw_scan_tlist.)	This is a bit of a kluge and might go away
+	 * in fdw_scan_tlist.)  This is a bit of a kluge and might go away
 	 * someday, so we intentionally leave it out of the API presented to FDWs.
 	 */
 	scan_plan->fsSystemCol = false;
diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c
index 904f710d593..95c3cdb201b 100644
--- a/src/backend/optimizer/plan/initsplan.c
+++ b/src/backend/optimizer/plan/initsplan.c
@@ -1373,7 +1373,7 @@ make_outerjoininfo(PlannerInfo *root,
 	 * Presently the executor cannot support FOR [KEY] UPDATE/SHARE marking of
 	 * rels appearing on the nullable side of an outer join. (It's somewhat
 	 * unclear what that would mean, anyway: what should we mark when a result
-	 * row is generated from no element of the nullable relation?)	So,
+	 * row is generated from no element of the nullable relation?)  So,
 	 * complain if any nullable rel is FOR [KEY] UPDATE/SHARE.
 	 *
 	 * You might be wondering why this test isn't made far upstream in the
diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c
index 870d84b29d7..3f6d4e91f89 100644
--- a/src/backend/optimizer/prep/prepjointree.c
+++ b/src/backend/optimizer/prep/prepjointree.c
@@ -1578,7 +1578,7 @@ is_simple_subquery(PlannerInfo *root, Query *subquery, RangeTblEntry *rte,
 		 * outer-query quals, but we don't have enough info here to check
 		 * that.  Also, maybe this restriction could be removed if we forced
 		 * such refs to be wrapped in PlaceHolderVars, even when they're below
-		 * the nearest outer join?	But it's a pretty hokey usage, so not
+		 * the nearest outer join?  But it's a pretty hokey usage, so not
 		 * clear this is worth sweating over.)
 		 */
 		if (lowest_outer_join != NULL)
diff --git a/src/backend/optimizer/util/orclauses.c b/src/backend/optimizer/util/orclauses.c
index 85ecdfc14f2..380d541dc5a 100644
--- a/src/backend/optimizer/util/orclauses.c
+++ b/src/backend/optimizer/util/orclauses.c
@@ -167,7 +167,7 @@ extract_or_clause(RestrictInfo *or_rinfo, RelOptInfo *rel)
 	 * cheaper.  We'll strip those nodes from the returned tree, though,
 	 * meaning that fresh ones will be built if the clause is accepted as a
 	 * restriction clause.  This might seem wasteful --- couldn't we re-use
-	 * the existing RestrictInfos?	But that'd require assuming that
+	 * the existing RestrictInfos?  But that'd require assuming that
 	 * selectivity and other cached data is computed exactly the same way for
 	 * a restriction clause as for a join clause, which seems undesirable.
 	 */
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index d749b505785..a5438819876 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -508,7 +508,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path)
 								 * very small fuzz limit.  (We used to do an
 								 * exact cost comparison, but that results in
 								 * annoying platform-specific plan variations
-								 * due to roundoff in the cost estimates.)	If
+								 * due to roundoff in the cost estimates.)  If
 								 * things are still tied, arbitrarily keep
 								 * only the old path.  Notice that we will
 								 * keep only the old path even if the
diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c
index c55c5f805b3..732546571e7 100644
--- a/src/backend/optimizer/util/var.c
+++ b/src/backend/optimizer/util/var.c
@@ -101,7 +101,7 @@ static Relids alias_relid_set(Query *query, Relids relids);
  *
  * NOTE: this is used on not-yet-planned expressions.  It may therefore find
  * bare SubLinks, and if so it needs to recurse into them to look for uplevel
- * references to the desired rtable level!	But when we find a completed
+ * references to the desired rtable level!  But when we find a completed
  * SubPlan, we only need to look at the parameters passed to the subplan.
  */
 Relids
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 52787b67943..73bf0abcac7 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -1681,7 +1681,7 @@ select_common_typmod(ParseState *pstate, List *exprs, Oid common_type)
  *
  * Domains over arrays match ANYARRAY, and are immediately flattened to their
  * base type.  (Thus, for example, we will consider it a match if one ANYARRAY
- * argument is a domain over int4[] while another one is just int4[].)	Also
+ * argument is a domain over int4[] while another one is just int4[].)  Also
  * notice that such a domain does *not* match ANYNONARRAY.  The same goes
  * for ANYCOMPATIBLEARRAY and ANYCOMPATIBLENONARRAY.
  *
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 2552327d904..d78346e45c3 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -3208,7 +3208,7 @@ process_pm_child_exit(void)
 		}
 
 		/*
-		 * Was it the autovacuum launcher?	Normal exit can be ignored; we'll
+		 * Was it the autovacuum launcher?  Normal exit can be ignored; we'll
 		 * start a new one at the next iteration of the postmaster's main
 		 * loop, if necessary.  Any other exit condition is treated as a
 		 * crash.
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index e18398cd428..e5ed4ed90b7 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -550,7 +550,7 @@ examine_attribute(Node *expr)
 	 * of the opclass, which is not interesting for our purposes.  (Note: if
 	 * we did anything with non-expression statistics columns, we'd need to
 	 * figure out where to get the correct type info from, but for now that's
-	 * not a problem.)	It's not clear whether anyone will care about the
+	 * not a problem.)  It's not clear whether anyone will care about the
 	 * typmod, but we store that too just in case.
 	 */
 	stats->attrtypid = exprType(expr);
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 926d000f2ea..7ea6ae7f690 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1001,7 +1001,7 @@ BasicOpenFile(const char *fileName, int fileFlags)
  * This is exported for use by places that really want a plain kernel FD,
  * but need to be proof against running out of FDs.  Once an FD has been
  * successfully returned, it is the caller's responsibility to ensure that
- * it will not be leaked on ereport()!	Most users should *not* call this
+ * it will not be leaked on ereport()!  Most users should *not* call this
  * routine directly, but instead use the VFD abstraction level, which
  * provides protection against descriptor leaks as well as management of
  * files that need to be open for more than a short period of time.
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index a87372f33f9..4a6d034d962 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -3527,7 +3527,7 @@ PostPrepare_Locks(TransactionId xid)
 			 * the proclock would then be in the wrong hash chain.  Instead
 			 * use hash_update_hash_key.  (We used to create a new hash entry,
 			 * but that risks out-of-memory failure if other processes are
-			 * busy making proclocks too.)	We must unlink the proclock from
+			 * busy making proclocks too.)  We must unlink the proclock from
 			 * our procLink chain and put it into the new proc's chain, too.
 			 *
 			 * Note: the updated proclock hash key will still belong to the
@@ -3831,7 +3831,7 @@ GetBlockerStatusData(int blocked_pid)
 	 * In addition, to examine the lock grouping fields of any other backend,
 	 * we must hold all the hash partition locks.  (Only one of those locks is
 	 * actually relevant for any one lock group, but we can't know which one
-	 * ahead of time.)	It's fairly annoying to hold all those locks
+	 * ahead of time.)  It's fairly annoying to hold all those locks
 	 * throughout this, but it's no worse than GetLockStatusData(), and it
 	 * does have the advantage that we're guaranteed to return a
 	 * self-consistent instantaneous state.
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index b2bd749d770..eefba40d39a 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -511,7 +511,7 @@ smgrextend(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
  *	smgrprefetch() -- Initiate asynchronous read of the specified block of a relation.
  *
  *		In recovery only, this can return false to indicate that a file
- *		doesn't	exist (presumably it has been dropped by a later WAL
+ *		doesn't exist (presumably it has been dropped by a later WAL
  *		record).
  */
 bool
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 5d439f27100..224db7216b8 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -4263,7 +4263,7 @@ PostgresMain(const char *dbname, const char *username)
 		 * future we might want to allow some timeout requests to survive, but
 		 * at minimum it'd be necessary to do reschedule_timeouts(), in case
 		 * we got here because of a query cancel interrupting the SIGALRM
-		 * interrupt handler.)	Note in particular that we must clear the
+		 * interrupt handler.)  Note in particular that we must clear the
 		 * statement and lock timeout indicators, to prevent any future plain
 		 * query cancels from being misreported as timeouts in case we're
 		 * forgetting a timeout cancel.
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index 25d98527786..8c4e1a9e327 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -50,7 +50,7 @@ typedef struct
 
 	/*
 	 * fields to store last variant to lexize (basically, thesaurus or similar
-	 * to, which wants	several lexemes
+	 * to, which wants several lexemes)
 	 */
 
 	ParsedLex  *lastRes;
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 8f7522d1033..c7a196f960d 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -5091,7 +5091,7 @@ is_member_of_role_nosuper(Oid member, Oid role)
 
 
 /*
- * Is member an admin of role?	That is, is member the role itself (subject to
+ * Is member an admin of role?  That is, is member the role itself (subject to
  * restrictions below), a member (directly or indirectly) WITH ADMIN OPTION,
  * or a superuser?
  */
diff --git a/src/backend/utils/adt/like_support.c b/src/backend/utils/adt/like_support.c
index 9b603d42f3d..bdd0f5999ee 100644
--- a/src/backend/utils/adt/like_support.c
+++ b/src/backend/utils/adt/like_support.c
@@ -559,7 +559,7 @@ patternsel_common(PlannerInfo *root,
 	/*
 	 * Similarly, the exposed type of the left-hand side should be one of
 	 * those we know.  (Do not look at vardata.atttype, which might be
-	 * something binary-compatible but different.)	We can use it to identify
+	 * something binary-compatible but different.)  We can use it to identify
 	 * the comparison operators and the required type of the comparison
 	 * constant, much as in match_pattern_prefix().
 	 */
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index fe37e65af03..93cff772703 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -5512,7 +5512,7 @@ examine_simple_variable(PlannerInfo *root, Var *var,
 		 * Punt if subquery uses set operations or GROUP BY, as these will
 		 * mash underlying columns' stats beyond recognition.  (Set ops are
 		 * particularly nasty; if we forged ahead, we would return stats
-		 * relevant to only the leftmost subselect...)	DISTINCT is also
+		 * relevant to only the leftmost subselect...)  DISTINCT is also
 		 * problematic, but we check that later because there is a possibility
 		 * of learning something even with it.
 		 */
@@ -5603,7 +5603,7 @@ examine_simple_variable(PlannerInfo *root, Var *var,
 		/*
 		 * Otherwise, the Var comes from a FUNCTION, VALUES, or CTE RTE.  (We
 		 * won't see RTE_JOIN here because join alias Vars have already been
-		 * flattened.)	There's not much we can do with function outputs, but
+		 * flattened.)  There's not much we can do with function outputs, but
 		 * maybe someday try to be smarter about VALUES and/or CTEs.
 		 */
 	}
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 170b3a3820b..762c33c7aab 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -1435,7 +1435,7 @@ text_position_next_internal(char *start_ptr, TextPositionState *state)
 			p = hptr;
 			while (*nptr == *p)
 			{
-				/* Matched it all?	If so, return 1-based position */
+				/* Matched it all?  If so, return 1-based position */
 				if (nptr == needle)
 					return (char *) p;
 				nptr--, p--;
@@ -3712,7 +3712,7 @@ textToQualifiedNameList(text *textval)
  * amount of stuff that needs to be allocated and freed.
  *
  * Inputs:
- *	rawstring: the input string; must be overwritable!	On return, it's
+ *	rawstring: the input string; must be overwritable!  On return, it's
  *			   been modified to contain the separated identifiers.
  *	separator: the separator punctuation expected between identifiers
  *			   (typically '.' or ',').  Whitespace may also appear around
@@ -3963,7 +3963,7 @@ SplitDirectoriesString(char *rawstring, char separator,
  * Be sure to update that if you have to change this.
  *
  * Inputs:
- *	rawstring: the input string; must be overwritable!	On return, it's
+ *	rawstring: the input string; must be overwritable!  On return, it's
  *			   been modified to contain the separated identifiers.
  *	separator: the separator punctuation expected between identifiers
  *			   (typically '.' or ',').  Whitespace may also appear around
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index 77c2ba3f8f4..353fd390aee 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -401,7 +401,7 @@ CompleteCachedPlan(CachedPlanSource *plansource,
 		/*
 		 * Also save the current search_path in the query_context.  (This
 		 * should not generate much extra cruft either, since almost certainly
-		 * the path is already valid.)	Again, we don't really need this for
+		 * the path is already valid.)  Again, we don't really need this for
 		 * one-shot plans; and we *must* skip this for transaction control
 		 * commands, because this could result in catalog accesses.
 		 */
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 13f79873733..1598f7a3418 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -2582,7 +2582,7 @@ RelationClearRelation(Relation relation, bool rebuild)
 		 * sufficient to prevent any significant change in the rel's schema,
 		 * so the existing entry contents should be good enough for its
 		 * purposes; at worst we might be behind on statistics updates or the
-		 * like.  (See also CheckTableNotInUse() and its callers.)	These same
+		 * like.  (See also CheckTableNotInUse() and its callers.)  These same
 		 * remarks also apply to the cases above where we exit without having
 		 * done RelationReloadIndexInfo() yet.
 		 */
diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c
index 7760ad764ea..4058dddb710 100644
--- a/src/backend/utils/cache/ts_cache.c
+++ b/src/backend/utils/cache/ts_cache.c
@@ -12,7 +12,7 @@
  * safe to hold onto a pointer to the cache entry while doing things that
  * might result in recognizing a cache invalidation.  Beware however that
  * subsidiary information might be deleted and reallocated somewhere else
- * if a cache inval and reval happens!	This does not look like it will be
+ * if a cache inval and reval happens!  This does not look like it will be
  * a big problem as long as parser and dictionary methods do not attempt
  * any database access.
  *
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index bc83f3577d7..ce5a6c987bd 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3572,7 +3572,7 @@ set_config_option_ext(const char *name, const char *value,
 
 	/*
 	 * Should we set reset/stacked values?	(If so, the behavior is not
-	 * transactional.)	This is done either when we get a default value from
+	 * transactional.)  This is done either when we get a default value from
 	 * the database's/user's/client's default settings or when we reset a
 	 * value to its default.
 	 */
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
index f5a62061a3e..20111fd6fe9 100644
--- a/src/backend/utils/mmgr/dsa.c
+++ b/src/backend/utils/mmgr/dsa.c
@@ -135,7 +135,7 @@ typedef size_t dsa_segment_index;
 
 /*
  * What is the lowest bin that holds segments that *might* have n contiguous
- * free pages?	There is no point in looking in segments in lower bins; they
+ * free pages?  There is no point in looking in segments in lower bins; they
  * definitely can't service a request for n free pages.
  */
 static inline size_t
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 7a58c33ace3..d6a3828ad31 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -687,7 +687,7 @@ find_matching_ts_config(const char *lc_type)
 	 * underscore (usual case) or a hyphen (Windows "locale name"; see
 	 * comments at IsoLocaleName()).
 	 *
-	 * XXX Should ' ' be a stop character?	This would select "norwegian" for
+	 * XXX Should ' ' be a stop character?  This would select "norwegian" for
 	 * the Windows locale "Norwegian (Nynorsk)_Norway.1252".  If we do so, we
 	 * should also accept the "nn" and "nb" Unix locales.
 	 *
diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c
index 9753a6d8682..b24e1f56525 100644
--- a/src/bin/pg_dump/dumputils.c
+++ b/src/bin/pg_dump/dumputils.c
@@ -707,7 +707,7 @@ variable_is_guc_list_quote(const char *name)
  * See comparable code in src/backend/utils/adt/varlena.c.
  *
  * Inputs:
- *	rawstring: the input string; must be overwritable!	On return, it's
+ *	rawstring: the input string; must be overwritable!  On return, it's
  *			   been modified to contain the separated identifiers.
  *	separator: the separator punctuation expected between identifiers
  *			   (typically '.' or ',').  Whitespace may also appear around
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 527c7651ab2..c730900891f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -16151,7 +16151,7 @@ dumpIndex(Archive *fout, const IndxInfo *indxinfo)
 	/*
 	 * If there's an associated constraint, don't dump the index per se, but
 	 * do dump any comment for it.  (This is safe because dependency ordering
-	 * will have ensured the constraint is emitted first.)	Note that the
+	 * will have ensured the constraint is emitted first.)  Note that the
 	 * emitted comment has to be shown as depending on the constraint, not the
 	 * index, in such cases.
 	 */
diff --git a/src/bin/pg_test_timing/pg_test_timing.c b/src/bin/pg_test_timing/pg_test_timing.c
index c29d6f87629..ab8cf261ec3 100644
--- a/src/bin/pg_test_timing/pg_test_timing.c
+++ b/src/bin/pg_test_timing/pg_test_timing.c
@@ -1,6 +1,6 @@
 /*
  *	pg_test_timing.c
- *		tests overhead of timing calls and their monotonicity:	that
+ *		tests overhead of timing calls and their monotonicity: that
  *		they always move forward
  */
 
diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c
index 820bddf3159..7a96fc7c79d 100644
--- a/src/bin/pg_upgrade/server.c
+++ b/src/bin/pg_upgrade/server.c
@@ -217,7 +217,7 @@ start_postmaster(ClusterInfo *cluster, bool report_and_exit_on_error)
 	strcat(socket_string,
 		   " -c listen_addresses='' -c unix_socket_permissions=0700");
 
-	/* Have a sockdir?	Tell the postmaster. */
+	/* Have a sockdir?  Tell the postmaster. */
 	if (cluster->sockdir)
 		snprintf(socket_string + strlen(socket_string),
 				 sizeof(socket_string) - strlen(socket_string),
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
index ea1146f520f..46103acea90 100644
--- a/src/interfaces/ecpg/ecpglib/prepare.c
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -519,7 +519,7 @@ AddStmtToCache(int lineno,		/* line # of statement */
 	for (ix = 0; ix < stmtCacheEntPerBucket; ++ix)
 	{
 		entry = &stmtCacheEntries[entNo];
-		if (!entry->stmtID[0])	/* unused entry  -	use it */
+		if (!entry->stmtID[0])	/* unused entry - use it */
 			break;
 		if (entry->execs < stmtCacheEntries[luEntNo].execs)
 			luEntNo = entNo;	/* save new 'least used' entry */
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 54cc04addd2..6185fc18957 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -346,7 +346,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm *tm,
 					break;
 
 					/*
-					 * The	preferred  date  and  time	representation	for
+					 * The preferred date and time representation for
 					 * the current locale.
 					 */
 				case 'c':
-- 
2.25.1

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-02-09 05:45  Michael Paquier <michael@paquier.xyz>
  parent: Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 54+ messages in thread

From: Michael Paquier @ 2023-02-09 05:45 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: Amit Kapila <amit.kapila16@gmail.com>; pgsql-hackers@lists.postgresql.org

On Wed, Feb 08, 2023 at 09:56:44AM -0600, Justin Pryzby wrote:
> Some more accumulated/new typos.

0001 has been a debate for a long time, and it depends on the way SQL
is spelled.  For reference:
$ git grep -i " an sql" -- *.c | wc -l
63
$ git grep -i " a sql" -- *.c | wc -l
135

0005 can indeed fix a lot of confusion around the spaces after an
"else if" block.  Is that something that could be automated with the
indentation, though?  Same remark for 0009 and 0010.

Applied 0002, 0003, 0004, 0006, after rewording a bit 0003 to mention
the compression type.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../Y+SIhEEVYkZf9P2f@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 54+ messages in thread

* Re: typos
@ 2023-02-09 06:36  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 54+ messages in thread

From: Tom Lane @ 2023-02-09 06:36 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Justin Pryzby <pryzby@telsasoft.com>; Amit Kapila <amit.kapila16@gmail.com>; pgsql-hackers@lists.postgresql.org

Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Feb 08, 2023 at 09:56:44AM -0600, Justin Pryzby wrote:
>> Some more accumulated/new typos.

> 0005 can indeed fix a lot of confusion around the spaces after an
> "else if" block.  Is that something that could be automated with the
> indentation, though?  Same remark for 0009 and 0010.

I see your point about 0005, but I've never seen pgindent remove
vertical whitespace once it's been added.  Not sure what it'd take
to teach it to do so, or whether we'd like the results.

I'd reject 0009 and 0010 altogether --- they don't add any readability
that's worth the potential increase in back-patch problems.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 54+ messages in thread


end of thread, other threads:[~2023-02-09 06:36 UTC | newest]

Thread overview: 54+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 05:34 Typos Fujii Masao <masao.fujii@gmail.com>
2011-03-30 05:59 ` Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
2014-03-24 06:40 typos Erik Rijkers <er@xs4all.nl>
2014-03-24 06:42 ` Re: typos Heikki Linnakangas <hlinnakangas@vmware.com>
2020-11-28 22:58 [PATCH 3/4] typos Justin Pryzby <pryzbyj@telsasoft.com>
2021-09-24 21:58 typos Justin Pryzby <pryzby@telsasoft.com>
2022-01-24 03:00 typos Justin Pryzby <pryzby@telsasoft.com>
2022-01-24 07:01 ` Re: typos Michael Paquier <michael@paquier.xyz>
2022-01-24 07:07   ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2022-01-24 07:55     ` Re: typos Michael Paquier <michael@paquier.xyz>
2022-01-25 01:53       ` Re: typos Michael Paquier <michael@paquier.xyz>
2022-04-11 02:03 typos Justin Pryzby <pryzby@telsasoft.com>
2022-04-11 04:39 ` Re: typos David Rowley <dgrowleyml@gmail.com>
2022-04-11 08:55   ` Re: typos David Rowley <dgrowleyml@gmail.com>
2022-04-11 17:59     ` Re: typos Robert Haas <robertmhaas@gmail.com>
2022-04-13 17:29     ` Re: typos Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-04-13 17:40       ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2022-04-13 21:39         ` Re: typos David Rowley <dgrowleyml@gmail.com>
2022-04-14 00:33           ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2022-04-19 11:05             ` Re: typos Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-04-20 03:49               ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2022-04-20 12:01                 ` Re: typos Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-04-21 02:25                   ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2022-04-20 21:32               ` Re: typos Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-04-20 21:38                 ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2022-05-11 02:03                   ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2022-05-11 06:41                     ` Re: typos Michael Paquier <michael@paquier.xyz>
2022-04-21 04:36                 ` Re: typos Michael Paquier <michael@paquier.xyz>
2022-04-21 13:59                   ` Re: typos Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2022-04-21 17:16                     ` Re: typos Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-04-11 10:10   ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2022-04-11 10:25     ` Re: typos Masahiko Sawada <sawada.mshk@gmail.com>
2022-04-11 10:45       ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2022-04-12 11:26         ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2022-04-13 20:56     ` Re: typos David Rowley <dgrowleyml@gmail.com>
2022-07-05 07:51       ` Re: typos Noah Misch <noah@leadboat.com>
2022-05-11 00:02 [PATCH v2022051001 2/2] typos Justin Pryzby <pryzbyj@telsasoft.com>
2022-07-05 19:12 [PATCH 1/4] typos Justin Pryzby <pryzbyj@telsasoft.com>
2022-09-25 23:40 [PATCH 1/9] typos Justin Pryzby <pryzbyj@telsasoft.com>
2022-12-30 23:12 typos Justin Pryzby <pryzby@telsasoft.com>
2023-01-03 07:28 ` Re: typos Michael Paquier <michael@paquier.xyz>
2023-01-03 07:33   ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2023-01-03 08:41     ` Re: typos Michael Paquier <michael@paquier.xyz>
2023-01-03 16:16       ` Re: typos Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2023-01-03 21:39   ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2023-01-10 04:57     ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2023-01-10 06:54       ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2023-01-10 07:48         ` Re: typos Michael Paquier <michael@paquier.xyz>
2023-01-10 08:25           ` Re: typos Amit Kapila <amit.kapila16@gmail.com>
2023-01-11 06:26             ` Re: typos Michael Paquier <michael@paquier.xyz>
2023-02-08 15:56               ` Re: typos Justin Pryzby <pryzby@telsasoft.com>
2023-02-09 05:45                 ` Re: typos Michael Paquier <michael@paquier.xyz>
2023-02-09 06:36                   ` Re: typos Tom Lane <tgl@sss.pgh.pa.us>
2023-01-05 03:51 [PATCH 6/9] typos Justin Pryzby <pryzbyj@telsasoft.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox