postgres.git / summary / log / commit / refs
commit be00f041a331d5e6a49f21f139c9518542bdf9b3
Author: Michael Paquier <michael@paquier.xyz>
Date: Thu Sep 17 07:50:31 2026 +0000
Fix typos and grammar of some comments
These errors have been reported to the mailing lists in the last few
weeks. Some of the spots fixed have been noticed by myself during
independent code reviews, but not all.
contrib/amcheck/verify_heapam.c | 4 ++--
src/backend/access/common/toast_internals.c | 6 +++---
src/backend/access/index/genam.c | 2 +-
src/backend/replication/logical/logicalctl.c | 12 ++++++------
src/bin/pg_ctl/t/001_start_stop.pl | 2 +-
src/include/mb/pg_wchar.h | 2 +-
src/include/utils/rel.h | 2 +-
src/include/varatt.h | 2 +-
src/port/path.c | 2 +-
.../modules/test_extensible/expected/test_extensible.out | 2 +-
src/test/modules/test_extensible/sql/test_extensible.sql | 2 +-
11 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c
index 27648894831..7be2422f8ce 100644
--- a/contrib/amcheck/verify_heapam.c
+++ b/contrib/amcheck/verify_heapam.c
@@ -1891,8 +1891,8 @@ check_toasted_attribute(HeapCheckContext *ctx, ToastedAttribute *ta)
/*
* Take the chunk_id type from the TOAST table's own definition, not from
- * from the vartag in the main table as that pointer is the very thing
- * under scrutiny here. The two must agree.
+ * the vartag in the main table as that pointer is the very thing under
+ * scrutiny here. The two must agree.
*/
toast_typid = TupleDescAttr(ctx->toast_rel->rd_att, 0)->atttypid;
if (toast_typid == OID8OID)
diff --git a/src/backend/access/common/toast_internals.c b/src/backend/access/common/toast_internals.c
index a4e8a096254..b0bfc1bfc9c 100644
--- a/src/backend/access/common/toast_internals.c
+++ b/src/backend/access/common/toast_internals.c
@@ -454,9 +454,9 @@ toast_delete_datum(Relation rel, Datum value, bool is_speculative)
return;
/*
- * Decode the pointer to get the toast relation OID and value ID. The
- * vartag tells us everything we need - no TOAST table schema lookup
- * required.
+ * Decode the pointer to get the toast relation OID and value ID. The
+ * vartag tells us everything we need; no lookup of the TOAST table
+ * definition lookup is required.
*/
toast_external_info_get(attr, &toast_ext_data);
diff --git a/src/backend/access/index/genam.c b/src/backend/access/index/genam.c
index c4bb251bf83..98ac5bc79c9 100644
--- a/src/backend/access/index/genam.c
+++ b/src/backend/access/index/genam.c
@@ -655,7 +655,7 @@ systable_endscan(SysScanDesc sysscan)
* Currently we do not support non-index-based scans here. (In principle
* we could do a heapscan and sort, but the uses are in places that
* probably don't need to still work with corrupted catalog indexes.)
- * For the moment, therefore, these functions are merely the thinest of
+ * For the moment, therefore, these functions are merely the thinnest of
* wrappers around index_beginscan/table_index_getnext_slot. The main reason
* for their existence is to centralize possible future support of lossy
* operators in catalog scans.
diff --git a/src/backend/replication/logical/logicalctl.c b/src/backend/replication/logical/logicalctl.c
index e5340880fa7..642d965bd1c 100644
--- a/src/backend/replication/logical/logicalctl.c
+++ b/src/backend/replication/logical/logicalctl.c
@@ -28,7 +28,7 @@
* Asynchronous deactivation also avoids excessive toggling of the logical
* decoding status in workloads that repeatedly create and drop a single
* logical slot. On the other hand, this lazy approach can delay changes
- * to effective_wal_level and the disabling logical decoding, especially
+ * to effective_wal_level and the disabling of logical decoding, especially
* when the checkpointer is busy with other tasks. We chose this lazy approach
* in all deactivation paths to keep the implementation simple, even though
* laziness is strictly required only for end-of-recovery cases. Future work
@@ -325,7 +325,7 @@ EnsureLogicalDecodingEnabled(void)
}
/*
- * Ensure to abort the activation process in cases where there in an
+ * Ensure to abort the activation process in cases where there is an
* interruption during the wait.
*/
PG_ENSURE_ERROR_CLEANUP(abort_logical_decoding_activation, (Datum) 0);
@@ -354,9 +354,9 @@ EnableLogicalDecoding(void)
}
/*
- * Set logical info WAL logging in shmem. All process starts after this
- * point will include the information required by logical decoding to WAL
- * records.
+ * Set logical info WAL logging in shmem. All processes starting after
+ * this point will include the information required by logical decoding in
+ * WAL records.
*/
LogicalDecodingCtl->xlog_logical_info = true;
@@ -382,7 +382,7 @@ EnableLogicalDecoding(void)
* to decode the transaction during the logical decoding initialization.
*
* There is a theoretical case where a transaction decides whether to
- * include logical-info to WAL records before getting an XID. In this
+ * include logical-info in WAL records before getting an XID. In this
* case, the transaction won't appear in xl_running_xacts.
*
* For operations that do not require an XID assignment, the process
diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl
index a189b379f55..38634fd26ce 100644
--- a/src/bin/pg_ctl/t/001_start_stop.pl
+++ b/src/bin/pg_ctl/t/001_start_stop.pl
@@ -55,7 +55,7 @@ command_like($ctlcmd, qr/done.*server started/s, 'pg_ctl start');
# sleep here is because Windows builds can't check postmaster.pid exactly,
# so they may mistake a pre-existing postmaster.pid for one created by the
# postmaster they start. Waiting more than the 2 seconds slop time allowed
-# by wait_for_postmaster() prevents that mistake.
+# by wait_for_postmaster_start() prevents that mistake.
sleep 3 if ($windows_os);
command_fails([ 'pg_ctl', 'start', '--pgdata' => "$tempdir/data" ],
'second pg_ctl start fails');
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index deee2a832c3..9f0e4223748 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -110,7 +110,7 @@ typedef enum pg_enc
PG_KOI8U, /* KOI8-U */
/* PG_ENCODING_BE_LAST points to the above entry */
- /* followings are for client encoding only */
+ /* The following are for client encoding only */
PG_SJIS, /* Shift JIS (Windows-932) */
PG_BIG5, /* Big5 (Windows-950) */
PG_GBK, /* GBK (Windows-936) */
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 9c8d17337b8..7b8c2b1e362 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -255,7 +255,7 @@ typedef struct RelationData
* OIDOID or OID8OID.
*
* This data is filled on demand by RelationGetToastChunkIdType(), not at
- * relcache build time, so as to save in syscache lookups.
+ * relcache build time, so as to save on syscache lookups.
*/
Oid rd_toastchunkidtype;
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 77041f7673a..85d62834295 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -554,7 +554,7 @@ VARDATA_COMPRESSED_GET_COMPRESS_METHOD(const void *PTR)
}
/*
- * Same for external Datums, saved into an va_extinfo.
+ * Same for external Datums, saved into a va_extinfo.
*/
static inline Size
VARATT_EXTINFO_GET_EXTSIZE(uint32 extinfo)
diff --git a/src/port/path.c b/src/port/path.c
index fef0ae77f87..3938ff33af3 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -408,7 +408,7 @@ canonicalize_path_enc(char *path, int encoding)
*
* This loop overwrites the path in-place. This is safe since we'll never
* make the path longer. "unparse" points to where we are reading the
- * path, "parse" to where we are writing.
+ * path, "parsed" to where we are writing.
*/
spath = skip_drive(path);
if (*spath == '\0')
diff --git a/src/test/modules/test_extensible/expected/test_extensible.out b/src/test/modules/test_extensible/expected/test_extensible.out
index acc0a1af7fa..9f84e2a3724 100644
--- a/src/test/modules/test_extensible/expected/test_extensible.out
+++ b/src/test/modules/test_extensible/expected/test_extensible.out
@@ -155,7 +155,7 @@ SELECT id, val FROM test_extensible_tbl ORDER BY id;
(9 rows)
RESET test_extensible.repeat_count;
--- TABLESAMPLE is uses a core scan
+-- TABLESAMPLE uses a core scan
EXPLAIN (COSTS OFF) SELECT id FROM test_extensible_tbl TABLESAMPLE SYSTEM (0);
QUERY PLAN
------------------------------------
diff --git a/src/test/modules/test_extensible/sql/test_extensible.sql b/src/test/modules/test_extensible/sql/test_extensible.sql
index 72eb3cf82af..5282c9b812d 100644
--- a/src/test/modules/test_extensible/sql/test_extensible.sql
+++ b/src/test/modules/test_extensible/sql/test_extensible.sql
@@ -55,7 +55,7 @@ SET test_extensible.repeat_count = 3;
SELECT id, val FROM test_extensible_tbl ORDER BY id;
RESET test_extensible.repeat_count;
--- TABLESAMPLE is uses a core scan
+-- TABLESAMPLE uses a core scan
EXPLAIN (COSTS OFF) SELECT id FROM test_extensible_tbl TABLESAMPLE SYSTEM (0);
SELECT count(*) FROM test_extensible_tbl TABLESAMPLE SYSTEM (0);