On Tue, Sep 03, 2024 at 12:00:13PM +0200, Daniel Gustafsson wrote:
> I see your v17 typo fixes, and raise you a few more.  Commit 31a98934d169 from
> just now contains 2 (out of 3) sets of typos introduced in v17 so they should
> follow along when you push the ones mentioned here.

Is that really mandatory?  I tend to worry about back branches only
when this stuff is user-visible, like in the docs or error messages.
This opinion varies for each individual, of course.  That's just my
lazy opinion.

CommitTSSLRU -> CommitTsSLRU is user-visible, showing up in
pg_stat_activity.  Fixed this one with 08b9b9e043bb, as the tag for
17rc1 has been pushed.

Picking f747bc18f7f2 and 75c5231a00f3 on REL_17_STABLE leads to the
attached, I think, without the conflicts.
--
Michael
From f747bc18f7f205795177cce6a93e19169bd0467f Mon Sep 17 00:00:00 2001
From: Michael Paquier <mich...@paquier.xyz>
Date: Tue, 3 Sep 2024 14:49:04 +0900
Subject: [PATCH 1/2] Fix typos and grammar in code comments and docs

Author: Alexander Lakhin
Discussion: https://postgr.es/m/f7e514cf-2446-21f1-a5d2-8c089a6e2...@gmail.com
---
 src/include/utils/injection_point.h                    | 2 +-
 src/backend/access/transam/multixact.c                 | 2 +-
 src/backend/executor/execExprInterp.c                  | 2 +-
 src/backend/replication/logical/slotsync.c             | 2 +-
 src/backend/storage/aio/read_stream.c                  | 2 +-
 src/backend/storage/lmgr/lock.c                        | 2 +-
 src/bin/pg_combinebackup/t/008_promote.pl              | 4 ++--
 src/bin/psql/common.c                                  | 2 +-
 src/interfaces/libpq/fe-connect.c                      | 2 +-
 src/test/subscription/t/021_twophase.pl                | 2 +-
 contrib/test_decoding/specs/skip_snapshot_restore.spec | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/include/utils/injection_point.h b/src/include/utils/injection_point.h
index 6e417cedc6..8041e4fe0f 100644
--- a/src/include/utils/injection_point.h
+++ b/src/include/utils/injection_point.h
@@ -12,7 +12,7 @@
 #define INJECTION_POINT_H
 
 /*
- * Injections points require --enable-injection-points.
+ * Injection points require --enable-injection-points.
  */
 #ifdef USE_INJECTION_POINTS
 #define INJECTION_POINT(name) InjectionPointRun(name)
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index b7b47ef076..42ea9ba5b4 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2009,7 +2009,7 @@ check_multixact_offset_buffers(int *newval, void **extra, GucSource source)
 }
 
 /*
- * GUC check_hook for multixact_member_buffer
+ * GUC check_hook for multixact_member_buffers
  */
 bool
 check_multixact_member_buffers(int *newval, void **extra, GucSource source)
diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index c32ac7c509..ff76e10bd3 100644
--- a/src/backend/executor/execExprInterp.c
+++ b/src/backend/executor/execExprInterp.c
@@ -4626,7 +4626,7 @@ ExecEvalJsonCoercionFinish(ExprState *state, ExprEvalStep *op)
 	if (SOFT_ERROR_OCCURRED(&jsestate->escontext))
 	{
 		/*
-		 * jsestate->error or jsetate->empty being set means that the error
+		 * jsestate->error or jsestate->empty being set means that the error
 		 * occurred when coercing the JsonBehavior value.  Throw the error in
 		 * that case with the actual coercion error message shown in the
 		 * DETAIL part.
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index ebfbaebe16..fe0478e373 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -83,7 +83,7 @@
  * this flag is set. Note that we don't need to reset this variable as after
  * promotion the slot sync worker won't be restarted because the pmState
  * changes to PM_RUN from PM_HOT_STANDBY and we don't support demoting
- * primary without restarting the server. See MaybeStartSlotSyncWorker.
+ * primary without restarting the server. See LaunchMissingBackgroundProcesses.
  *
  * The 'syncing' flag is needed to prevent concurrent slot syncs to avoid slot
  * overwrites.
diff --git a/src/backend/storage/aio/read_stream.c b/src/backend/storage/aio/read_stream.c
index a6c50b2ae2..f04c788a46 100644
--- a/src/backend/storage/aio/read_stream.c
+++ b/src/backend/storage/aio/read_stream.c
@@ -450,7 +450,7 @@ read_stream_begin_relation(int flags,
 	queue_size = max_pinned_buffers + 1;
 
 	/*
-	 * Allocate the object, the buffers, the ios and per_data_data space in
+	 * Allocate the object, the buffers, the ios and per_buffer_data space in
 	 * one big chunk.  Though we have queue_size buffers, we want to be able
 	 * to assume that all the buffers for a single read are contiguous (i.e.
 	 * don't wrap around halfway through), so we allow temporary overflows of
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 0400a50777..ba77c71baa 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -398,7 +398,7 @@ InitLocks(void)
 
 	/*
 	 * Compute init/max size to request for lock hashtables.  Note these
-	 * calculations must agree with LockShmemSize!
+	 * calculations must agree with LockManagerShmemSize!
 	 */
 	max_table_size = NLOCKENTS();
 	init_table_size = max_table_size / 2;
diff --git a/src/bin/pg_combinebackup/t/008_promote.pl b/src/bin/pg_combinebackup/t/008_promote.pl
index 1154a5d8b2..0ee96ff037 100644
--- a/src/bin/pg_combinebackup/t/008_promote.pl
+++ b/src/bin/pg_combinebackup/t/008_promote.pl
@@ -54,7 +54,7 @@ recovery_target_action = 'pause'
 EOM
 $node2->start();
 
-# Wait until recoveery pauses, then promote.
+# Wait until recovery pauses, then promote.
 $node2->poll_query_until('postgres', "SELECT pg_get_wal_replay_pause_state() = 'paused';");
 $node2->safe_psql('postgres', "SELECT pg_promote()");
 
@@ -65,7 +65,7 @@ INSERT INTO mytable VALUES (2, 'blackberry');
 EOM
 
 # Now take an incremental backup. If WAL summarization didn't follow the
-# timeline cange correctly, something should break at this point.
+# timeline change correctly, something should break at this point.
 my $backup2path = $node1->backup_dir . '/backup2';
 $node2->command_ok(
 	[ 'pg_basebackup', '-D', $backup2path, '--no-sync', '-cfast',
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index fe8e049c4c..ba8244aba2 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1680,7 +1680,7 @@ ExecQueryAndProcessResults(const char *query,
 			{
 				/*
 				 * Display the current chunk of results, unless the output
-				 * stream stopped working or we got cancelled.  We skip use of
+				 * stream stopped working or we got canceled.  We skip use of
 				 * PrintQueryResult and go directly to printQuery, so that we
 				 * can pass the correct is_pager value and because we don't
 				 * want PrintQueryStatus to happen yet.  Above, we rejected
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 360d9a4547..01bd48a675 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -947,7 +947,7 @@ fillPGconn(PGconn *conn, PQconninfoOption *connOptions)
  * Copy over option values from srcConn to dstConn
  *
  * Don't put anything cute here --- intelligence should be in
- * connectOptions2 ...
+ * pqConnectOptions2 ...
  *
  * Returns true on success. On failure, returns false and sets error message of
  * dstConn.
diff --git a/src/test/subscription/t/021_twophase.pl b/src/test/subscription/t/021_twophase.pl
index e635be74c6..0cdafc9791 100644
--- a/src/test/subscription/t/021_twophase.pl
+++ b/src/test/subscription/t/021_twophase.pl
@@ -76,7 +76,7 @@ $node_publisher->safe_psql(
 	INSERT INTO tab_full VALUES (11);
 	PREPARE TRANSACTION 'test_prepared_tab_full';");
 
-# Confirm the ERROR is reported becasue max_prepared_transactions is zero
+# Confirm the ERROR is reported because max_prepared_transactions is zero
 $node_subscriber->wait_for_log(
 	qr/ERROR: ( [A-Z0-9]+:)? prepared transactions are disabled/);
 
diff --git a/contrib/test_decoding/specs/skip_snapshot_restore.spec b/contrib/test_decoding/specs/skip_snapshot_restore.spec
index 3f1fb6f02c..7b35dbcc9f 100644
--- a/contrib/test_decoding/specs/skip_snapshot_restore.spec
+++ b/contrib/test_decoding/specs/skip_snapshot_restore.spec
@@ -39,7 +39,7 @@ step "s2_get_changes_slot0" { SELECT data FROM pg_logical_slot_get_changes('slot
 # serializes consistent snapshots to the disk at LSNs where are before
 # s0-transaction's commit. After s0-transaction commits, "s1_init" resumes but
 # must not restore any serialized snapshots and will reach the consistent state
-# when decoding a RUNNING_XACT record generated after s0-transaction's commit.
+# when decoding a RUNNING_XACTS record generated after s0-transaction's commit.
 # We check if the get_changes on 'slot1' will not return any s0-transaction's
 # changes as its confirmed_flush_lsn will be after the s0-transaction's commit
 # record.
-- 
2.45.2

From 75c5231a00f3a1cb84a18320f15fa0284d9b1235 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafs...@postgresql.org>
Date: Tue, 3 Sep 2024 11:33:38 +0200
Subject: [PATCH 2/2] Fix typos in code comments and test data

The typos in 005_negotiate_encryption.pl and pg_combinebackup.c
shall be backported to v17 where they were introduced.

Backpatch-through: v17
Discussion: https://postgr.es/m/ztaj7bkn4658o...@paquier.xyz
---
 src/bin/pg_combinebackup/pg_combinebackup.c        | 2 +-
 src/interfaces/libpq/t/005_negotiate_encryption.pl | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index a29ed23f3e..ea47c0a369 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -849,7 +849,7 @@ process_directory_recursively(Oid tsoid,
 	 *
 	 * We set is_pg_wal for the toplevel WAL directory and all of its
 	 * subdirectories, because those files are not included in the backup
-	 * manifest and hence need special treatement. (Since incremental backup
+	 * manifest and hence need special treatment. (Since incremental backup
 	 * does not exist in pre-v10 versions, we don't have to worry about the
 	 * old pg_xlog naming.)
 	 *
diff --git a/src/interfaces/libpq/t/005_negotiate_encryption.pl b/src/interfaces/libpq/t/005_negotiate_encryption.pl
index c3f70d31bc..294730e360 100644
--- a/src/interfaces/libpq/t/005_negotiate_encryption.pl
+++ b/src/interfaces/libpq/t/005_negotiate_encryption.pl
@@ -239,7 +239,7 @@ testuser    disable      disable      postgres       connect, authok
 .           .            require      postgres       connect, sslreject          -> fail
 .           .            .            direct         connect, directsslreject    -> fail
 
-# sslnegotiation=direct is not acccepted unless sslmode=require or stronger
+# sslnegotiation=direct is not accepted unless sslmode=require or stronger
 *           *            disable      direct         -     -> fail
 *           *            allow        direct         -     -> fail
 *           *            prefer       direct         -     -> fail
@@ -302,7 +302,7 @@ nossluser   .            disable      postgres       connect, authok
 .           .            require      postgres       connect, sslaccept, authfail                    -> fail
 .           .            require      direct         connect, directsslaccept, authfail              -> fail
 
-# sslnegotiation=direct is not acccepted unless sslmode=require or stronger
+# sslnegotiation=direct is not accepted unless sslmode=require or stronger
 *           *            disable      direct         -     -> fail
 *           *            allow        direct         -     -> fail
 *           *            prefer       direct         -     -> fail
@@ -376,7 +376,7 @@ nogssuser   disable      disable      postgres       connect, authok
 .           .            require      postgres       connect, gssaccept, authfail -> fail   # If both GSSAPI and sslmode are required, and GSS is not available -> fail
 .           .            .            direct         connect, gssaccept, authfail -> fail   # If both GSSAPI and sslmode are required, and GSS is not available -> fail
 
-# sslnegotiation=direct is not acccepted unless sslmode=require or stronger
+# sslnegotiation=direct is not accepted unless sslmode=require or stronger
 *           *            disable      direct         -     -> fail
 *           *            allow        direct         -     -> fail
 *           *            prefer       direct         -     -> fail
@@ -501,7 +501,7 @@ nossluser   disable      disable      postgres       connect, authok
 .           require      *            postgres       connect, gssaccept, authok   -> gss
 .           .            require      direct         connect, gssaccept, authok   -> gss
 
-# sslnegotiation=direct is not acccepted unless sslmode=require or stronger
+# sslnegotiation=direct is not accepted unless sslmode=require or stronger
 *           *            disable      direct         -     -> fail
 *           *            allow        direct         -     -> fail
 *           *            prefer       direct         -     -> fail
-- 
2.45.2

Attachment: signature.asc
Description: PGP signature

Reply via email to