From 462fe0ff6215ae222fc866af621e4b86462289b1 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 24 Feb 2026 13:26:37 +0900 Subject: [PATCH] Fix variety of typos and grammar mistakes This commit includes a batch of fixes for various minor typos and grammar mistakes, that have been proposed to the hackers mailing list since the beginning of January. Similar batches are planned on a bi-monthly basis depending on the amount received, with the next one for the end of April. --- contrib/amcheck/verify_nbtree.c | 2 +- src/backend/access/brin/brin_minmax_multi.c | 2 +- src/backend/access/gist/gistget.c | 4 ++-- src/backend/access/transam/multixact.c | 2 +- src/backend/access/transam/xlogrecovery.c | 6 +++--- src/backend/backup/basebackup_copy.c | 2 +- src/backend/commands/extension.c | 2 +- src/backend/statistics/extended_stats_funcs.c | 2 +- src/backend/storage/smgr/smgr.c | 2 +- src/bin/pg_basebackup/pg_receivewal.c | 2 +- src/bin/pg_resetwal/pg_resetwal.c | 2 +- src/fe_utils/astreamer_zstd.c | 2 +- src/include/nodes/parsenodes.h | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c index 34433e819d4..e04b7ca694e 100644 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@ -864,7 +864,7 @@ heap_entry_is_visible(BtreeCheckState *state, ItemPointer tid) } /* - * Prepare an error message for unique constrain violation in + * Prepare an error message for unique constraint violation in * a btree index and report ERROR. */ static void diff --git a/src/backend/access/brin/brin_minmax_multi.c b/src/backend/access/brin/brin_minmax_multi.c index b58de134782..1434c1f938a 100644 --- a/src/backend/access/brin/brin_minmax_multi.c +++ b/src/backend/access/brin/brin_minmax_multi.c @@ -712,7 +712,7 @@ brin_range_serialize(Ranges *range) /* * brin_range_deserialize - * Serialize the in-memory representation into a compact varlena value. + * Deserialize a compact varlena value into the in-memory representation. * * Simply copy the header and then also the individual values, as stored * in the in-memory value array. diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index 11b214eb99b..b64ccf5e912 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -402,8 +402,8 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem, /* * We save the LSN of the page as we read it, so that we know whether it - * safe to apply LP_DEAD hints to the page later. This allows us to drop - * the pin for MVCC scans, which allows vacuum to avoid blocking. + * is safe to apply LP_DEAD hints to the page later. This allows us to + * drop the pin for MVCC scans, which allows vacuum to avoid blocking. */ so->curPageLSN = BufferGetLSNAtomic(buffer); diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 9585ffd80f2..90ec87d9dd6 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -782,7 +782,7 @@ RecordNewMultiXact(MultiXactId multi, MultiXactOffset offset, /* * Set the starting offset of this multixid's members. * - * In the common case, it was already be set by the previous + * In the common case, it was already set by the previous * RecordNewMultiXact call, as this was the next multixid of the previous * multixid. But if multiple backends are generating multixids * concurrently, we might race ahead and get called before the previous diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c index 38387a52291..ecd66fd86a4 100644 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@ -3577,9 +3577,9 @@ next_record_is_invalid: * timelines, we can reject a switch to a timeline that branched off before * this point. * - * If the record is not immediately available, the function returns false - * if we're not in standby mode. In standby mode, waits for it to become - * available. + * If the record is not immediately available, the function returns XLREAD_FAIL + * if we're not in standby mode. In standby mode, the function waits for it to + * become available. * * When the requested record becomes available, the function opens the file * containing it (if not open already), and returns XLREAD_SUCCESS. When end diff --git a/src/backend/backup/basebackup_copy.c b/src/backend/backup/basebackup_copy.c index fecfad9ab7b..07f58b39d8c 100644 --- a/src/backend/backup/basebackup_copy.c +++ b/src/backend/backup/basebackup_copy.c @@ -66,7 +66,7 @@ typedef struct bbsink_copystream * frequently. Ideally, we'd like to send a message when the time since the * last message reaches PROGRESS_REPORT_MILLISECOND_THRESHOLD, but checking * the system time every time we send a tiny bit of data seems too expensive. - * So we only check it after the number of bytes sine the last check reaches + * So we only check it after the number of bytes since the last check reaches * PROGRESS_REPORT_BYTE_INTERVAL. */ #define PROGRESS_REPORT_BYTE_INTERVAL 65536 diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 574858bfeca..963618a64c4 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -2528,7 +2528,7 @@ pg_available_extension_versions(PG_FUNCTION_ARGS) /* * Ignore already-found names. They are not reachable by the - * path search, so don't shown them. + * path search, so don't show them. */ extname_str = makeString(extname); if (list_member(found_ext, extname_str)) diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c index 479f74652be..b7f0dd731c2 100644 --- a/src/backend/statistics/extended_stats_funcs.c +++ b/src/backend/statistics/extended_stats_funcs.c @@ -769,7 +769,7 @@ delete_pg_statistic_ext_data(Oid stxoid, bool inherited) HeapTuple oldtup; bool result = false; - /* Is there already a pg_statistic tuple for this attribute? */ + /* Is there already a pg_statistic_ext_data tuple for this attribute? */ oldtup = SearchSysCache2(STATEXTDATASTXOID, ObjectIdGetDatum(stxoid), BoolGetDatum(inherited)); diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 378c2a03f39..5391640d861 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -898,7 +898,7 @@ smgrtruncate(SMgrRelation reln, ForkNumber *forknum, int nforks, /* Do the truncation */ for (i = 0; i < nforks; i++) { - /* Make the cached size is invalid if we encounter an error. */ + /* Make the cached size invalid if we encounter an error. */ reln->smgr_cached_nblocks[forknum[i]] = InvalidBlockNumber; smgrsw[reln->smgr_which].smgr_truncate(reln, forknum[i], diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 4f9a7b076ca..ddfec298fb7 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -770,7 +770,7 @@ main(int argc, char **argv) if (replication_slot == NULL && (do_drop_slot || do_create_slot)) { - /* translator: second %s is an option name */ + /* translator: %s is an option name */ pg_log_error("%s needs a slot to be specified using --slot", do_drop_slot ? "--drop-slot" : "--create-slot"); pg_log_error_hint("Try \"%s --help\" for more information.", progname); diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 85dc43d4cdb..ab766c34d4b 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -188,7 +188,7 @@ main(int argc, char *argv[]) if (endptr == optarg || *endptr != '\0' || errno != 0) { /*------ - translator: the second %s is a command line argument (-e, etc) */ + translator: %s is a command line argument (-e, etc) */ pg_log_error("invalid argument for option %s", "-e"); pg_log_error_hint("Try \"%s --help\" for more information.", progname); exit(1); diff --git a/src/fe_utils/astreamer_zstd.c b/src/fe_utils/astreamer_zstd.c index 885a5608be7..2bf5c57b902 100644 --- a/src/fe_utils/astreamer_zstd.c +++ b/src/fe_utils/astreamer_zstd.c @@ -3,7 +3,7 @@ * astreamer_zstd.c * * Archive streamers that deal with data compressed using zstd. - * astreamer_zstd_compressor applies lz4 compression to the input stream, + * astreamer_zstd_compressor applies zstd compression to the input stream, * and astreamer_zstd_decompressor does the reverse. * * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 0aec49bdd22..f37131835be 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -2665,7 +2665,7 @@ typedef struct AccessPriv * Note: because of the parsing ambiguity with the GRANT * statement, granted_roles is a list of AccessPriv; the execution code * should complain if any column lists appear. grantee_roles is a list - * of role names, as String values. + * of role names, as RoleSpec values. * ---------------------- */ typedef struct GrantRoleStmt -- 2.47.3