Fix typos and inconsistencies for v16
Hello hackers,
Please consider fixing the following unique words/identifiers introduced in v16:
1. addresess -> addresses
2. adminstrator -> administrator // the same typo found in src/backend/po/id.po, but perhaps it should be fixed via
pgsql-translators
3. appeneded -> appended
4. appliciable -> applicable
5. BackroundPsql -> BackgroundPsql
6. binaies -> binaries
7. compresion -> compression
8. containsthe -> contains the
9. contextes -> contexts
10. deparseAnalyzeTuplesSql -> deparseAnalyzeInfoSql // that function was renamed in 57d11ef0
11. DO_LARGE_OJECT_DATA -> DO_LARGE_OBJECT_DATA
12. doesnt't -> doesn't
13. dst_perminfo -> dst_perminfos
14. eror -> error
15. execpt -> except
16. forech -> foreach
17. GetResultRelCheckAsUser -> ExecGetResultRelCheckAsUser
18. GUCS -> GUCs
19. happend -> happened
20. immitated -> imitated
21. insert_xid -> tuple_xid // see bfcf1b348
22. ldap_add -> ldapadd_file
23. ldapbindpassw -> ldapbindpasswd
24. MemoryChunkSetExternal -> MemoryChunkSetHdrMaskExternal
25. non-encyrpted -> non-encrypted
26. --no-process_main -> --no-process-main
27. optionn -> option
28. Othewise -> Otherwise
29. parellel -> parallel
30. permissons -> permissions
31. pg_pwrite_zeroes -> pg_pwrite_zeros
32. pg_writev -> pg_pwritev
33. possbile -> possible
34. pqsymlink -> pgsymlink
35. PG_GET_WAL_FPI_BLOCK_COLS -> PG_GET_WAL_BLOCK_INFO_COLS
36. RangeVarCallbackOwnsTable -> RangeVarCallbackMaintainsTable // see 60684dd83
37. remaing -> remaining
38. ResourceOwnerForgetBufferIOs -> ResourceOwnerForgetBufferIO
39. RMGRDESC_UTILS_H -> RMGRDESC_UTILS_H_ // or may be the other way
40. rolenamehash -> rolename_hash
41. ROLERECURSE_SETROLe -> ROLERECURSE_SETROLE
42. sentinal -> sentinel
43. smgzerorextend -> smgrzeroextend
44. stacktoodeep -> rstacktoodeep // an excessive character was deleted with db4f21e4a?
45. tar_set_error -- remove (obsolete since ebfb814f7)
46. test_tranche_name -- remove (not used, see 006b69fd9)
47. varilables -> variables
48. xid_commit_status -> xmin_commit_status
Also, maybe OID_MAX should be removed from src/include/postgres_ext.h as it's unused since eb8312a22.
Beside that, this simple script:
for w in $(cat src/tools/pgindent/typedefs.list); do grep -q -P "\b$w\b" -r * --exclude typedefs.list || echo "$w"; done
detects 58 identifiers that don't exist in the source tree anymore (see typedefs.lost attached).
Maybe they should be removed from typedefs.list too.
Best regards,
Alexander
Attachments:
typo-fixes-for-v16.1-10.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v16.1-10.patchDownload
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index d728bd70b3..95dbe8b06c 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -5016,7 +5016,7 @@ postgresGetAnalyzeInfoForForeignTable(Relation relation, bool *can_tablesample)
pgfdw_report_error(ERROR, res, conn, false, sql.data);
if (PQntuples(res) != 1 || PQnfields(res) != 2)
- elog(ERROR, "unexpected result from deparseAnalyzeTuplesSql query");
+ elog(ERROR, "unexpected result from deparseAnalyzeInfoSql query");
reltuples = strtod(PQgetvalue(res, 0, 0), NULL);
relkind = *(PQgetvalue(res, 0, 1));
}
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 7d3b20168a..f6c0c5ca1a 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -6272,7 +6272,7 @@ ProcessGUCArray(ArrayType *array, ArrayType *usersetArray,
userSetDatum = BoolGetDatum(false);
/*
- * USER SET values are appliciable only for PGC_USERSET parameters. We
+ * USER SET values are applicable only for PGC_USERSET parameters. We
* use InvalidOid as role in order to evade possible privileges of the
* current user.
*/
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 3894a017f3..104c01d966 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -87,7 +87,7 @@ static size_t ps_buffer_cur_len; /* nominal strlen(ps_buffer) */
static size_t ps_buffer_fixed_size; /* size of the constant prefix */
/*
- * Length of ps_buffer before the suffix was appeneded to the end, or 0 if we
+ * Length of ps_buffer before the suffix was appended to the end, or 0 if we
* didn't set a suffix.
*/
static size_t ps_buffer_nosuffix_len;
diff --git a/src/bin/pg_dump/compress_lz4.c b/src/bin/pg_dump/compress_lz4.c
index 5aca9c1f06..423e1b7976 100644
--- a/src/bin/pg_dump/compress_lz4.c
+++ b/src/bin/pg_dump/compress_lz4.c
@@ -342,7 +342,7 @@ LZ4Stream_get_error(CompressFileHandle *CFH)
/*
* Initialize an already alloc'ed LZ4State struct for subsequent calls.
*
- * Creates the necessary contexts for either compresion or decompression. When
+ * Creates the necessary contexts for either compression or decompression. When
* compressing data (indicated by compressing=true), it additionally writes the
* LZ4 header in the output stream.
*
diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h
index 395abfe596..656a2e9897 100644
--- a/src/include/utils/tuplesort.h
+++ b/src/include/utils/tuplesort.h
@@ -146,7 +146,7 @@ typedef int (*SortTupleComparator) (const SortTuple *a, const SortTuple *b,
/*
* The public part of a Tuple sort operation state. This data structure
- * containsthe definition of sort-variant-specific interface methods and
+ * contains the definition of sort-variant-specific interface methods and
* the part of Tuple sort operation state required by their implementations.
*/
typedef struct
@@ -189,7 +189,7 @@ typedef struct
* Function to do some specific release of resources for the sort variant.
* In particular, this function should free everything stored in the "arg"
* field, which wouldn't be cleared on reset of the Tuple sort memory
- * contextes. This can be NULL if nothing specific needs to be done.
+ * contexts. This can be NULL if nothing specific needs to be done.
*/
void (*freestate) (Tuplesortstate *state);
diff --git a/src/interfaces/libpq/t/004_load_balance_dns.pl b/src/interfaces/libpq/t/004_load_balance_dns.pl
index f914916dd2..8347eea161 100644
--- a/src/interfaces/libpq/t/004_load_balance_dns.pl
+++ b/src/interfaces/libpq/t/004_load_balance_dns.pl
@@ -16,7 +16,7 @@ if ($ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
# for different IPs. Since setting up a DNS server is more effort than we
# consider reasonable to run this test, this situation is instead immitated by
# using a hosts file where a single hostname maps to multiple different IP
-# addresses. This test requires the adminstrator to add the following lines to
+# addresses. This test requires the administrator to add the following lines to
# the hosts file (if we detect that this hasn't happend we skip the test):
#
# 127.0.0.1 pg-loadbalancetest
@@ -24,7 +24,7 @@ if ($ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
# 127.0.0.3 pg-loadbalancetest
#
# Windows or Linux are required to run this test because these OSes allow
-# binding to 127.0.0.2 and 127.0.0.3 addresess by default, but other OSes
+# binding to 127.0.0.2 and 127.0.0.3 addresses by default, but other OSes
# don't. We need to bind to different IP addresses, so that we can use these
# different IP addresses in the hosts file.
#
diff --git a/src/test/ldap/LdapServer.pm b/src/test/ldap/LdapServer.pm
index 8c69f660f5..f46271af60 100644
--- a/src/test/ldap/LdapServer.pm
+++ b/src/test/ldap/LdapServer.pm
@@ -19,7 +19,7 @@ LdapServer - class for an LDAP server for testing pg_hba.conf authentication
use LdapServer;
- # have we found openldap binaies suitable for setting up a server?
+ # have we found openldap binaries suitable for setting up a server?
my $ldap_binaries_found = $LdapServer::setup;
# create a server with the given root password and auth type
diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
index d767e284a2..60fc9416f9 100644
--- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
+++ b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
@@ -68,7 +68,7 @@ use Test::More;
=over
-=item PostgreSQL::Test::BackroundPsql->new(interactive, @params)
+=item PostgreSQL::Test::BackgroundPsql->new(interactive, @params)
Builds a new object of class C<PostgreSQL::Test::BackgroundPsql> for either
an interactive or background session and starts it. If C<interactive> is
typo-fixes-for-v16.11-20.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v16.11-20.patchDownload
diff --git a/meson.build b/meson.build
index 3405cc07ee..65f7c88dba 100644
--- a/meson.build
+++ b/meson.build
@@ -2963,7 +2963,7 @@ endif
# generation happens during install, so that's not a real issue.
nls_mo_targets = []
if libintl.found() and meson.version().version_compare('>=0.60')
- # use range() to avoid the flattening of the list that forech() would do
+ # use range() to avoid the flattening of the list that foreach() would do
foreach off : range(0, nls_targets.length())
# i18n.gettext() list containing 1) list of built .mo files 2) maintainer
# -pot target 3) maintainer -pot target
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index 5ce8a0831b..872cbd454d 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -1403,7 +1403,7 @@ GetResultRTEPermissionInfo(ResultRelInfo *relinfo, EState *estate)
}
/*
- * GetResultRelCheckAsUser
+ * ExecGetResultRelCheckAsUser
* Returns the user to modify passed-in result relation as
*
* The user is chosen by looking up the relation's or, if a child table, its
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 3a67389508..5b596f1e7a 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -904,7 +904,7 @@ ExecInsert(ModifyTableContext *context,
* If these are the first tuples stored in the buffers, add the
* target rel and the mtstate to the
* es_insert_pending_result_relations and
- * es_insert_pending_modifytables lists respectively, execpt in
+ * es_insert_pending_modifytables lists respectively, except in
* the case where flushing was done above, in which case they
* would already have been added to the lists, so no need to do
* this.
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c
index d28d0da621..52b3f77078 100644
--- a/src/backend/rewrite/rewriteManip.c
+++ b/src/backend/rewrite/rewriteManip.c
@@ -343,7 +343,7 @@ contains_multiexpr_param(Node *node, void *context)
* the RTEs in 'src_rtable' to now point to the perminfos' indexes in
* *dst_perminfos.
*
- * Note that this changes both 'dst_rtable' and 'dst_perminfo' destructively,
+ * Note that this changes both 'dst_rtable' and 'dst_perminfos' destructively,
* so the caller should have better passed safe-to-modify copies.
*/
void
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 8f7522d103..45dc2273b7 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -5020,7 +5020,7 @@ member_can_set_role(Oid member, Oid role)
}
/*
- * Permission violation eror unless able to SET ROLE to target role.
+ * Permission violation error unless able to SET ROLE to target role.
*/
void
check_can_set_role(Oid member, Oid role)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index f6c0c5ca1a..6df9121a17 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1387,7 +1387,7 @@ check_GUC_name_for_parameter_acl(const char *name)
*
* This performs two sanity checks. First, it checks that the initial
* value of a GUC is the same when declared and when loaded to prevent
- * anybody looking at the C declarations of these GUCS from being fooled by
+ * anybody looking at the C declarations of these GUCs from being fooled by
* mismatched values. Second, it checks for incorrect flag combinations.
*
* The following validation rules apply for the values:
diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c
index 8266c117a3..745578d855 100644
--- a/src/bin/pg_dump/pg_dump_sort.c
+++ b/src/bin/pg_dump/pg_dump_sort.c
@@ -137,7 +137,7 @@ static const int dbObjectTypePriority[] =
PRIO_DEFAULT_ACL, /* DO_DEFAULT_ACL */
PRIO_TRANSFORM, /* DO_TRANSFORM */
PRIO_LARGE_OBJECT, /* DO_LARGE_OBJECT */
- PRIO_LARGE_OBJECT_DATA, /* DO_LARGE_OJECT_DATA */
+ PRIO_LARGE_OBJECT_DATA, /* DO_LARGE_OBJECT_DATA */
PRIO_PRE_DATA_BOUNDARY, /* DO_PRE_DATA_BOUNDARY */
PRIO_POST_DATA_BOUNDARY, /* DO_POST_DATA_BOUNDARY */
PRIO_EVENT_TRIGGER, /* DO_EVENT_TRIGGER */
diff --git a/src/interfaces/libpq/t/004_load_balance_dns.pl b/src/interfaces/libpq/t/004_load_balance_dns.pl
index 8347eea161..d9b382dba9 100644
--- a/src/interfaces/libpq/t/004_load_balance_dns.pl
+++ b/src/interfaces/libpq/t/004_load_balance_dns.pl
@@ -14,10 +14,10 @@ if ($ENV{PG_TEST_EXTRA} !~ /\bload_balance\b/)
# This tests loadbalancing based on a DNS entry that contains multiple records
# for different IPs. Since setting up a DNS server is more effort than we
-# consider reasonable to run this test, this situation is instead immitated by
+# consider reasonable to run this test, this situation is instead imitated by
# using a hosts file where a single hostname maps to multiple different IP
# addresses. This test requires the administrator to add the following lines to
-# the hosts file (if we detect that this hasn't happend we skip the test):
+# the hosts file (if we detect that this hasn't happened we skip the test):
#
# 127.0.0.1 pg-loadbalancetest
# 127.0.0.2 pg-loadbalancetest
diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
index 60fc9416f9..a9c102949f 100644
--- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
+++ b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
@@ -201,7 +201,7 @@ sub query
$self->{timeout}->start() if (defined($self->{query_timer_restart}));
# Feed the query to psql's stdin, followed by \n (so psql processes the
- # line), by a ; (so that psql issues the query, if it doesnt't include a ;
+ # line), by a ; (so that psql issues the query, if it doesn't include a ;
# itself), and a separator echoed with \echo, that we can wait on.
my $banner = "background_psql: QUERY_SEPARATOR";
$self->{stdin} .= "$query\n;\n\\echo $banner\n";
typo-fixes-for-v16.21-30.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v16.21-30.patchDownload
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 75d93d6ead..da32d503bc 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -1686,7 +1686,7 @@ pgfdw_abort_cleanup(ConnCacheEntry *entry, bool toplevel)
*
* Returns true if the abort command or cancel request is successfully issued,
* false otherwise. If the abort command is successfully issued, the given
- * connection cache entry is appended to *pending_entries. Othewise, if the
+ * connection cache entry is appended to *pending_entries. Otherwise, if the
* cancel request is successfully issued, it is appended to *cancel_requested.
*/
static bool
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 23461b46f6..203b189559 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -164,7 +164,7 @@
* PredicateLockPage(Relation relation, BlockNumber blkno,
* Snapshot snapshot)
* PredicateLockTID(Relation relation, ItemPointer tid, Snapshot snapshot,
- * TransactionId insert_xid)
+ * TransactionId tuple_xid)
* PredicateLockPageSplit(Relation relation, BlockNumber oldblkno,
* BlockNumber newblkno)
* PredicateLockPageCombine(Relation relation, BlockNumber oldblkno,
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 6df9121a17..9dd624b3ae 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -6365,8 +6365,8 @@ GUCArrayAdd(ArrayType *array, ArrayType **usersetArray,
}
/*
- * Recheck permissons if we found an option without USER SET
- * flag while we're setting an optionn with USER SET flag.
+ * Recheck permissions if we found an option without USER SET
+ * flag while we're setting an option with USER SET flag.
*/
if (!currentUserSet && user_set)
(void) validate_option_array_item(name, value,
diff --git a/src/bin/scripts/t/100_vacuumdb.pl b/src/bin/scripts/t/100_vacuumdb.pl
index 46101899ae..4788c313a7 100644
--- a/src/bin/scripts/t/100_vacuumdb.pl
+++ b/src/bin/scripts/t/100_vacuumdb.pl
@@ -71,7 +71,7 @@ $node->issues_sql_like(
'vacuumdb --no-process-main');
$node->command_fails(
[ 'vacuumdb', '--analyze-only', '--no-process-main', 'postgres' ],
- '--analyze-only and --no-process_main specified together');
+ '--analyze-only and --no-process-main specified together');
$node->issues_sql_like(
[ 'vacuumdb', '--no-process-toast', 'postgres' ],
qr/statement: VACUUM \(PROCESS_TOAST FALSE, SKIP_DATABASE_STATS\).*;/,
diff --git a/src/include/utils/memutils_memorychunk.h b/src/include/utils/memutils_memorychunk.h
index 2439ba4e96..ffa91131c8 100644
--- a/src/include/utils/memutils_memorychunk.h
+++ b/src/include/utils/memutils_memorychunk.h
@@ -37,8 +37,8 @@
* In some cases, for example when memory allocations become large, it's
* possible fields 3 and 4 above are not large enough to store the values
* required for the chunk. In this case, the MemoryContext can choose to mark
- * the chunk as "external" by calling the MemoryChunkSetExternal() function.
- * When this is done, fields 3 and 4 are unavailable for use by the
+ * the chunk as "external" by calling the MemoryChunkSetHdrMaskExternal()
+ * function. When this is done, fields 3 and 4 are unavailable for use by the
* MemoryContext and it's up to the MemoryContext itself to devise its own
* method for getting the reference to the block.
*
diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index bf12752529..a5b79a1982 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -413,7 +413,7 @@ test_query(
$node->connect_ok(
$node->connstr('postgres')
. " user=test1 host=$host hostaddr=$hostaddr gssencmode=disable require_auth=gss",
- "GSS authentication requested, works with non-encyrpted GSS");
+ "GSS authentication requested, works with non-encrypted GSS");
$node->connect_ok(
$node->connstr('postgres')
. " user=test1 host=$host hostaddr=$hostaddr gssencmode=require require_auth=gss",
diff --git a/src/test/ldap/LdapServer.pm b/src/test/ldap/LdapServer.pm
index f46271af60..3cc05b8255 100644
--- a/src/test/ldap/LdapServer.pm
+++ b/src/test/ldap/LdapServer.pm
@@ -254,7 +254,7 @@ sub _ldapenv
=over
-=item ldap_add(filename)
+=item ldapadd_file(filename)
filename is the path to a file containing LDIF data which is added to the LDAP
server.
diff --git a/src/test/modules/ldap_password_func/meson.build b/src/test/modules/ldap_password_func/meson.build
index 653a5e9479..63dc852bf3 100644
--- a/src/test/modules/ldap_password_func/meson.build
+++ b/src/test/modules/ldap_password_func/meson.build
@@ -9,7 +9,7 @@ ldap_password_func_sources = files(
if host_system == 'windows'
ldap_password_func_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
'--NAME', 'ldap_password_func',
- '--FILEDESC', 'set hook to mutate ldapbindpassw',])
+ '--FILEDESC', 'set hook to mutate ldapbindpasswd',])
endif
ldap_password_func = shared_module('ldap_password_func',
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index f7bcb30ca4..48008fa8c3 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -276,7 +276,7 @@ test_status_print(bool ok, const char *testname, double runtime, bool parallel)
* Testnumbers are padded to 5 characters to ensure that testnames align
* vertically (assuming at most 9999 tests). Testnames are prefixed with
* a leading character to indicate being run in parallel or not. A leading
- * '+' indicates a parellel test, '-' indicates a single test.
+ * '+' indicates a parallel test, '-' indicates a single test.
*/
emit_tap_output(TEST_STATUS, "%sok %-5i%*s %c %-*s %8.0f ms",
(ok ? "" : "not "),
typo-fixes-for-v16.31-40.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v16.31-40.patchDownload
diff --git a/contrib/pg_walinspect/pg_walinspect.c b/contrib/pg_walinspect/pg_walinspect.c
index e4dbf15e05..e6f18e1c64 100644
--- a/contrib/pg_walinspect/pg_walinspect.c
+++ b/contrib/pg_walinspect/pg_walinspect.c
@@ -401,7 +401,7 @@ GetWALBlockInfo(FunctionCallInfo fcinfo, XLogReaderState *record,
values, nulls);
}
-#undef PG_GET_WAL_FPI_BLOCK_COLS
+#undef PG_GET_WAL_BLOCK_INFO_COLS
}
/*
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index d9bbeafd82..ca1bb6d00d 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -17063,7 +17063,8 @@ RangeVarCallbackForTruncate(const RangeVar *relation,
/*
* Callback to RangeVarGetRelidExtended(), similar to
- * RangeVarCallbackOwnsTable() but without checks on the type of the relation.
+ * RangeVarCallbackMaintainsTable() but without checks on the type of the
+ * relation.
*/
void
RangeVarCallbackOwnsRelation(const RangeVar *relation,
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index f1316eb4ce..e982a8dd7f 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -597,7 +597,7 @@ mdzeroextend(SMgrRelation reln, ForkNumber forknum,
/*
* Even if we don't want to use fallocate, we can still extend a
* bit more efficiently than writing each 8kB block individually.
- * pg_pwrite_zeroes() (via FileZero()) uses
+ * pg_pwrite_zeros() (via FileZero()) uses
* pg_pwritev_with_retry() to avoid multiple writes or needing a
* zeroed buffer for the whole length of the extension.
*/
diff --git a/src/backend/utils/adt/array_userfuncs.c b/src/backend/utils/adt/array_userfuncs.c
index 33e2b98307..171fdc67bb 100644
--- a/src/backend/utils/adt/array_userfuncs.c
+++ b/src/backend/utils/adt/array_userfuncs.c
@@ -1043,7 +1043,7 @@ array_agg_array_combine(PG_FUNCTION_ARGS)
state1->nitems += state2->nitems;
state1->dims[0] += state2->dims[0];
- /* remaing dims already match, per test above */
+ /* remaining dims already match, per test above */
Assert(state1->array_type == state2->array_type);
Assert(state1->element_type == state2->element_type);
diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c
index 4357dd0870..7dec652106 100644
--- a/src/backend/utils/resowner/resowner.c
+++ b/src/backend/utils/resowner/resowner.c
@@ -521,7 +521,7 @@ ResourceOwnerReleaseInternal(ResourceOwner owner,
{
/*
* Abort failed buffer IO. AbortBufferIO()->TerminateBufferIO() calls
- * ResourceOwnerForgetBufferIOs(), so we just have to iterate till
+ * ResourceOwnerForgetBufferIO(), so we just have to iterate till
* there are none.
*
* Needs to be before we release buffer pins.
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index cd421c5944..7b7acc8044 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1923,7 +1923,7 @@ dumpTimestamp(const char *msg)
}
/*
- * Helper function for rolenamehash hash table.
+ * Helper function for rolename_hash hash table.
*/
static uint32
hash_string_pointer(char *s)
diff --git a/src/include/access/rmgrdesc_utils.h b/src/include/access/rmgrdesc_utils.h
index e09b112674..bd414699f2 100644
--- a/src/include/access/rmgrdesc_utils.h
+++ b/src/include/access/rmgrdesc_utils.h
@@ -63,4 +63,4 @@ extern void offset_elem_desc(StringInfo buf, void *offset, void *data);
extern void redirect_elem_desc(StringInfo buf, void *offset, void *data);
extern void oid_elem_desc(StringInfo buf, void *relid, void *data);
-#endif /* RMGRDESC_UTILS_H */
+#endif /* RMGRDESC_UTILS_H_ */
diff --git a/src/include/port/pg_iovec.h b/src/include/port/pg_iovec.h
index 2a0e2c0123..689799c425 100644
--- a/src/include/port/pg_iovec.h
+++ b/src/include/port/pg_iovec.h
@@ -36,7 +36,7 @@ struct iovec
#define PG_IOV_MAX Min(IOV_MAX, 32)
/*
- * Note that pg_preadv and pg_writev have a pg_ prefix as a warning that the
+ * Note that pg_preadv and pg_pwritev have a pg_ prefix as a warning that the
* Windows implementations have the side-effect of changing the file position.
*/
diff --git a/src/interfaces/libpq/fe-secure-gssapi.c b/src/interfaces/libpq/fe-secure-gssapi.c
index bf87ae3fd1..95ded9eeaa 100644
--- a/src/interfaces/libpq/fe-secure-gssapi.c
+++ b/src/interfaces/libpq/fe-secure-gssapi.c
@@ -624,7 +624,7 @@ pqsecure_open_gss(PGconn *conn)
if (conn->gssdeleg && pg_strcasecmp(conn->gssdeleg, "enable") == 0)
{
- /* Acquire credentials if possbile */
+ /* Acquire credentials if possible */
if (conn->gcred == GSS_C_NO_CREDENTIAL)
(void) pg_GSS_have_cred_cache(&conn->gcred);
diff --git a/src/port/dirmod.c b/src/port/dirmod.c
index bf7f06885e..6557cf8785 100644
--- a/src/port/dirmod.c
+++ b/src/port/dirmod.c
@@ -400,7 +400,7 @@ pgreadlink(const char *path, char *buf, size_t size)
* If the path starts with "\??\" followed by a "drive absolute" path
* (known to Windows APIs as RtlPathTypeDriveAbsolute), then strip that
* prefix. This undoes some of the transformation performed by
- * pqsymlink(), to get back to a format that users are used to seeing. We
+ * pgsymlink(), to get back to a format that users are used to seeing. We
* don't know how to transform other path types that might be encountered
* outside PGDATA, so we just return them directly.
*/
typo-fixes-for-v16.41-48.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v16.41-48.patchDownload
diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c
index f50ee9d29f..34d73ad442 100644
--- a/contrib/amcheck/verify_heapam.c
+++ b/contrib/amcheck/verify_heapam.c
@@ -1009,7 +1009,7 @@ check_tuple_header(HeapCheckContext *ctx)
* TOAST tuples -- are eligible for pruning.
*
* Sets *xmin_commit_status_ok to true if the commit status of xmin is known
- * and false otherwise. If it's set to true, then also set *xid_commit_status
+ * and false otherwise. If it's set to true, then also set *xmin_commit_status
* to the actual commit status.
*/
static bool
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 6efdefb591..5baea7535b 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -254,7 +254,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
total_checksum_failures = 0;
- /* Allocate backup related varilables. */
+ /* Allocate backup related variables. */
backup_state = (BackupState *) palloc0(sizeof(BackupState));
tablespace_map = makeStringInfo();
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index ee6244f9bc..1fa689052e 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2046,7 +2046,7 @@ ExtendBufferedRelShared(ExtendBufferedWhat eb,
io_start = pgstat_prepare_io_time();
/*
- * Note: if smgzerorextend fails, we will end up with buffers that are
+ * Note: if smgrzeroextend fails, we will end up with buffers that are
* allocated but not marked BM_VALID. The next relation extension will
* still select the same block number (because the relation didn't get any
* longer on disk) and so future attempts to extend the relation will find
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 45dc2273b7..c5a6babccc 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -4825,7 +4825,7 @@ RoleMembershipCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
* Get a list of roles that the specified roleid is a member of
*
* Type ROLERECURSE_MEMBERS recurses through all grants; ROLERECURSE_PRIVS
- * recurses only through inheritable grants; and ROLERECURSE_SETROLe recurses
+ * recurses only through inheritable grants; and ROLERECURSE_SETROLE recurses
* only through grants with set_option.
*
* Since indirect membership testing is relatively expensive, we cache
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 88f97ea246..42b90e4d4f 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -1382,7 +1382,7 @@ MemoryContextAllocAligned(MemoryContext context,
alloc_size = size + PallocAlignedExtraBytes(alignto);
#ifdef MEMORY_CONTEXT_CHECKING
- /* ensure there's space for a sentinal byte */
+ /* ensure there's space for a sentinel byte */
alloc_size += 1;
#endif
diff --git a/src/bin/pg_basebackup/nls.mk b/src/bin/pg_basebackup/nls.mk
index 8d28e249de..fc475003e8 100644
--- a/src/bin/pg_basebackup/nls.mk
+++ b/src/bin/pg_basebackup/nls.mk
@@ -18,5 +18,5 @@ GETTEXT_FILES = $(FRONTEND_COMMON_GETTEXT_FILES) \
../../common/file_utils.c \
../../fe_utils/option_utils.c \
../../fe_utils/recovery_gen.c
-GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt tar_set_error
+GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt
GETTEXT_FLAGS = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/include/regex/regcustom.h b/src/include/regex/regcustom.h
index bedee1e9ca..af0fe97c79 100644
--- a/src/include/regex/regcustom.h
+++ b/src/include/regex/regcustom.h
@@ -44,7 +44,7 @@
#include "mb/pg_wchar.h"
-#include "miscadmin.h" /* needed by stacktoodeep */
+#include "miscadmin.h" /* needed by rstacktoodeep */
/* overrides for regguts.h definitions, if any */
diff --git a/src/test/modules/test_slru/test_slru.c b/src/test/modules/test_slru/test_slru.c
index 622f43da04..ae21444c47 100644
--- a/src/test/modules/test_slru/test_slru.c
+++ b/src/test/modules/test_slru/test_slru.c
@@ -50,9 +50,6 @@ static SlruCtlData TestSlruCtlData;
static shmem_request_hook_type prev_shmem_request_hook = NULL;
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
-/* LWLock name */
-const char test_tranche_name[] = "test_slru_tranche";
-
static bool
test_slru_scan_cb(SlruCtl ctl, char *filename, int segpage, void *data)
{
On Mon, Apr 17, 2023 at 09:00:00PM +0300, Alexander Lakhin wrote:
Hello hackers,
Please consider fixing the following unique words/identifiers introduced in v16:
Well done.
Note that your patches are overlapping:
3 --- a/src/backend/utils/misc/guc.c
2 --- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
2 --- a/src/test/ldap/LdapServer.pm
2 --- a/src/interfaces/libpq/t/004_load_balance_dns.pl
2 --- a/src/backend/utils/adt/acl.c
It'd make sense if the changes to each file were isolated to a single
patch (especially 004_load and acl.c).
- * USER SET values are appliciable only for PGC_USERSET parameters. We + * USER SET values are applicable only for PGC_USERSET parameters. We * use InvalidOid as role in order to evade possible privileges of the
and s/evade/avoid/
+++ b/src/bin/pg_dump/pg_dumpall.c
You missed "boostrap" :)
I independently found 11 of the same typos you did:
1. addresess -> addresses
3. appeneded -> appended
4. appliciable -> applicable
8. containsthe -> �contains the
15. execpt -> except
19. happend -> happened
27. optionn -> option
30. permissons -> permissions
37. remaing -> remaining
42. sentinal -> sentinel
47. varilables -> variables
But hadn't yet convinced myself to start the process of defending each
one of the fixes. Attached some others that I found.
--
Justin
Attachments:
v5.txttext/plain; charset=us-asciiDownload
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index 9a28b5ddc5a..d55fb3a667f 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -428,7 +428,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
-- test whether a known, but not yet logged toplevel xact, followed by a
-- subxact commit is handled correctly
BEGIN;
-SELECT pg_current_xact_id() != '0'; -- so no fixed xid apears in the outfile
+SELECT pg_current_xact_id() != '0'; -- so no fixed xid appears in the outfile
?column?
----------
t
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 4f76bed72c1..57285a828c7 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -236,7 +236,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
-- test whether a known, but not yet logged toplevel xact, followed by a
-- subxact commit is handled correctly
BEGIN;
-SELECT pg_current_xact_id() != '0'; -- so no fixed xid apears in the outfile
+SELECT pg_current_xact_id() != '0'; -- so no fixed xid appears in the outfile
SAVEPOINT a;
INSERT INTO tr_sub(path) VALUES ('4-top-1-#1');
RELEASE SAVEPOINT a;
diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml
index b5e0392ad27..b6c37ccef26 100644
--- a/doc/src/sgml/user-manag.sgml
+++ b/doc/src/sgml/user-manag.sgml
@@ -346,7 +346,7 @@ ALTER ROLE myname SET enable_indexscan TO off;
role using <literal>SET ROLE</literal>. However, since any user who has
<literal>ADMIN OPTION</literal> on a role can grant membership in that
role to any other user, the <literal>CREATEROLE</literal> user can gain
- access to the created role by simplying granting that role back to
+ access to the created role by simply granting that role back to
themselves with the <literal>INHERIT</literal> and/or <literal>SET</literal>
options. Thus, the fact that privileges are not inherited by default nor
is <literal>SET ROLE</literal> granted by default is a safeguard against
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 244957a2483..9bdc70c702e 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -4051,7 +4051,7 @@ recurse_push_qual(Node *setOp, Query *topquery,
*
* extra_used_attrs can be passed as non-NULL to mark any columns (offset by
* FirstLowInvalidHeapAttributeNumber) that we should not remove. This
- * parameter is modifed by the function, so callers must make a copy if they
+ * parameter is modified by the function, so callers must make a copy if they
* need to use the passed in Bitmapset after calling this function.
*
* To avoid affecting column numbering in the targetlist, we don't physically
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index e3824efe9b5..65adf04c4eb 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -436,7 +436,7 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent,
* the number-of-tuples estimate to equal the parent table; if it
* is partial then we have to use the same methods as we would for
* a table, except we can be sure that the index is not larger
- * than the table. We must ignore partitioned indexes here as as
+ * than the table. We must ignore partitioned indexes here as
* there are not physical indexes.
*/
if (indexRelation->rd_rel->relkind != RELKIND_PARTITIONED_INDEX)
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index ebaf555d569..f88389de847 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -1771,7 +1771,7 @@ static void
pgoutput_stream_stop(struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn)
{
- /* we should be streaming a trasanction */
+ /* we should be streaming a transaction */
Assert(in_streaming);
OutputPluginPrepareWrite(ctx, true);
diff --git a/src/backend/utils/adt/xid8funcs.c b/src/backend/utils/adt/xid8funcs.c
index 5d79f838a3e..24271dfff73 100644
--- a/src/backend/utils/adt/xid8funcs.c
+++ b/src/backend/utils/adt/xid8funcs.c
@@ -678,7 +678,7 @@ pg_xact_status(PG_FUNCTION_ARGS)
Assert(TransactionIdIsValid(xid));
/*
- * Like when doing visiblity checks on a row, check whether the
+ * Like when doing visibility checks on a row, check whether the
* transaction is still in progress before looking into the CLOG.
* Otherwise we would incorrectly return "committed" for a transaction
* that is committing and has already updated the CLOG, but hasn't
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 9dd624b3ae0..34de62e2260 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -6273,7 +6273,7 @@ ProcessGUCArray(ArrayType *array, ArrayType *usersetArray,
/*
* USER SET values are applicable only for PGC_USERSET parameters. We
- * use InvalidOid as role in order to evade possible privileges of the
+ * use InvalidOid as role in order to avoid possible privileges of the
* current user.
*/
if (!DatumGetBool(userSetDatum))
diff --git a/src/bin/pg_amcheck/t/002_nonesuch.pl b/src/bin/pg_amcheck/t/002_nonesuch.pl
index 58be2c694d0..e3cfae9cd4a 100644
--- a/src/bin/pg_amcheck/t/002_nonesuch.pl
+++ b/src/bin/pg_amcheck/t/002_nonesuch.pl
@@ -324,7 +324,7 @@ $node->command_checks_all(
qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database\.public\.foo_idx"/,
qr/pg_amcheck: error: no relations to check/,
],
- 'checking otherwise existent objets in the wrong databases');
+ 'checking otherwise existent objects in the wrong databases');
#########################################
diff --git a/src/bin/pg_basebackup/bbstreamer.h b/src/bin/pg_basebackup/bbstreamer.h
index f5c3c0cfff9..f999e635d98 100644
--- a/src/bin/pg_basebackup/bbstreamer.h
+++ b/src/bin/pg_basebackup/bbstreamer.h
@@ -165,7 +165,7 @@ bbstreamer_buffer_bytes(bbstreamer *streamer, const char **data, int *len,
}
/*
- * This is a convenence method for use when implementing a bbstreamer; it is
+ * This is a convenience method for use when implementing a bbstreamer; it is
* not for use by outsider callers. It attempts to add enough data to the
* bbstreamer's buffer to reach a length of target_bytes and adjusts '*len'
* and '*data' accordingly. It returns true if the target length has been
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 7b7acc80448..71a1319865d 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -997,11 +997,11 @@ dumpRoleMembership(PGconn *conn)
/*
* 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
+ * role for which it is granting permissions, except for the bootstrap
* superuser, who can always be named as the grantor.
*
* We handle this by considering these grants role by role. For each role,
- * we initially consider the only allowable grantor to be the boostrap
+ * we initially consider the only allowable grantor to be the bootstrap
* superuser. Every time we grant ADMIN OPTION on the role to some user,
* that user also becomes an allowable grantor. We make repeated passes
* over the grants for the role, each time dumping those whose grantors
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 47b2c87f7f2..70ed034e70a 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3541,7 +3541,7 @@ printVerboseErrorMessages(CState *st, pg_time_usec_t *now, bool is_retry)
"ends the failed transaction"));
appendPQExpBuffer(buf, " (try %u", st->tries);
- /* Print max_tries if it is not unlimitted. */
+ /* Print max_tries if it is not unlimited. */
if (max_tries)
appendPQExpBuffer(buf, "/%u", max_tries);
@@ -5303,7 +5303,7 @@ GetTableInfo(PGconn *con, bool scale_given)
pg_log_error_hint("Perhaps you need to do initialization (\"pgbench -i\") in database \"%s\".", PQdb(con));
exit(1);
}
- else /* PQntupes(res) == 1 */
+ else /* PQntuples(res) == 1 */
{
/* normal case, extract partition information */
if (PQgetisnull(res, 0, 1))
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index 50ae053f461..bb6d4f03151 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -1895,7 +1895,7 @@ table_relation_toast_am(Relation rel)
*
* toastrel is the relation in which the toasted value is stored.
*
- * valueid identifes which toast value is to be fetched. For the heap,
+ * valueid identifies which toast value is to be fetched. For the heap,
* this corresponds to the values stored in the chunk_id column.
*
* attrsize is the total size of the toast value to be fetched.
diff --git a/src/include/backup/basebackup_target.h b/src/include/backup/basebackup_target.h
index bd2490282bb..250572f6dde 100644
--- a/src/include/backup/basebackup_target.h
+++ b/src/include/backup/basebackup_target.h
@@ -26,7 +26,7 @@ typedef struct BaseBackupTargetHandle BaseBackupTargetHandle;
* and either throws an error (if the target detail is not valid or some other
* problem, such as a permissions issue, is detected) or returns a pointer to
* the data that will be needed to create a bbsink implementing that target.
- * The second argumnt will be NULL if the TARGET_DETAIL option to the
+ * The second argument will be NULL if the TARGET_DETAIL option to the
* BASE_BACKUP command was not specified.
*
* 'get_sink' is a function that creates the bbsink. The first argument
diff --git a/src/include/replication/output_plugin.h b/src/include/replication/output_plugin.h
index 2d89d26586e..3ac67293861 100644
--- a/src/include/replication/output_plugin.h
+++ b/src/include/replication/output_plugin.h
@@ -112,7 +112,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
const char *gid);
/*
- * Callback called for every BEGIN of a prepared trnsaction.
+ * Callback called for every BEGIN of a prepared transaction.
*/
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn);
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 1f306399594..c9fa84cc43c 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -321,7 +321,7 @@ tas(volatile slock_t *lock)
/*
* Solaris has always run sparc processors in TSO (total store) mode, but
* linux didn't use to and the *BSDs still don't. So, be careful about
- * acquire/release semantics. The CPU will treat superfluous membars as
+ * acquire/release semantics. The CPU will treat superfluous members as
* NOPs, so it's just code space.
*/
#define HAS_TEST_AND_SET
diff --git a/src/test/isolation/specs/serializable-parallel-3.spec b/src/test/isolation/specs/serializable-parallel-3.spec
index c27298c24ff..858156c3ffe 100644
--- a/src/test/isolation/specs/serializable-parallel-3.spec
+++ b/src/test/isolation/specs/serializable-parallel-3.spec
@@ -1,6 +1,6 @@
# Exercise the case where a read-only serializable transaction has
# SXACT_FLAG_RO_SAFE set in a parallel query. This variant is like
-# two copies of #2 running at the same time, and excercises the case
+# two copies of #2 running at the same time, and exercises the case
# where another transaction has the same xmin, and it is the oldest.
setup
diff --git a/src/test/modules/unsafe_tests/expected/guc_privs.out b/src/test/modules/unsafe_tests/expected/guc_privs.out
index 54f95b2334a..f43a1da214e 100644
--- a/src/test/modules/unsafe_tests/expected/guc_privs.out
+++ b/src/test/modules/unsafe_tests/expected/guc_privs.out
@@ -337,7 +337,7 @@ GRANT SET, ALTER SYSTEM ON PARAMETER
autovacuum_work_mem, hash_mem_multiplier, max_stack_depth,
shared_buffers, temp_file_limit, work_mem
TO regress_host_resource_admin;
--- Check the new role now has privilges on parameters
+-- Check the new role now has privileges on parameters
SELECT has_parameter_privilege('regress_host_resource_admin', 'work_mem', 'SET, ALTER SYSTEM');
has_parameter_privilege
-------------------------
diff --git a/src/test/modules/unsafe_tests/sql/guc_privs.sql b/src/test/modules/unsafe_tests/sql/guc_privs.sql
index 6c7733fc397..7a4fb24b9d1 100644
--- a/src/test/modules/unsafe_tests/sql/guc_privs.sql
+++ b/src/test/modules/unsafe_tests/sql/guc_privs.sql
@@ -133,7 +133,7 @@ GRANT SET, ALTER SYSTEM ON PARAMETER
autovacuum_work_mem, hash_mem_multiplier, max_stack_depth,
shared_buffers, temp_file_limit, work_mem
TO regress_host_resource_admin;
--- Check the new role now has privilges on parameters
+-- Check the new role now has privileges on parameters
SELECT has_parameter_privilege('regress_host_resource_admin', 'work_mem', 'SET, ALTER SYSTEM');
SELECT has_parameter_privilege('regress_host_resource_admin', 'work_mem', 'SET');
SELECT has_parameter_privilege('regress_host_resource_admin', 'work_mem', 'ALTER SYSTEM');
diff --git a/src/tools/pg_bsd_indent/tests/elsecomment.0 b/src/tools/pg_bsd_indent/tests/elsecomment.0
index 61066c22b58..c701f1b8a2c 100644
--- a/src/tools/pg_bsd_indent/tests/elsecomment.0
+++ b/src/tools/pg_bsd_indent/tests/elsecomment.0
@@ -1,7 +1,7 @@
/* $FreeBSD$ */
/* See r303484 and r309342 */
void t(void) {
- /* The two if statements below excercise two different code paths. */
+ /* The two if statements below exercise two different code paths. */
if (1) /* a */ int a; else /* b */ int b;
diff --git a/src/tools/pg_bsd_indent/tests/elsecomment.0.stdout b/src/tools/pg_bsd_indent/tests/elsecomment.0.stdout
index 7de23be0894..6c3c10ea3d2 100644
--- a/src/tools/pg_bsd_indent/tests/elsecomment.0.stdout
+++ b/src/tools/pg_bsd_indent/tests/elsecomment.0.stdout
@@ -3,7 +3,7 @@
void
t(void)
{
- /* The two if statements below excercise two different code paths. */
+ /* The two if statements below exercise two different code paths. */
if (1) /* a */
int a;
On Tue, 18 Apr 2023 at 06:00, Alexander Lakhin <exclusion@gmail.com> wrote:
Please consider fixing the following unique words/identifiers introduced in v16:
Thanks, I've pushed all of these apart from the following 2.
45. tar_set_error -- remove (obsolete since ebfb814f7)
46. test_tranche_name -- remove (not used, see 006b69fd9)
These didn't quite fit in with the "typo fixes" category of the
commit, so I left them off the commit I just pushed.
Also, maybe OID_MAX should be removed from src/include/postgres_ext.h as it's unused since eb8312a22.
I didn't touch this. It seems like it could be useful for extensions
and client apps even if it's not used in core.
Beside that, this simple script:
for w in $(cat src/tools/pgindent/typedefs.list); do grep -q -P "\b$w\b" -r * --exclude typedefs.list || echo "$w"; done
detects 58 identifiers that don't exist in the source tree anymore (see typedefs.lost attached).
Maybe they should be removed from typedefs.list too.
I didn't touch this either. typedefs.list normally gets some work
done during the pgindent run, which is likely going to happen around
May or June. Maybe you can check back after that's done and make sure
all these unused ones were removed. I'm not sure if the process that's
done for that only finds new ones that are now required or if it
completely generates a new list.
David
On Tue, 18 Apr 2023 at 10:10, Justin Pryzby <pryzby@telsasoft.com> wrote:
- * USER SET values are appliciable only for PGC_USERSET parameters. We + * USER SET values are applicable only for PGC_USERSET parameters. We * use InvalidOid as role in order to evade possible privileges of theand s/evade/avoid/
I didn't touch this. You'll need to provide more justification for why
you think it's more correct than what's there. It might not be worth
too much discussion, however.
Attached some others that I found.
Pushed the rest. Thanks
David
David Rowley <dgrowleyml@gmail.com> writes:
On Tue, 18 Apr 2023 at 06:00, Alexander Lakhin <exclusion@gmail.com> wrote:
Also, maybe OID_MAX should be removed from src/include/postgres_ext.h as it's unused since eb8312a22.
I didn't touch this. It seems like it could be useful for extensions
and client apps even if it's not used in core.
Agreed, bad idea. For better or worse, that's part of our client API now.
Beside that, this simple script:
for w in $(cat src/tools/pgindent/typedefs.list); do grep -q -P "\b$w\b" -r * --exclude typedefs.list || echo "$w"; done
detects 58 identifiers that don't exist in the source tree anymore (see typedefs.lost attached).
Maybe they should be removed from typedefs.list too.
I didn't touch this either. typedefs.list normally gets some work
done during the pgindent run, which is likely going to happen around
May or June.
Yeah, it will get refreshed from the buildfarm output [1]https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list pretty soon.
A quick check says that as of today, that refresh would add 81 names
and remove 94. (Seems like a remarkably high number of removals,
but I didn't dig further than counting the diff output.)
regards, tom lane
[1]: https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list
On Tue, Apr 18, 2023 at 02:06:43PM +1200, David Rowley wrote:
On Tue, 18 Apr 2023 at 10:10, Justin Pryzby <pryzby@telsasoft.com> wrote:
- * USER SET values are appliciable only for PGC_USERSET parameters. We + * USER SET values are applicable only for PGC_USERSET parameters. We * use InvalidOid as role in order to evade possible privileges of theand s/evade/avoid/
I didn't touch this. You'll need to provide more justification for why
you think it's more correct than what's there.
I'd noticed that it's a substitution/mistake that's been made in the
past. I dug up:
9436041ed848debb3d64fb5fbff6cdb35bc46d04
8e12f4a250d250a89153da2eb9b91c31bb80c483
cd9479af2af25d7fa9bfd24dd4dcf976b360f077
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
911e70207703799605f5a0e8aad9f06cff067c63
It might not be worth too much discussion, however.
+many. I may resend the patch at some later date.
Attached some others that I found.
Pushed the rest. Thanks
Thanks!
--
Justin
Hi Justin and David,
18.04.2023 01:10, Justin Pryzby wrote:
Well done.
Thank you for reviewing!
On Mon, Apr 17, 2023 at 09:00:00PM +0300, Alexander Lakhin wrote:
Hello hackers,
Please consider fixing the following unique words/identifiers introduced in v16:
Note that your patches are overlapping:
...
It'd make sense if the changes to each file were isolated to a single
patch (especially 004_load and acl.c).
I'd hoped that most of the proposed fixes will be accepted, so conflicts due
to skipping of some changes seemed unlikely to me. So if you are not
strongly disagree, I would continue presenting my findings the same way.
...
You missed "boostrap" :)
Yes, that's because "boostrap" was not unique, but my semi-automatic approach
is based on `uniq -u`, so I'm sure that there are typos that can't be found
this way.
But hadn't yet convinced myself to start the process of defending each
one of the fixes. Attached some others that I found.
Yeah, those are good catches too, but e. g. "privilges" is not new in v16,
so it's fallen out of my "hot errors" category. If we're going to fix not so
hot ones too now, please look at the similar list for v15+ (596b5af1d..HEAD).
1. abbrevated -> abbreviated
2. ArchiveModeRequested -> ArchiveRecoveryRequested
3. BufFileOpenShared -> BufFileOpenFileSet // see dcac5e7ac
4. check_publication_columns -> pub_collist_contains_invalid_column // see note 1
5. configuation -> configuration
6. copyAclUserName -> dequoteAclUserName // see 0c9d84427
7. EndWalRecovery -> FinishWalRecovery
8. HaveRegisteredOrActiveSnapshots -> HaveRegisteredOrActiveSnapshot
9. idiosyncracies -> idiosyncrasies
10. iif -> iff
11. initpriv -> initprivs
12. inserted_destrel -> insert_destrel
13. Intialize -> Initialize
14. invtrans -> invtransfn
15. isolation-level -> isolation level
16. lefthasheqoperator -> left_hasheqoperator + righthasheqoperator -> right_hasheqoperator
17. LRQ_NO_IO -> LRQ_NEXT_NO_IO
18. minRecovery point -> minRecoveryPoint
19. multidimensional-aware -> multidimension-aware // sync with gistbuild.c
20. ParalleVacuumState -> ParallelVacuumState
21. PgStatShm_Stat*Entry -> PgStatShared_* // see note 2
22. plpython_call_handler -> plpython3_call_handler // see 9b7e24a2c
23. pulications -> publications
24. ReadCheckPointRecord -> ReadCheckpointRecord
25. relkkinds -> relkinds
26. separare -> separate // though perhaps it's not the most suitable word here
27. setup_formatted_log_time -> get_formatted_log_time // see ac7c80758
28. SPI_abort -> SPI_rollback
29. ssup_datum_int32_compare -> ssup_datum_int32_cmp
30. ssup_datum_signed_compare -> ssup_datum_signed_cmp
31. ssup_datum_unsigned_compare -> ssup_datum_unsigned_cmp
32. SUBSCRITPION -> SUBSCRIPTION
33. tabelspaces -> tablespaces
34. table_state_not_ready -> table_states_not_ready
35. underling -> underlying
36. WalRecoveryResult -> EndOfWalRecoveryInfo
Also, I'd like to note that the following entities/references are orphaned now,
so maybe some of them could be removed too:
1. gen-rtab (in pgcrypto/Makefile) // orphaned since db7d1a7b0
2. pgstat_temp_directory // was left by b3abca681 for v15, but maybe it's time to remove it for v16
3. pgstat_write_statsfiles (in valgrind.supp)
4. quote_system_arg (in vcregress.pl) // unused since d2a2ce418
5. standard_initdb (in vcregress.pl) // unused since 322becb60
/* though maybe vcregress.pl will be removed completely soon */
6. int pstat; /* mcrypt uses it */ (in contrib/pgcrypto/px.h)
/* "mcrypt" became unique after abe81ee08, support for libmcrypt was removed at 2005
(3cc866123) */
Note 1. A check that was located in check_publication_columns() in
v13-0003-Add-column-filtering-to-logical-replication.patch [1]/messages/by-id/202112302021.ca7ihogysgh3@alvherre.pgsql,
can be found in pub_collist_contains_invalid_column() now (see also [2]/messages/by-id/CAA4eK1K5pkrPT9z5TByUPptExian5c18g6GnfNf9Cr97QdPbjw@mail.gmail.com).
Note 2. The inconsistency appeared in [3]/messages/by-id/20220404041516.cctrvpadhuriawlq@alap3.anarazel.de,
v67-0007-pgstat-store-statistics-in-shared-memory.patch was correct in
this aspect.
18.04.2023 04:35, David Rowley wrote:
Please consider fixing the following unique words/identifiers introduced in v16:
Thanks, I've pushed all of these apart from the following 2.
Thank you!
[1]: /messages/by-id/202112302021.ca7ihogysgh3@alvherre.pgsql
[2]: /messages/by-id/CAA4eK1K5pkrPT9z5TByUPptExian5c18g6GnfNf9Cr97QdPbjw@mail.gmail.com
[3]: /messages/by-id/20220404041516.cctrvpadhuriawlq@alap3.anarazel.de
Best regards,
Alexander
Attachments:
typo-fixes-for-v15+.21-30.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v15+.21-30.patchDownload
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index d51b43be54..62aa999931 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -1396,7 +1396,7 @@ read_tablespace_map(List **tablespaces)
*
* This does not close the 'xlogreader' yet, because in some cases the caller
* still wants to re-read the last checkpoint record by calling
- * ReadCheckPointRecord().
+ * ReadCheckpointRecord().
*
* Returns the position of the last valid or applied record, after which new
* WAL should be appended, information about why recovery was ended, and some
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index e3a170c38b..256632c985 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -432,7 +432,7 @@ AtEOXact_SPI(bool isCommit)
/*
* Pop stack entries, stopping if we find one marked internal_xact (that
- * one belongs to the caller of SPI_commit or SPI_abort).
+ * one belongs to the caller of SPI_commit or SPI_rollback).
*/
while (_SPI_connected >= 0)
{
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index ea91ce355f..fc05e2e293 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -2000,7 +2000,7 @@ static inline GlobalVisHorizonKind
GlobalVisHorizonKindForRel(Relation rel)
{
/*
- * Other relkkinds currently don't contain xids, nor always the necessary
+ * Other relkinds currently don't contain xids, nor always the necessary
* logical decoding markers.
*/
Assert(!rel ||
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 9ca9835aab..fa03cbbadf 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -517,7 +517,7 @@ qsort_tuple_unsigned_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
}
#if SIZEOF_DATUM >= 8
-/* Used if first key's comparator is ssup_datum_signed_compare */
+/* Used if first key's comparator is ssup_datum_signed_cmp */
static pg_attribute_always_inline int
qsort_tuple_signed_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
{
@@ -541,7 +541,7 @@ qsort_tuple_signed_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
}
#endif
-/* Used if first key's comparator is ssup_datum_int32_compare */
+/* Used if first key's comparator is ssup_datum_int32_cmp */
static pg_attribute_always_inline int
qsort_tuple_int32_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
{
diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h
index 6badb2fde4..60fbf9394b 100644
--- a/src/include/utils/pgstat_internal.h
+++ b/src/include/utils/pgstat_internal.h
@@ -102,7 +102,7 @@ typedef struct PgStatShared_HashEntry
} PgStatShared_HashEntry;
/*
- * Common header struct for PgStatShm_Stat*Entry.
+ * Common header struct for PgStatShared_*.
*/
typedef struct PgStatShared_Common
{
diff --git a/src/interfaces/libpq/fe-trace.c b/src/interfaces/libpq/fe-trace.c
index abaab6a073..402784f40e 100644
--- a/src/interfaces/libpq/fe-trace.c
+++ b/src/interfaces/libpq/fe-trace.c
@@ -74,7 +74,7 @@ PQsetTraceFlags(PGconn *conn, int flags)
/*
* Print the current time, with microseconds, into a caller-supplied
* buffer.
- * Cribbed from setup_formatted_log_time, but much simpler.
+ * Cribbed from get_formatted_log_time, but much simpler.
*/
static void
pqTraceFormatTimestamp(char *timestr, size_t ts_len)
diff --git a/src/pl/plpython/plpy_main.c b/src/pl/plpython/plpy_main.c
index a4d66f3057..010a97378c 100644
--- a/src/pl/plpython/plpy_main.c
+++ b/src/pl/plpython/plpy_main.c
@@ -306,7 +306,7 @@ plpython3_inline_handler(PG_FUNCTION_ARGS)
/*
* Setup error traceback support for ereport().
* plpython_inline_error_callback doesn't currently need exec_ctx, but
- * for consistency with plpython_call_handler we do it the same way.
+ * for consistency with plpython3_call_handler we do it the same way.
*/
plerrcontext.callback = plpython_inline_error_callback;
plerrcontext.arg = exec_ctx;
diff --git a/src/test/subscription/t/013_partition.pl b/src/test/subscription/t/013_partition.pl
index f03cd24246..275fb3b525 100644
--- a/src/test/subscription/t/013_partition.pl
+++ b/src/test/subscription/t/013_partition.pl
@@ -564,7 +564,7 @@ is($result, qq(), 'inserts into tab4_1 replicated');
# now switch the order of publications in the list, try again, the result
-# should be the same (no dependence on order of pulications)
+# should be the same (no dependence on order of publications)
$node_subscriber2->safe_psql('postgres',
"ALTER SUBSCRIPTION sub2 SET PUBLICATION pub_all, pub_lower_level");
diff --git a/src/test/subscription/t/023_twophase_stream.pl b/src/test/subscription/t/023_twophase_stream.pl
index 1cc871fddb..f4af44414b 100644
--- a/src/test/subscription/t/023_twophase_stream.pl
+++ b/src/test/subscription/t/023_twophase_stream.pl
@@ -264,7 +264,7 @@ sub test_streaming
is($result, qq(1), 'transaction is prepared on subscriber');
# Insert a different record (now we are outside of the 2PC transaction)
- # Note: the 2PC transaction still holds row locks so make sure this insert is for a separare primary key
+ # Note: the 2PC transaction still holds row locks so make sure this insert is for a separate primary key
$node_publisher->safe_psql('postgres',
"INSERT INTO test_tab VALUES (99999, 'foobar')");
typo-fixes-for-v15+.31-36.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v15+.31-36.patchDownload
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 62aa999931..188f6d6f85 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -1400,7 +1400,7 @@ read_tablespace_map(List **tablespaces)
*
* Returns the position of the last valid or applied record, after which new
* WAL should be appended, information about why recovery was ended, and some
- * other things. See the WalRecoveryResult struct for details.
+ * other things. See the EndOfWalRecoveryInfo struct for details.
*/
EndOfWalRecoveryInfo *
FinishWalRecovery(void)
diff --git a/src/backend/backup/basebackup_copy.c b/src/backend/backup/basebackup_copy.c
index 2bb6c89f8c..73a3f4a970 100644
--- a/src/backend/backup/basebackup_copy.c
+++ b/src/backend/backup/basebackup_copy.c
@@ -3,7 +3,7 @@
* basebackup_copy.c
* send basebackup archives using COPY OUT
*
- * We send a result set with information about the tabelspaces to be included
+ * We send a result set with information about the tablespaces to be included
* in the backup before starting COPY OUT. Then, we start a single COPY OUT
* operation and transmits all the archives and the manifest if present during
* the course of that single COPY OUT. Each CopyData message begins with a
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c
index 6dce355633..0c71ae9ba7 100644
--- a/src/backend/replication/logical/tablesync.c
+++ b/src/backend/replication/logical/tablesync.c
@@ -1556,7 +1556,7 @@ FetchTableStates(bool *started_tx)
* Does the subscription have tables?
*
* If there were not-READY relations found then we know it does. But
- * if table_state_not_ready was empty we still need to check again to
+ * if table_states_not_ready was empty we still need to check again to
* see if there are 0 tables.
*/
has_subrels = (table_states_not_ready != NIL) ||
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index fa03cbbadf..95c3970437 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -494,7 +494,7 @@ static void tuplesort_updatemax(Tuplesortstate *state);
* abbreviations of text or multi-key sorts. There could be! Is it worth it?
*/
-/* Used if first key's comparator is ssup_datum_unsigned_compare */
+/* Used if first key's comparator is ssup_datum_unsigned_cmp */
static pg_attribute_always_inline int
qsort_tuple_unsigned_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
{
diff --git a/src/bin/pg_basebackup/bbstreamer_gzip.c b/src/bin/pg_basebackup/bbstreamer_gzip.c
index 83bf5972fa..3bdbfa0bc4 100644
--- a/src/bin/pg_basebackup/bbstreamer_gzip.c
+++ b/src/bin/pg_basebackup/bbstreamer_gzip.c
@@ -150,7 +150,7 @@ bbstreamer_gzip_writer_content(bbstreamer *streamer,
* calling gzclose.
*
* It makes no difference whether we opened the file or the caller did it,
- * because libz provides no way of avoiding a close on the underling file
+ * because libz provides no way of avoiding a close on the underlying file
* handle. Notice, however, that bbstreamer_gzip_writer_new() uses dup() to
* work around this issue, so that the behavior from the caller's viewpoint
* is the same as for bbstreamer_plain_writer.
diff --git a/src/test/subscription/t/029_on_error.pl b/src/test/subscription/t/029_on_error.pl
index 7797a949c2..7d6fb66985 100644
--- a/src/test/subscription/t/029_on_error.pl
+++ b/src/test/subscription/t/029_on_error.pl
@@ -13,7 +13,7 @@ my $offset = 0;
# Test skipping the transaction. This function must be called after the caller
# has inserted data that conflicts with the subscriber. The finish LSN of the
# error transaction that is used to specify to ALTER SUBSCRIPTION ... SKIP is
-# fetched from the server logs. After executing ALTER SUBSCRITPION ... SKIP, we
+# fetched from the server logs. After executing ALTER SUBSCRIPTION ... SKIP, we
# check if logical replication can continue working by inserting $nonconflict_data
# on the publisher.
sub test_skip_lsn
typo-fixes-for-v15+.1-10.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v15+.1-10.patchDownload
diff --git a/contrib/basebackup_to_shell/t/001_basic.pl b/contrib/basebackup_to_shell/t/001_basic.pl
index a278df3f91..84ad93f614 100644
--- a/contrib/basebackup_to_shell/t/001_basic.pl
+++ b/contrib/basebackup_to_shell/t/001_basic.pl
@@ -49,7 +49,7 @@ $node->command_fails_like(
qr/shell command for backup is not configured/,
'fails if basebackup_to_shell.command is not set');
-# Configure basebackup_to_shell.command and reload the configuation file.
+# Configure basebackup_to_shell.command and reload the configuration file.
my $backup_path = PostgreSQL::Test::Utils::tempdir;
my $escaped_backup_path = $backup_path;
$escaped_backup_path =~ s{\\}{\\\\}g
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 02d1b2cd6d..d51b43be54 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -8,7 +8,7 @@
* or standby mode, depending on configuration options and the state of
* the control file and possible backup label file. PerformWalRecovery()
* performs the actual WAL replay, calling the rmgr-specific redo routines.
- * EndWalRecovery() performs end-of-recovery checks and cleanup actions,
+ * FinishWalRecovery() performs end-of-recovery checks and cleanup actions,
* and prepares information needed to initialize the WAL for writes. In
* addition to these three main functions, there are a bunch of functions
* for interrogating recovery state and controlling the recovery process.
@@ -505,7 +505,7 @@ EnableStandbyMode(void)
* disk does after initializing other subsystems, but before calling
* PerformWalRecovery().
*
- * This initializes some global variables like ArchiveModeRequested, and
+ * This initializes some global variables like ArchiveRecoveryRequested, and
* StandbyModeRequested and InRecovery.
*/
void
diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index 47637f28ab..c488b6370b 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -497,7 +497,7 @@ compare_int16(const void *a, const void *b)
* and a Bitmapset with them; verify that each attribute is appropriate
* to have in a publication column list (no system or generated attributes,
* no duplicates). Additional checks with replica identity are done later;
- * see check_publication_columns.
+ * see pub_collist_contains_invalid_column.
*
* Note that the attribute numbers are *not* offset by
* FirstLowInvalidHeapAttributeNumber; system columns are forbidden so this
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index c5a6babccc..729ebd86d1 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -189,7 +189,7 @@ getid(const char *s, char *n, Node *escontext)
/*
* Write a role name at *p, adding double quotes if needed.
* There must be at least (2*NAMEDATALEN)+2 bytes available at *p.
- * This needs to be kept in sync with copyAclUserName in pg_dump/dumputils.c
+ * This needs to be kept in sync with dequoteAclUserName in pg_dump/dumputils.c
*/
static void
putid(char *p, const char *s)
diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c
index ae48cdbaa9..4fb8663cd6 100644
--- a/src/backend/utils/mmgr/generation.c
+++ b/src/backend/utils/mmgr/generation.c
@@ -544,7 +544,7 @@ GenerationBlockInit(GenerationContext *context, GenerationBlock *block,
/*
* GenerationBlockIsEmpty
- * Returns true iif 'block' contains no chunks
+ * Returns true iff 'block' contains no chunks
*/
static inline bool
GenerationBlockIsEmpty(GenerationBlock *block)
diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c
index 52b8898d5e..46b53bfeb7 100644
--- a/src/backend/utils/sort/logtape.c
+++ b/src/backend/utils/sort/logtape.c
@@ -681,7 +681,7 @@ LogicalTapeCreate(LogicalTapeSet *lts)
{
/*
* The only thing that currently prevents creating new tapes in leader is
- * the fact that BufFiles opened using BufFileOpenShared() are read-only
+ * the fact that BufFiles opened using BufFileOpenFileSet() are read-only
* by definition, but that could be changed if it seemed worthwhile. For
* now, writing to the leader tape will raise a "Bad file descriptor"
* error, so tuplesort must avoid writing to the leader tape altogether.
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 7d11ae3478..c9ca44d8b7 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1630,7 +1630,7 @@ ThereAreNoPriorRegisteredSnapshots(void)
}
/*
- * HaveRegisteredOrActiveSnapshots
+ * HaveRegisteredOrActiveSnapshot
* Is there any registered or active snapshot?
*
* NB: Unless pushed or active, the cached catalog snapshot will not cause
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h
index aaca6634cb..475ed1d5b8 100644
--- a/src/include/utils/sortsupport.h
+++ b/src/include/utils/sortsupport.h
@@ -372,7 +372,7 @@ ApplySortAbbrevFullComparator(Datum datum1, bool isNull1,
/*
* Datum comparison functions that we have specialized sort routines for.
- * Datatypes that install these as their comparator or abbrevated comparator
+ * Datatypes that install these as their comparator or abbreviated comparator
* are eligible for faster sorting.
*/
extern int ssup_datum_unsigned_cmp(Datum x, Datum y, SortSupport ssup);
diff --git a/src/tools/mark_pgdllimport.pl b/src/tools/mark_pgdllimport.pl
index 69fa8e4ae9..0cf71dbc25 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 coding style,
+# This relies on a few idiosyncrasies 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.
typo-fixes-for-v15+.11-20.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v15+.11-20.patchDownload
diff --git a/contrib/pg_walinspect/pg_walinspect.c b/contrib/pg_walinspect/pg_walinspect.c
index e6f18e1c64..1cd3744d5d 100644
--- a/contrib/pg_walinspect/pg_walinspect.c
+++ b/contrib/pg_walinspect/pg_walinspect.c
@@ -85,7 +85,7 @@ GetCurrentLSN(void)
}
/*
- * Intialize WAL reader and identify first valid LSN.
+ * Initialize WAL reader and identify first valid LSN.
*/
static XLogReaderState *
InitXLogReaderState(XLogRecPtr lsn)
diff --git a/src/backend/access/gist/README b/src/backend/access/gist/README
index efb2730e18..e9bc41a49f 100644
--- a/src/backend/access/gist/README
+++ b/src/backend/access/gist/README
@@ -428,7 +428,7 @@ with optional buffering.
Sorting GiST build requires good linearization of the sort opclass. That is not
always the case in multidimensional data. To tackle the anomalies, we buffer
-index tuples and apply a picksplit function that can be multidimensional-aware.
+index tuples and apply a picksplit function that can be multidimension-aware.
Bulk delete algorithm (VACUUM)
------------------------------
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c
index b26f2a64fb..7133ec0b22 100644
--- a/src/backend/access/transam/parallel.c
+++ b/src/backend/access/transam/parallel.c
@@ -376,7 +376,7 @@ InitializeParallelDSM(ParallelContext *pcxt)
/*
* Serialize the transaction snapshot if the transaction
- * isolation-level uses a transaction snapshot.
+ * isolation level uses a transaction snapshot.
*/
if (IsolationUsesXactSnapshot())
{
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b540ee293b..d5f76a2593 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5835,7 +5835,7 @@ ReachedEndOfBackup(XLogRecPtr EndRecPtr, TimeLineID tli)
{
/*
* We have reached the end of base backup, as indicated by pg_control. The
- * data on disk is now consistent (unless minRecovery point is further
+ * data on disk is now consistent (unless minRecoveryPoint is further
* ahead, which can happen if we crashed during previous recovery). Reset
* backupStartPoint and backupEndPoint, and update minRecoveryPoint to
* make sure we don't allow starting up at an earlier point even if
diff --git a/src/backend/access/transam/xlogprefetcher.c b/src/backend/access/transam/xlogprefetcher.c
index 7ba18f2a76..906e3d9469 100644
--- a/src/backend/access/transam/xlogprefetcher.c
+++ b/src/backend/access/transam/xlogprefetcher.c
@@ -457,9 +457,9 @@ XLogPrefetcherComputeStats(XLogPrefetcher *prefetcher)
* *lsn, and the I/O will be considered to have completed once that LSN is
* replayed.
*
- * Returns LRQ_NO_IO if we examined the next block reference and found that it
- * was already in the buffer pool, or we decided for various reasons not to
- * prefetch.
+ * Returns LRQ_NEXT_NO_IO if we examined the next block reference and found
+ * that it was already in the buffer pool, or we decided for various reasons
+ * not to prefetch.
*/
static LsnReadQueueNextStatus
XLogPrefetcherNextBlock(uintptr_t pgsr_private, XLogRecPtr *lsn)
diff --git a/src/backend/commands/vacuumparallel.c b/src/backend/commands/vacuumparallel.c
index 87ea5c5242..a79067fd46 100644
--- a/src/backend/commands/vacuumparallel.c
+++ b/src/backend/commands/vacuumparallel.c
@@ -8,7 +8,7 @@
*
* In a parallel vacuum, we perform both index bulk deletion and index cleanup
* with parallel worker processes. Individual indexes are processed by one
- * vacuum process. ParalleVacuumState contains shared information as well as
+ * vacuum process. ParallelVacuumState contains shared information as well as
* 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
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 28205f7433..3aab5a0e80 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -4081,7 +4081,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
numTransArgs = pertrans->numTransInputs + 1;
/*
- * Set up infrastructure for calling the transfn. Note that invtrans is
+ * Set up infrastructure for calling the transfn. Note that invtransfn is
* not needed here.
*/
build_aggregate_transfn_expr(inputTypes,
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 5b596f1e7a..6aa8c03def 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -740,7 +740,7 @@ ExecGetUpdateNewTuple(ResultRelInfo *relinfo,
*
* Returns RETURNING result if any, otherwise NULL.
* *inserted_tuple is the tuple that's effectively inserted;
- * *inserted_destrel is the relation where it was inserted.
+ * *insert_destrel is the relation where it was inserted.
* These are only set on success.
*
* This may change the currently active tuple conversion map in
diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c
index c6c21a7338..06f90882c4 100644
--- a/src/backend/optimizer/plan/initsplan.c
+++ b/src/backend/optimizer/plan/initsplan.c
@@ -3152,7 +3152,7 @@ check_hashjoinable(RestrictInfo *restrictinfo)
/*
* check_memoizable
* If the restrictinfo's clause is suitable to be used for a Memoize node,
- * set the lefthasheqoperator and righthasheqoperator to the hash equality
+ * set the left_hasheqoperator and right_hasheqoperator to the hash equality
* operator that will be needed during caching.
*/
static void
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 73a6c964ba..058244cd17 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -9636,7 +9636,7 @@ getAdditionalACLs(Archive *fout)
{
if (dobj->objType == DO_TABLE)
{
- /* For a column initpriv, set the table's ACL flags */
+ /* For a column initprivs, set the table's ACL flags */
dobj->components |= DUMP_COMPONENT_ACL;
((TableInfo *) dobj)->hascolumnACLs = true;
}
Justin Pryzby <pryzby@telsasoft.com> writes:
On Tue, Apr 18, 2023 at 02:06:43PM +1200, David Rowley wrote:
On Tue, 18 Apr 2023 at 10:10, Justin Pryzby <pryzby@telsasoft.com> wrote:
and s/evade/avoid/
I didn't touch this. You'll need to provide more justification for why
you think it's more correct than what's there.
I'd noticed that it's a substitution/mistake that's been made in the
past.
"Evade" doesn't seem like le mot juste there; it's got negative
connotations. But the code around it is just horrible. Some offenses:
* No documentation in the function header comment of what the
usersetArray parameter is or does. Which is bad enough in itself,
but what the parameter actually does is falsify the header comment's
principal claim that the passed context is what is used. So I don't
find that omission acceptable.
* Non-obvious, and quite unnecessary, dependency on the isnull variable
having been left in a particular state by previous code.
* For me, at least, it'd read better if the if/else arms were swapped,
allowing removal of the negation in the if-condition and bringing
the code this comment comments on closer to said comment.
As for the comment text, maybe say
* If the value was USER SET, then apply it at PGC_USERSET context
* rather than the caller-supplied context, to prevent any more-restricted
* GUCs being set. Also pass InvalidOid for the role, to ensure any
* special privileges of the current user aren't applied.
I hesitate to go look at the rest of this commit, but I guess somebody
had better.
regards, tom lane
On Wed, 19 Apr 2023 at 07:00, Alexander Lakhin <exclusion@gmail.com> wrote:
please look at the similar list for v15+ (596b5af1d..HEAD).
I've now pushed most of these but didn't include the following ones:
3. BufFileOpenShared -> BufFileOpenFileSet // see dcac5e7ac
Maybe I need to spend longer, but I just didn't believe the command
that claimed that "BufFiles opened using BufFileOpenFileSet() are
read-only by definition". Looking at the code for that, it seems to
depend on if O_RDONLY is included in the mode flags.
19. multidimensional-aware -> multidimension-aware // sync with gistbuild.c
I didn't change this as I didn't think it was an improvement. I'd
probably have written "multidimensionally aware", but I didn't feel
strongly enough to want to change it.
David
Hi David,
21.04.2023 01:49, David Rowley wrote:
On Wed, 19 Apr 2023 at 07:00, Alexander Lakhin <exclusion@gmail.com> wrote:
please look at the similar list for v15+ (596b5af1d..HEAD).
I've now pushed most of these but didn't include the following ones:
Thank you!
3. BufFileOpenShared -> BufFileOpenFileSet // see dcac5e7ac
Maybe I need to spend longer, but I just didn't believe the command
that claimed that "BufFiles opened using BufFileOpenFileSet() are
read-only by definition". Looking at the code for that, it seems to
depend on if O_RDONLY is included in the mode flags.
I've found the following explanation for that:
1) As of dcac5e7ac~1 function ltsConcatWorkerTapes() contained:
...
file = BufFileOpenShared(fileset, filename, O_RDONLY);
...
* The only thing that currently prevents writing to the leader tape from
* working is the fact that BufFiles opened using BufFileOpenShared() are
* read-only by definition, but that could be changed if it seemed
...
2) A patch [1]/messages/by-id/91284957-3cb2-944e-5f14-5c2ff86b49fa@iki.fi (0001-Refactor-LogicalTapeSet-LogicalTape-interface.patch), which eventually resulted in c4649cce3, initially started
with the change:
-ltsConcatWorkerTapes(LogicalTapeSet *lts, TapeShare *shared,
...
- * working is the fact that BufFiles opened using BufFileOpenShared() are
...
+LogicalTapeImport(LogicalTapeSet *lts, int worker, TapeShare *shared)
...
+ file = BufFileOpenShared(lts->fileset, filename, O_RDONLY);
...
+ * the fact that BufFiles opened using BufFileOpenShared() are read-only
3) The commit dcac5e7ac (pushed 2021-08-30) renamed the function
BufFileOpenShared() to BufFileOpenFileSet() and changed the comment:
...
* The only thing that currently prevents writing to the leader tape from
- * working is the fact that BufFiles opened using BufFileOpenShared() are
+ * working is the fact that BufFiles opened using BufFileOpenFileSet() are
* read-only by definition, but that could be changed if it seemed
...
4) The commit c4649cce3 (pushed 2021-10-18) removed the comment referencing
BufFileOpenFileSet() and added that somewhat distant comment
referencing BufFileOpenShared():
$ git show c4649cce3 src/backend/utils/sort/logtape.c | grep 'BufFiles opened'
- * working is the fact that BufFiles opened using BufFileOpenFileSet() are
+ * the fact that BufFiles opened using BufFileOpenShared() are read-only
So I still believe that the "BufFileOpenShared -> BufFileOpenFileSet" change
is correct and that comment can be read now as referencing to the line:
file = BufFileOpenFileSet(<s->fileset->fs, filename, O_RDONLY, false);
in LogicalTapeImport(). Although it could be improved, for sure.
Please look at the following two bunches for v14+ and v13+ (split to ease
back-patching if needed). Having processed them, I've reached the state that
could be considered "clean" ([2]/messages/by-id/5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com, [3]/messages/by-id/CALDaNm0ni+GAOe4+fbXiOxNrVudajMYmhJFtXGX-zBPoN8ixhw@mail.gmail.com); at least I don't see how to detect
yet more errors of this class in dozens, so it's my last run for now (though I
have several entities left, which I couldn't find replacements for).
v14+:
1. AsyncCtl -> NotifyCtl // renamed in 5da14938f
2. ATExecConstrRecurse -> ATExecAlterConstrRecurse
3. attlocal -> attislocal
4. before_shmem_access -> before_shmem_exit
5. bodys -> bodies
6. can_getnextslot_tidrange -> scan_getnextslot_tidrange
7. DISABLE_ATOMICS -> HAVE_ATOMICS
8. FETCH_H -> REWIND_SOURCE_H
9. filed -> field
10. find_minmax_aggs_walker -> can_minmax_aggs // renamed in 0a2bc5d61e
11. GroupExprInfo -> GroupVarInfo //// a4d75c86b
12. LD_DEAD -> LP_DEAD
13. libpq-trace.c -> fe-trace.c
14. lowerItem -> lowestItem //// bb437f995
15. has_privs -> has_privs_of_role
16. heap_hot_prune_opt -> heap_page_prune_opt
17. MAX_CONVERSION_LENGTH -> MAX_CONVERSION_INPUT_LENGTH //// ea1b99a66
18. MAX_FLUSH_BUFFERS -> MAX_WRITEALL_BUFFERS // renamed in dee663f78
19. myscheam -> myschema // doc/ -- maybe should be backpatched
20. pgbestat_beinit -> pgstat_beinit
21. pgWALUsage -> pgWalUsage
22. point-in-time-recovery -> point-in-time recovery
23. PQnotify -> PGnotify
24. QUERYJUBLE_H -> QUERYJUMBLE_H
25. rd_partdesc_nodetach -> rd_partdesc_nodetached
26. ReadNewTransactionid -> GetNewTransactionId
27. RelationBuildDescr -> RelationBuildDesc
28. SnapBuildCommittedTxn -> SnapBuildCommitTxn // see DecodeCommit()
29. subscription_rel -> pg_subscription_rel
30. tap_rep -> tab_rep
31. total_heap_blks -> heap_blks_total
32. tuple_cids -> tuplecids
33. WatchLatch -> WaitLatch
34. WriteAll -> SimpleLruWriteAll
35. PageIsPrunable -- remove // that define and the PageIsPrunable() check above were removed in dc7420c2c
Candidates for removal:
BARRIER_SHOULD_CHECK //unused since a3ed4d1ef
EXE_EXT // unused since f06b1c598
get_toast_for // unused since 860593ec3
SizeOfCommitTsSet // unused since 08aa89b32
v13+:
1. agg_init_trans_check -> agg_trans
2. agg_strict_trans_check -> agg_trans
3. amopclassopts -> amoptsprocnum //// since 911e70207
4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since 5da14938f; maybe this change should be backpatched
5. gist_intbig_ops -> gist__intbig_ops
6. gist_int_ops -> gist__int_ops
7. laftleft -> lastleft
8. lc_message -> locale_name // in accordance with the search_locale_enum() description
9. leftype -> lefttype
10. mksafefunc -> mkfunc // see 1f474d299
11. openSegment -> segment_open // in accordance with the WALRead() description
12. parse_util.c -> parse_utilcmd.c
13. process_innerer_partition -> process_inner_partition
14. read_spilled_tuple -> hashagg_batch_read
15. SortGroupNode -> SortGroupClause
16. SWITCH_WAL -> XLOG_SWITCH
17. tts_attr -> ttc_attr
18. tts_oldvalues -> ttc_oldvalues
19. tts_oldisnull -> ttc_oldisnull
20. tts_rel -> ttc_rel
21. taget -> target
22. WALSnd -> WalSnd
23. XLogRoutine -> XLogReaderRoutine
Candidates for removal:
endterm // see 60c90c16c -- Use xreflabel attributes instead of endterm attributes ...
package_tarname // not used since introduction in 1933ae629
my $clearpass = "FooBaR1"; // unreferenced since b846091fd
[1]: /messages/by-id/91284957-3cb2-944e-5f14-5c2ff86b49fa@iki.fi (0001-Refactor-LogicalTapeSet-LogicalTape-interface.patch)
(0001-Refactor-LogicalTapeSet-LogicalTape-interface.patch)
[2]: /messages/by-id/5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com
[3]: /messages/by-id/CALDaNm0ni+GAOe4+fbXiOxNrVudajMYmhJFtXGX-zBPoN8ixhw@mail.gmail.com
Best regards,
Alexander
Attachments:
typo-fixes-for-v14+.1-10.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v14+.1-10.patchDownload
diff --git a/config/config.sub b/config/config.sub
index de4259e404..3c26ae98b2 100644
--- a/config/config.sub
+++ b/config/config.sub
@@ -1721,7 +1721,7 @@ case $os in
# Likewise for "kernel-abi"
eabi* | gnueabi*)
;;
- # VxWorks passes extra cpu info in the 4th filed.
+ # VxWorks passes extra cpu info in the 4th field.
simlinux | simwindows | spe)
;;
# Now accept the basic system types.
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 5ab86238a9..bf3a2b843a 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -1478,7 +1478,7 @@ SlruPagePrecedesTestOffset(SlruCtl ctl, int per_page, uint32 offset)
*
* This assumes every uint32 >= FirstNormalTransactionId is a valid key. It
* assumes each value occupies a contiguous, fixed-size region of SLRU bytes.
- * (MultiXactMemberCtl separates flags from XIDs. AsyncCtl has
+ * (MultiXactMemberCtl separates flags from XIDs. NotifyCtl has
* variable-length entries, no keys, and no random access. These unit tests
* do not apply to them.)
*/
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 343fe61115..6536cf2418 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8017,7 +8017,7 @@ ATPrepDropExpression(Relation rel, AlterTableCmd *cmd, bool recurse, bool recurs
* is a bit complicated. GENERATED clauses must be attached to the column
* definition and cannot be added later like DEFAULT, so if a child table
* has a generation expression that the parent does not have, the child
- * column will necessarily be an attlocal column. So to implement ONLY
+ * column will necessarily be an attislocal column. So to implement ONLY
* here, we'd need extra code to update attislocal of the direct child
* tables, somewhat similar to how DROP COLUMN does it, so that the
* resulting state can be properly dumped and restored.
@@ -10930,7 +10930,7 @@ ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd, bool recurse,
}
/*
- * ATExecConstrRecurse already invalidated relcache for the relations
+ * ATExecAlterConstrRecurse already invalidated relcache for the relations
* having the constraint itself; here we also invalidate for relations
* that have any triggers that are part of the constraint.
*/
diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c
index d168620665..a6090167f5 100644
--- a/src/backend/optimizer/plan/planagg.c
+++ b/src/backend/optimizer/plan/planagg.c
@@ -386,7 +386,7 @@ build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo,
ntest = makeNode(NullTest);
ntest->nulltesttype = IS_NOT_NULL;
ntest->arg = copyObject(mminfo->target);
- /* we checked it wasn't a rowtype in find_minmax_aggs_walker */
+ /* we checked it wasn't a rowtype in can_minmax_aggs */
ntest->argisrow = false;
ntest->location = -1;
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index acf6cf4866..a723d9db78 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -957,7 +957,7 @@ stmtmulti: stmtmulti ';' toplevel_stmt
/*
* toplevel_stmt includes BEGIN and END. stmt does not include them, because
- * those words have different meanings in function bodys.
+ * those words have different meanings in function bodies.
*/
toplevel_stmt:
stmt
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 277a28fc13..4f86d44d6e 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -3069,7 +3069,7 @@ AtEOXact_Files(bool isCommit)
/*
* BeforeShmemExit_Files
*
- * before_shmem_access hook to clean up temp files during backend shutdown.
+ * before_shmem_exit hook to clean up temp files during backend shutdown.
* Here, we want to clean up *all* temp files including interXact ones.
*/
static void
diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c
index e406bea201..6052779d9c 100644
--- a/src/backend/storage/lmgr/spin.c
+++ b/src/backend/storage/lmgr/spin.c
@@ -37,7 +37,7 @@
#define NUM_EMULATION_SEMAPHORES (NUM_SPINLOCK_SEMAPHORES + NUM_ATOMICS_SEMAPHORES)
#else
#define NUM_EMULATION_SEMAPHORES (NUM_SPINLOCK_SEMAPHORES)
-#endif /* DISABLE_ATOMICS */
+#endif /* HAVE_ATOMICS */
PGSemaphore *SpinlockSemaArray;
diff --git a/src/bin/pg_rewind/rewind_source.h b/src/bin/pg_rewind/rewind_source.h
index 69ad0e495f..98af3b58ee 100644
--- a/src/bin/pg_rewind/rewind_source.h
+++ b/src/bin/pg_rewind/rewind_source.h
@@ -83,4 +83,4 @@ extern rewind_source *init_libpq_source(PGconn *conn);
/* in local_source.c */
extern rewind_source *init_local_source(const char *datadir);
-#endif /* FETCH_H */
+#endif /* REWIND_SOURCE_H */
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index bb6d4f0315..b19d50ecc2 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -358,7 +358,7 @@ typedef struct TableAmRoutine
* allowed by the AM.
*
* Implementations can assume that scan_set_tidrange is always called
- * before can_getnextslot_tidrange or after scan_rescan and before any
+ * before scan_getnextslot_tidrange or after scan_rescan and before any
* further calls to scan_getnextslot_tidrange.
*/
void (*scan_set_tidrange) (TableScanDesc scan,
typo-fixes-for-v14+.11-20.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v14+.11-20.patchDownload
diff --git a/doc/src/sgml/ref/pg_amcheck.sgml b/doc/src/sgml/ref/pg_amcheck.sgml
index cfef6c0465..20c2897acc 100644
--- a/doc/src/sgml/ref/pg_amcheck.sgml
+++ b/doc/src/sgml/ref/pg_amcheck.sgml
@@ -160,7 +160,7 @@ PostgreSQL documentation
Patterns may be unqualified, e.g. <literal>myrel*</literal>, or they
may be schema-qualified, e.g. <literal>myschema*.myrel*</literal> or
database-qualified and schema-qualified, e.g.
- <literal>mydb*.myscheam*.myrel*</literal>. A database-qualified
+ <literal>mydb*.myschema*.myrel*</literal>. A database-qualified
pattern will add matching databases to the list of databases to be
checked.
</para>
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index b300a4675e..0124f37911 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -1223,7 +1223,7 @@ heap_set_tidrange(TableScanDesc sscan, ItemPointer mintid,
* Calculate the first block and the number of blocks we must scan. We
* could be more aggressive here and perform some more validation to try
* and further narrow the scope of blocks to scan by checking if the
- * lowerItem has an offset above MaxOffsetNumber. In this case, we could
+ * lowestItem has an offset above MaxOffsetNumber. In this case, we could
* advance startBlk by one. Likewise, if highestItem has an offset of 0
* we could scan one fewer blocks. However, such an optimization does not
* seem worth troubling over, currently.
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index 3f0342351f..087424d37a 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -490,7 +490,7 @@ heap_page_prune(Relation relation, Buffer buffer,
*
* Due to its cost we also only want to call
* TransactionIdLimitedForOldSnapshots() if necessary, i.e. we might not have
- * done so in heap_hot_prune_opt() if pd_prune_xid was old enough. But we
+ * done so in heap_page_prune_opt() if pd_prune_xid was old enough. But we
* still want to be able to remove rows that are too new to be removed
* according to prstate->vistest, but that can be removed based on
* old_snapshot_threshold. So we call TransactionIdLimitedForOldSnapshots() on
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 0a9ebd22bd..a03a7ce453 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -2571,7 +2571,7 @@ lazy_vacuum_heap_page(LVRelState *vacrel, BlockNumber blkno, Buffer buffer,
END_CRIT_SECTION();
/*
- * Now that we have removed the LD_DEAD items from the page, once again
+ * Now that we have removed the LP_DEAD items from the page, once again
* check if the page has become all-visible. The page is already marked
* dirty, exclusively locked, and, if needed, a full page image has been
* emitted.
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index bf3a2b843a..9ddd5b811e 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -864,7 +864,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruWriteAll fdata)
else
{
/*
- * In the unlikely event that we exceed MAX_FLUSH_BUFFERS,
+ * In the unlikely event that we exceed MAX_WRITEALL_BUFFERS,
* fall back to treating it as a standalone write.
*/
fdata = NULL;
diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c
index 391d5de043..a8f927f540 100644
--- a/src/backend/utils/activity/backend_status.c
+++ b/src/backend/utils/activity/backend_status.c
@@ -283,7 +283,7 @@ pgstat_beinit(void)
*
* Apart from auxiliary processes, MyBackendId, MyDatabaseId,
* session userid, and application_name must be set for a
- * backend (hence, this cannot be combined with pgbestat_beinit).
+ * backend (hence, this cannot be combined with pgstat_beinit).
* Note also that we must be inside a transaction if this isn't an aux
* process, as we may need to do encoding conversion on some strings.
* ----------
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 729ebd86d1..c660fd3e70 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -4717,8 +4717,8 @@ pg_has_role_id_id(PG_FUNCTION_ARGS)
* Convert text string to AclMode value.
*
* We use USAGE to denote whether the privileges of the role are accessible
- * (has_privs), MEMBER to denote is_member, and MEMBER WITH GRANT OPTION
- * (or ADMIN OPTION) to denote is_admin. There is no ACL bit corresponding
+ * (has_privs_of_role), MEMBER to denote is_member, and MEMBER WITH GRANT
+ * (or ADMIN) OPTION to denote is_admin. There is no ACL bit corresponding
* to MEMBER so we cheat and use ACL_CREATE for that. This convention
* is shared only with pg_role_aclcheck, below.
*/
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index fe37e65af0..c4fcd0076e 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -4210,7 +4210,7 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,
* Process complex expressions, not just simple Vars.
*
* First, we search for an exact match of an expression. If we
- * find one, we can just discard the whole GroupExprInfo, with all
+ * find one, we can just discard the whole GroupVarInfo, with all
* the variables we extracted from it.
*
* Otherwise we inspect the individual vars, and try matching it
diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c
index 033647011b..67a1ab2ab2 100644
--- a/src/backend/utils/mb/mbutils.c
+++ b/src/backend/utils/mb/mbutils.c
@@ -453,7 +453,7 @@ pg_do_encoding_conversion(unsigned char *src, int len,
*
* The output is null-terminated.
*
- * If destlen < srclen * MAX_CONVERSION_LENGTH + 1, the converted output
+ * If destlen < srclen * MAX_CONVERSION_INPUT_LENGTH + 1, the converted output
* wouldn't necessarily fit in the output buffer, and the function will not
* convert the whole input.
*
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index ce0167c1b6..3c9f589278 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -872,7 +872,7 @@ extern ssize_t pg_GSS_write(PGconn *conn, const void *ptr, size_t len);
extern ssize_t pg_GSS_read(PGconn *conn, void *ptr, size_t len);
#endif
-/* === in libpq-trace.c === */
+/* === in fe-trace.c === */
extern void pqTraceOutputMessage(PGconn *conn, const char *message,
bool toServer);
typo-fixes-for-v14+.21-30.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v14+.21-30.patchDownload
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 56eafbff10..8b3de032ee 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -974,8 +974,8 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data,
*
* Even if new worker for this particular rel is restarted it
* won't be able to make any progress as we hold exclusive
- * lock on subscription_rel till the transaction end. It will
- * simply exit as there is no corresponding rel entry.
+ * lock on pg_subscription_rel till the transaction end. It
+ * will simply exit as there is no corresponding rel entry.
*
* This locking also ensures that the state of rels won't
* change till we are done with this refresh operation.
diff --git a/src/backend/partitioning/partdesc.c b/src/backend/partitioning/partdesc.c
index de06caccd2..7a2b5e57ff 100644
--- a/src/backend/partitioning/partdesc.c
+++ b/src/backend/partitioning/partdesc.c
@@ -55,7 +55,7 @@ static PartitionDesc RelationBuildPartitionDesc(Relation rel,
* RelationGetPartitionDesc -- get partition descriptor, if relation is partitioned
*
* We keep two partdescs in relcache: rd_partdesc includes all partitions
- * (even those being concurrently marked detached), while rd_partdesc_nodetach
+ * (even those being concurrently marked detached), while rd_partdesc_nodetached
* omits (some of) those. We store the pg_inherits.xmin value for the latter,
* to determine whether it can be validly reused in each case, since that
* depends on the active snapshot.
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 9f44974473..d6d48210ce 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -4010,7 +4010,7 @@ ReorderBufferStreamTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
* After that we need to reuse the snapshot from the previous run.
*
* Unlike DecodeCommit which adds xids of all the subtransactions in
- * snapshot's xip array via SnapBuildCommittedTxn, we can't do that here
+ * snapshot's xip array via SnapBuildCommitTxn, we can't do that here
* but we do add them to subxip array instead via ReorderBufferCopySnap.
* This allows the catalog changes made in subtransactions decoded till
* now to be visible.
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index fc05e2e293..db50301a63 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1760,7 +1760,7 @@ ComputeXidHorizons(ComputeXidHorizonsResult *h)
* current top-level xid any.
*
* Without an assigned xid we could use a horizon as aggressive as
- * ReadNewTransactionid(), but we can get away with the much cheaper
+ * GetNewTransactionId(), but we can get away with the much cheaper
* latestCompletedXid + 1: If this backend has no xid there, by
* definition, can't be any newer changes in the temp table than
* latestCompletedXid.
diff --git a/src/backend/utils/activity/pgstat_wal.c b/src/backend/utils/activity/pgstat_wal.c
index 94f1a3b06e..bcaed14d02 100644
--- a/src/backend/utils/activity/pgstat_wal.c
+++ b/src/backend/utils/activity/pgstat_wal.c
@@ -24,7 +24,7 @@
PgStat_PendingWalStats PendingWalStats = {0};
/*
- * WAL usage counters saved from pgWALUsage at the previous call to
+ * WAL usage counters saved from pgWalUsage at the previous call to
* pgstat_report_wal(). This is used to calculate how much WAL usage
* happens between pgstat_report_wal() calls, by subtracting
* the previous counters from the current ones.
diff --git a/src/include/nodes/queryjumble.h b/src/include/nodes/queryjumble.h
index 204b8f74fd..3499bfd4a0 100644
--- a/src/include/nodes/queryjumble.h
+++ b/src/include/nodes/queryjumble.h
@@ -11,8 +11,8 @@
*
*-------------------------------------------------------------------------
*/
-#ifndef QUERYJUBLE_H
-#define QUERYJUBLE_H
+#ifndef QUERYJUMBLE_H
+#define QUERYJUMBLE_H
#include "nodes/parsenodes.h"
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index 33ec6102c1..a1a93ad706 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -317,7 +317,7 @@
/*
* Recover memory used for relcache entries when invalidated. See
- * RelationBuildDescr() in src/backend/utils/cache/relcache.c.
+ * RelationBuildDesc() in src/backend/utils/cache/relcache.c.
*
* This is active automatically for clobber-cache builds when clobbering is
* active, but can be overridden here by explicitly defining
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
index 8ab6a88416..698124e887 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -1500,7 +1500,7 @@ getNotify(PGconn *conn)
}
/*
- * Store the strings right after the PQnotify structure so it can all be
+ * Store the strings right after the PGnotify structure so it can all be
* freed at once. We don't use NAMEDATALEN because we don't want to tie
* this interface to a specific server name length.
*/
diff --git a/src/test/recovery/t/023_pitr_prepared_xact.pl b/src/test/recovery/t/023_pitr_prepared_xact.pl
index 6f5a33623f..e55098ef7f 100644
--- a/src/test/recovery/t/023_pitr_prepared_xact.pl
+++ b/src/test/recovery/t/023_pitr_prepared_xact.pl
@@ -1,7 +1,7 @@
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
-# Test for point-in-time-recovery (PITR) with prepared transactions
+# Test for point-in-time recovery (PITR) with prepared transactions
use strict;
use warnings;
use PostgreSQL::Test::Cluster;
diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl
index 87381c0829..aa7714c533 100644
--- a/src/test/subscription/t/004_sync.pl
+++ b/src/test/subscription/t/004_sync.pl
@@ -149,7 +149,7 @@ $node_publisher->safe_psql('postgres', "DROP TABLE tab_rep_next");
$node_subscriber->safe_psql('postgres', "DROP TABLE tab_rep_next");
$node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub");
-# Table tap_rep already has the same records on both publisher and subscriber
+# Table tab_rep already has the same records on both publisher and subscriber
# at this time. Recreate the subscription which will do the initial copy of
# the table again and fails due to unique constraint violation.
$node_subscriber->safe_psql('postgres',
typo-fixes-for-v14+.31-35.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v14+.31-35.patchDownload
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index e2e35b71ea..cbb35aa73d 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -816,7 +816,7 @@ heapam_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap,
* If the last pages of the scan were empty, we would go to
* the next phase while heap_blks_scanned != heap_blks_total.
* Instead, to ensure that heap_blks_scanned is equivalent to
- * total_heap_blks after the table scan phase, this parameter
+ * heap_blks_total after the table scan phase, this parameter
* is manually updated to the correct value when the table
* scan finishes.
*/
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index 087424d37a..20df39c149 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -198,8 +198,7 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
/*
* Now that we have buffer lock, get accurate information about the
* page's free space, and recheck the heuristic about whether to
- * prune. (We needn't recheck PageIsPrunable, since no one else could
- * have pruned while we hold pin.)
+ * prune.
*/
if (PageIsFull(page) || PageGetHeapFreeSpace(page) < minfree)
{
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 9ddd5b811e..edea06827d 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -809,7 +809,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int pageno, int slotno, SlruWriteAll fdata)
}
/*
- * During a WriteAll, we may already have the desired file open.
+ * During a SimpleLruWriteAll, we may already have the desired file open.
*/
if (fdata)
{
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index d6d48210ce..b85b890010 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -1885,7 +1885,7 @@ ReorderBufferStreamCommit(ReorderBuffer *rb, ReorderBufferTXN *txn)
/*
* This is a PREPARED transaction, part of a two-phase commit. The
* full cleanup will happen as part of the COMMIT PREPAREDs, so now
- * just truncate txn by removing changes and tuple_cids.
+ * just truncate txn by removing changes and tuplecids.
*/
ReorderBufferTruncateTXN(rb, txn, true);
/* Reset the CheckXidAlive */
diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c
index f4123e7de7..cdb95c1931 100644
--- a/src/backend/storage/ipc/latch.c
+++ b/src/backend/storage/ipc/latch.c
@@ -151,7 +151,7 @@ struct WaitEventSet
#endif
};
-/* A common WaitEventSet used to implement WatchLatch() */
+/* A common WaitEventSet used to implement WaitLatch() */
static WaitEventSet *LatchWaitSet;
/* The position of the latch in LatchWaitSet. */
typo-fixes-for-v13+.1-10.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v13+.1-10.patchDownload
diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h
index a52ec38ba4..0352cbd368 100644
--- a/contrib/intarray/_int.h
+++ b/contrib/intarray/_int.h
@@ -15,7 +15,7 @@
((GISTIntArrayOptions *) PG_GET_OPCLASS_OPTIONS())->num_ranges : \
G_INT_NUMRANGES_DEFAULT)
-/* gist_int_ops opclass options */
+/* gist__int_ops opclass options */
typedef struct
{
int32 vl_len_; /* varlena header (do not touch directly!) */
@@ -80,7 +80,7 @@ typedef char *BITVECP;
#define HASHVAL(val, siglen) (((unsigned int)(val)) % SIGLENBIT(siglen))
#define HASH(sign, val, siglen) SETBIT((sign), HASHVAL(val, siglen))
-/* gist_intbig_ops opclass options */
+/* gist__intbig_ops opclass options */
typedef struct
{
int32 vl_len_; /* varlena header (do not touch directly!) */
diff --git a/src/backend/access/nbtree/nbtsplitloc.c b/src/backend/access/nbtree/nbtsplitloc.c
index ecb49bb471..43b67893d9 100644
--- a/src/backend/access/nbtree/nbtsplitloc.c
+++ b/src/backend/access/nbtree/nbtsplitloc.c
@@ -119,7 +119,7 @@ static inline IndexTuple _bt_split_firstright(FindSplitData *state,
* righthand page (which is called firstrightoff), plus a boolean
* indicating whether the new tuple goes on the left or right page. You
* can think of the returned state as a point _between_ two adjacent data
- * items (laftleft and firstright data items) on an imaginary version of
+ * items (lastleft and firstright data items) on an imaginary version of
* origpage that already includes newitem. The bool is necessary to
* disambiguate the case where firstrightoff == newitemoff (i.e. it is
* sometimes needed to determine if the firstright tuple for the split is
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 864e35e45b..5f7ee23886 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -819,7 +819,7 @@ AlterOpFamily(AlterOpFamilyStmt *stmt)
Oid amoid, /* our AM's oid */
opfamilyoid; /* oid of opfamily */
int maxOpNumber, /* amstrategies value */
- optsProcNumber, /* amopclassopts value */
+ optsProcNumber, /* amoptsprocnum value */
maxProcNumber; /* amsupport value */
HeapTuple tup;
Form_pg_am amform;
@@ -1321,7 +1321,7 @@ assignProcTypes(OpFamilyMember *member, Oid amoid, Oid typeoid,
/*
* pg_amproc functions are indexed by (lefttype, righttype), but
* an equalimage function can only be called at CREATE INDEX time.
- * The same opclass opcintype OID is always used for leftype and
+ * The same opclass opcintype OID is always used for lefttype and
* righttype. Providing a cross-type routine isn't sensible.
* Reject cross-type ALTER OPERATOR FAMILY ... ADD FUNCTION 4
* statements here.
diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c
index daefe66f40..cc6e4a8575 100644
--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -2121,8 +2121,8 @@ llvm_compile_expr(ExprState *state)
/*
* pergroup = &aggstate->all_pergroups
- * [op->d.agg_strict_trans_check.setoff]
- * [op->d.agg_init_trans_check.transno];
+ * [op->d.agg_trans.setoff]
+ * [op->d.agg_trans.transno];
*/
v_allpergroupsp =
l_load_struct_gep(b, v_aggstatep,
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index d2ec396045..59347ab951 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -135,7 +135,7 @@ static const char *const BuiltinTrancheNames[] = {
/* LWTRANCHE_XACT_BUFFER: */
"XactBuffer",
/* LWTRANCHE_COMMITTS_BUFFER: */
- "CommitTSBuffer",
+ "CommitTsBuffer",
/* LWTRANCHE_SUBTRANS_BUFFER: */
"SubtransBuffer",
/* LWTRANCHE_MULTIXACTOFFSET_BUFFER: */
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 51df570ce9..f0b6567da1 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -1012,7 +1012,7 @@ search_locale_enum(LPWSTR pStr, DWORD dwFlags, LPARAM lparam)
{
/*
* If the enumerated locale does not have a hyphen ("en") OR the
- * lc_message input does not have an underscore ("English"), we only
+ * locale_name input does not have an underscore ("English"), we only
* need to compare the <Language> tags.
*/
if (wcsrchr(pStr, '-') == NULL || wcsrchr(argv[0], '_') == NULL)
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index d7d9c1bee3..3f343fff16 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -2109,7 +2109,7 @@ plperl_create_sub(plperl_proc_desc *prodesc, const char *s, Oid fn_oid)
/*
* G_KEEPERR seems to be needed here, else we don't recognize compile
* errors properly. Perhaps it's because there's another level of eval
- * inside mksafefunc?
+ * inside mkfunc?
*/
count = call_pv("PostgreSQL::InServer::mkfunc",
G_SCALAR | G_EVAL | G_KEEPERR);
typo-fixes-for-v13+.11-20.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v13+.11-20.patchDownload
diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c
index 9a86fb3fef..8e9afaff30 100644
--- a/src/backend/access/gist/gistxlog.c
+++ b/src/backend/access/gist/gistxlog.c
@@ -580,7 +580,7 @@ gistXLogAssignLSN(void)
int dummy = 0;
/*
- * Records other than SWITCH_WAL must have content. We use an integer 0 to
+ * Records other than XLOG_SWITCH must have content. We use an integer 0 to
* follow the restriction.
*/
XLogBeginInsert();
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index cadea21b37..133b09dd69 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -1513,7 +1513,7 @@ WALRead(XLogReaderState *state,
/*
* If the data we want is not in a segment we have open, close what we
* have (if anything) and open the next one, using the caller's
- * provided openSegment callback.
+ * provided segment_open callback.
*/
if (state->seg.ws_file < 0 ||
!XLByteInSeg(recptr, state->seg.ws_segno, state->segcxt.ws_segsize) ||
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 6536cf2418..c7a8a689b7 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -2984,7 +2984,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence,
* generated column, we'll take its generation expression in
* preference to the parent's. We must check that the child
* column doesn't specify a default value or identity, which
- * matches the rules for a single column in parse_util.c.
+ * matches the rules for a single column in parse_utilcmd.c.
*
* Conversely, if the parent column is not generated, the
* child column can't be either. (We used to allow that, but
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 3aab5a0e80..e71911aa46 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -3006,7 +3006,7 @@ hashagg_batch_new(LogicalTape *input_tape, int setno,
}
/*
- * read_spilled_tuple
+ * hashagg_batch_read
* read the next tuple from a batch's tape. Return NULL if no more.
*/
static MinimalTuple
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index cf1156b842..c685621416 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -2340,7 +2340,7 @@ merge_default_partitions(PartitionMap *outer_map,
/*
* The default partitions have to be joined with each other, so merge
* them. Note that each of the default partitions isn't merged yet
- * (see, process_outer_partition()/process_innerer_partition()), so
+ * (see, process_outer_partition()/process_inner_partition()), so
* they should be merged successfully. The merged partition will act
* as the default partition of the join relation.
*/
diff --git a/src/include/access/toast_helper.h b/src/include/access/toast_helper.h
index 96d8e5a685..e971bd2c8e 100644
--- a/src/include/access/toast_helper.h
+++ b/src/include/access/toast_helper.h
@@ -43,7 +43,7 @@ typedef struct
/*
* Before calling toast_tuple_init, the caller must initialize the
* following fields. Each array must have a length equal to
- * ttc_rel->rd_att->natts. The tts_oldvalues and tts_oldisnull fields
+ * ttc_rel->rd_att->natts. The ttc_oldvalues and ttc_oldisnull fields
* should be NULL in the case of an insert.
*/
Relation ttc_rel; /* the relation that contains the tuple */
@@ -53,9 +53,9 @@ typedef struct
bool *ttc_oldisnull; /* null flags from previous tuple */
/*
- * Before calling toast_tuple_init, the caller should set tts_attr to
+ * Before calling toast_tuple_init, the caller should set ttc_attr to
* point to an array of ToastAttrInfo structures of a length equal to
- * tts_rel->rd_att->natts. The contents of the array need not be
+ * ttc_rel->rd_att->natts. The contents of the array need not be
* initialized. ttc_flags also does not need to be initialized.
*/
uint8 ttc_flags;
diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h
index e63b399b8d..20921b45b9 100644
--- a/src/include/nodes/nodeFuncs.h
+++ b/src/include/nodes/nodeFuncs.h
@@ -29,7 +29,7 @@ struct PlanState; /* avoid including execnodes.h too */
#define QTW_EXAMINE_RTES_AFTER 0x20 /* examine RTE nodes after their
* contents */
#define QTW_DONT_COPY_QUERY 0x40 /* do not copy top Query */
-#define QTW_EXAMINE_SORTGROUP 0x80 /* include SortGroupNode lists */
+#define QTW_EXAMINE_SORTGROUP 0x80 /* include SortGroupClause lists */
/* callback function for check_functions_in_node */
typedef bool (*check_function_callback) (Oid func_id, void *context);
typo-fixes-for-v13+.21-23.patchtext/x-patch; charset=UTF-8; name=typo-fixes-for-v13+.21-23.patchDownload
diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c
index eb280d4893..6979aff727 100644
--- a/contrib/amcheck/verify_nbtree.c
+++ b/contrib/amcheck/verify_nbtree.c
@@ -104,7 +104,7 @@ typedef struct BtreeCheckState
/*
* The rightlink and incomplete split flag of block one level down to the
- * target page, which was visited last time via downlink from taget page.
+ * target page, which was visited last time via downlink from target page.
* We use it to check for missing downlinks.
*/
BlockNumber prevrightlink;
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 133b09dd69..631f260f79 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -1476,7 +1476,7 @@ err:
}
/*
- * Helper function to ease writing of XLogRoutine->page_read callbacks.
+ * Helper function to ease writing of XLogReaderRoutine->page_read callbacks.
* If this function is used, caller must supply a segment_open callback in
* 'state', as that is used here.
*
diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c
index 889e20b5dd..c263a59690 100644
--- a/src/backend/replication/syncrep.c
+++ b/src/backend/replication/syncrep.c
@@ -804,7 +804,7 @@ standby_priority_comparator(const void *a, const void *b)
/*
* We might have equal priority values; arbitrarily break ties by position
- * in the WALSnd array. (This is utterly bogus, since that is arrival
+ * in the WalSnd array. (This is utterly bogus, since that is arrival
* order dependent, but there are regression tests that rely on it.)
*/
return sa->walsnd_index - sb->walsnd_index;
On Fri, Apr 21, 2023 at 12:00:00PM +0300, Alexander Lakhin wrote:
Please look at the following two bunches for v14+ and v13+ (split to ease
back-patching if needed). Having processed them, I've reached the state that
could be considered "clean" ([2], [3]); at least I don't see how to detect
yet more errors of this class in dozens, so it's my last run for now (though I
have several entities left, which I couldn't find replacements for).
This was hanging around, and I had some time, so I have looked at the
whole. One of the only two user-visible change was in the docs for
pg_amcheck, so I have applied that first as of 6fd8ae6 and backpatched
it down to 14.
Now, for the remaining 59..
1. agg_init_trans_check -> agg_trans
2. agg_strict_trans_check -> agg_trans
/*
* pergroup = &aggstate->all_pergroups
- * [op->d.agg_strict_trans_check.setoff]
- * [op->d.agg_init_trans_check.transno];
+ * [op->d.agg_trans.setoff]
+ * [op->d.agg_trans.transno];
*/
Honestly, while incorrect, I have no idea what this comment means ;)
4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since 5da14938f; maybe this change should be backpatched
Yes, we'd better backpatch that. I agree that it seems more sensible
here to switch the compiled value rather than what the docs have been
using for years. Perhaps somebody has a different opinion?
The others were OK and in line with the discussion of upthread, so
applied.
--
Michael
On Tue, May 02, 2023 at 12:26:31PM +0900, Michael Paquier wrote:
On Fri, Apr 21, 2023 at 12:00:00PM +0300, Alexander Lakhin wrote:
4. CommitTSBuffer -> CommitTsBuffer // the inconsistency exists since 5da14938f; maybe this change should be backpatched
Yes, we'd better backpatch that. I agree that it seems more sensible
here to switch the compiled value rather than what the docs have been
using for years. Perhaps somebody has a different opinion?
Hearing nothing, I have now applied this part down to 13, on time for
the next minor release.
--
Michael