typos
Attachments:
0009-typos-a-vs-an.patchtext/x-diff; charset=us-asciiDownload
From 29c8a8903a282501e133a3a2bd1a4e835a8cc781 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 9 May 2022 10:52:34 -0500
Subject: [PATCH 09/16] typos: a vs an
---
src/backend/access/spgist/spgutils.c | 2 +-
src/backend/utils/adt/ruleutils.c | 2 +-
src/include/access/relscan.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c
index 2c661fcf96f..f2da02eb52d 100644
--- a/src/backend/access/spgist/spgutils.c
+++ b/src/backend/access/spgist/spgutils.c
@@ -1301,7 +1301,7 @@ spgproperty(Oid index_oid, int attno,
/*
* Currently, SP-GiST distance-ordered scans require that there be a
* distance operator in the opclass with the default types. So we assume
- * that if such a operator exists, then there's a reason for it.
+ * that if such an operator exists, then there's a reason for it.
*/
/* First we need to know the column's opclass. */
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 641df1cabe2..cdb40581d5a 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -11391,7 +11391,7 @@ get_opclass_name(Oid opclass, Oid actual_datatype,
/*
* generate_opclass_name
- * Compute the name to display for a opclass specified by OID
+ * Compute the name to display for an opclass specified by OID
*
* The result includes all necessary quoting and schema-prefixing.
*/
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index 53a93ccbe71..5a328626fa3 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -58,7 +58,7 @@ typedef struct TableScanDescData *TableScanDesc;
* TableScanDesc in backend-private memory, and those objects all contain a
* pointer to this structure. The information here must be sufficient to
* properly initialize each new TableScanDesc as workers join the scan, and it
- * must act as a information what to scan for those workers.
+ * must provide information what to scan for those workers.
*/
typedef struct ParallelTableScanDescData
{
--
2.25.1
0010-comments-grammar-extended-and-other-stats.patchtext/x-diff; charset=us-asciiDownload
From 8cef256600d865bb26eb1f7eef5a70f2ffddb2e4 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 10/16] comments grammar: extended (and other) stats
See:
202109272104.7t253iw236fb@alvherre.pgsql
070d2e19e40897d857f570f24888fc30727ed9c0
609b0652af00374b89411ea2613fd5bb92bca92c
a4d75c86bf15220df22de0a92c819ecef9db3849
7300a699502fe5432b05fbc75baca534b080bebb
ccaa3569f58796868303629bc2d63ddddb599b38
---
src/backend/commands/statscmds.c | 4 ++--
src/backend/statistics/README | 2 +-
src/backend/statistics/dependencies.c | 8 ++++----
src/backend/statistics/extended_stats.c | 4 ++--
src/backend/utils/adt/pgstatfuncs.c | 4 ++--
src/backend/utils/adt/ruleutils.c | 2 +-
src/include/statistics/extended_stats_internal.h | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 9cfd55d6fc7..64db846ceed 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -377,7 +377,7 @@ CreateStatistics(CreateStatsStmt *stmt)
/*
* If no statistic type was specified, build them all (but only when the
- * statistics is defined on more than one column/expression).
+ * statistics object is defined on more than one column/expression).
*/
if ((!requested_type) && (numcols >= 2))
{
@@ -432,7 +432,7 @@ CreateStatistics(CreateStatsStmt *stmt)
* similar to why we don't bother with extracting columns from
* expressions. It's either expensive or very easy to defeat for
* determined user, and there's no risk if we allow such statistics (the
- * statistics is useless, but harmless).
+ * statistic is useless, but harmless).
*/
foreach(cell, stxexprs)
{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
Compatible clause types
-----------------------
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
(a) functional dependencies - equality clauses (AND), possibly IS NULL
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 744bc512b65..10bccbe9f72 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -846,7 +846,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
AttrNumber clause_attnum;
/*
- * Had we found incompatible clause in the arguments, treat the
+ * If we found an incompatible clause in the arguments, treat the
* whole clause as incompatible.
*/
if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1274,7 +1274,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
Node *or_expr = NULL;
/*
- * Had we found incompatible expression in the arguments, treat
+ * If we found an incompatible expression in the arguments, treat
* the whole expression as incompatible.
*/
if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
@@ -1725,7 +1725,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
/*
* For expressions, we need to do two translations. First
- * we have to translate the negative attnum to index in
+ * we have to translate the negative attnum to an index in
* the list of expressions (in the statistics object).
* Then we need to see if there's a matching clause. The
* index of the unique expression determines the attnum
@@ -1733,7 +1733,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
*/
idx = -(1 + attnum);
- /* Is the expression index is valid? */
+ /* Is the expression index valid? */
Assert((idx >= 0) && (idx < list_length(stat->exprs)));
expr = (Node *) list_nth(stat->exprs, idx);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index c1652cb4c51..cd0e998a3c2 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1214,8 +1214,8 @@ stat_covers_expressions(StatisticExtInfo *stat, List *exprs,
/*
* choose_best_statistics
- * Look for and return statistics with the specified 'requiredkind' which
- * have keys that match at least two of the given attnums. Return NULL if
+ * Look for and return the statistics object with the specified 'requiredkind' which
+ * has keys that match at least two of the given attnums. Return NULL if
* there's no match.
*
* The current selection criteria is very simple - we choose the statistics
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 46f98fd67f5..addab4031e2 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1749,7 +1749,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
}
/*
- * Get the statistics for the replication slot. If the slot statistics is not
+ * Get the statistics for the replication slot. If the slot statistics are not
* available, return all-zeroes stats.
*/
Datum
@@ -1821,7 +1821,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
/*
* Get the subscription statistics for the given subscription. If the
- * subscription statistics is not available, return all-zeros stats.
+ * subscription statistics are not available, return all-zeros stats.
*/
Datum
pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index cdb40581d5a..99a9cf49b5f 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1699,7 +1699,7 @@ pg_get_statisticsobj_worker(Oid statextid, bool columns_only, bool missing_ok)
* will create all statistics types on a newer postgres version, if
* the statistics had all options enabled on the original version.
*
- * But if the statistics is defined on just a single column, it has to
+ * But if the statistics are defined on just a single column, it has to
* be an expression statistics. In that case we don't need to specify
* kinds.
*/
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index 906919d88ec..f34c4c28098 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -57,7 +57,7 @@ typedef struct SortItem
int count;
} SortItem;
-/* a unified representation of the data the statistics is built on */
+/* a unified representation of the data the statistics object is built on */
typedef struct StatsBuildData
{
int numrows;
--
2.25.1
0001-doc-autoexplain-fix-tag-v16.patchtext/x-diff; charset=us-asciiDownload
From b2ce7e523abbe7cc91f08caa70eaa9e9c2526267 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 19 Oct 2022 22:04:50 -0500
Subject: [PATCH 01/16] doc: autoexplain: fix tag (v16)
since: d4bfe41281705c1bcb7093b3d07ce5ff1114341b
https://www.postgresql.org/docs/devel/auto-explain.html
---
doc/src/sgml/auto-explain.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/auto-explain.sgml b/doc/src/sgml/auto-explain.sgml
index 394fec94e88..0899e55e4ca 100644
--- a/doc/src/sgml/auto-explain.sgml
+++ b/doc/src/sgml/auto-explain.sgml
@@ -73,7 +73,7 @@ LOAD 'auto_explain';
<listitem>
<para>
<varname>auto_explain.log_parameter_max_length</varname> controls the
- logging of query parameter values. A value of<literal>-1</literal> (the
+ logging of query parameter values. A value of <literal>-1</literal> (the
default) logs the parameter values in full. <literal>0</literal> disables
logging of parameter values. A value greater than zero truncates each
parameter value to that many bytes. Only superusers can change this
--
2.25.1
0002-doc-acronym-UTF.patchtext/x-diff; charset=us-asciiDownload
From 631bf8b4ec4c1ece010633ea94cd3a715d7d4134 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:46:20 -0500
Subject: [PATCH 02/16] doc: acronym: UTF
for consistency
---
doc/src/sgml/charset.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 445fd175d8e..b3376ee3162 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -74,7 +74,7 @@ initdb --locale=sv_SE
locale then the specifications can take the form
<replaceable>language_territory.codeset</replaceable>. For example,
<literal>fr_BE.UTF-8</literal> represents the French language (fr) as
- spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set
+ spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character set
encoding.
</para>
--
2.25.1
0003-doc-typo-since-v10.patchtext/x-diff; charset=us-asciiDownload
From 4560d86efb47c3847357fc272b5243b6d823a418 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 2 Aug 2022 09:12:00 -0500
Subject: [PATCH 03/16] doc: typo since v10
---
doc/src/sgml/ref/alter_table.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 43d782fea90..b1066e0efc3 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -1005,7 +1005,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
constraint. This does not work, however, if any of the partition keys
is an expression and the partition does not accept
<literal>NULL</literal> values. If attaching a list partition that will
- not accept <literal>NULL</literal> values, also add
+ not accept <literal>NULL</literal> values, also add a
<literal>NOT NULL</literal> constraint to the partition key column,
unless it's an expression.
</para>
--
2.25.1
0004-doc-language-fix.patchtext/x-diff; charset=us-asciiDownload
From 3f90597c3c175b8bb52584a61489cffcc3a24502 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 7 Sep 2022 13:57:44 -0500
Subject: [PATCH 04/16] doc: language fix
https://www.postgresql.org/message-id/166003595133.302446.16110073265340131615%40wrigleys.postgresql.org
---
doc/src/sgml/parallel.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml
index e556786e2bd..5acc9537d6f 100644
--- a/doc/src/sgml/parallel.sgml
+++ b/doc/src/sgml/parallel.sgml
@@ -128,7 +128,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
<para>
In addition, the system must not be running in single-user mode. Since
- the entire database system is running in single process in this situation,
+ the entire database system is running as a single process in this situation,
no background workers will be available.
</para>
--
2.25.1
0005-doc-comma.patchtext/x-diff; charset=us-asciiDownload
From 872ccbe2855d1d8e7b107f52629fc18aa6a87b47 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 22 Feb 2022 07:44:06 -0600
Subject: [PATCH 05/16] doc: comma
---
doc/src/sgml/ref/alter_table.sgml | 2 +-
doc/src/sgml/ref/create_subscription.sgml | 2 +-
doc/src/sgml/sources.sgml | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index b1066e0efc3..892df57f702 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -1377,7 +1377,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
type or an unconstrained domain over the new type, a table rewrite is not
needed. However, indexes must always be rebuilt unless the system can
verify that the new index would be logically equivalent to the existing
- one. For example, if the collation for a column has been changed an index
+ one. For example, if the collation for a column has been changed, an index
rebuild is always required because the new sort order might be different.
However, in the absence of a collation change, a column can be changed
from <type>text</type> to <type>varchar</type> (or vice versa) without
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml
index f9a1776380b..90bd70050dd 100644
--- a/doc/src/sgml/ref/create_subscription.sgml
+++ b/doc/src/sgml/ref/create_subscription.sgml
@@ -383,7 +383,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
<literal>FOR TABLES IN SCHEMA</literal>, rows are always published
regardless of the definition of the other expressions.
If the subscriber is a <productname>PostgreSQL</productname> version before
- 15 then any row filtering is ignored during the initial data synchronization
+ 15, then any row filtering is ignored during the initial data synchronization
phase. For this case, the user might want to consider deleting any initially
copied data that would be incompatible with subsequent filtering.
Because initial data synchronization does not take into account the publication
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index 5186d75d616..e0a6f775b6e 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -935,8 +935,8 @@ BETTER: unrecognized node type: 42
<simplesect>
<title>Function-Like Macros and Inline Functions</title>
<para>
- Both, macros with arguments and <literal>static inline</literal>
- functions, may be used. The latter are preferable if there are
+ Both macros with arguments and <literal>static inline</literal>
+ functions may be used. The latter are preferable if there are
multiple-evaluation hazards when written as a macro, as e.g., the
case with
<programlisting>
--
2.25.1
0006-typos.patchtext/x-diff; charset=us-asciiDownload
From 759288c53d30d32c608d0316df06f645ffa4dccf Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:40:36 -0500
Subject: [PATCH 06/16] typos
---
.cirrus.yml | 12 ++++++------
doc/src/sgml/ref/grant.sgml | 2 +-
meson.build | 4 ++--
src/backend/optimizer/util/tlist.c | 2 +-
src/bin/pg_dump/pg_dumpall.c | 2 +-
src/include/lib/ilist.h | 2 +-
src/test/regress/expected/copy.out | 2 +-
src/test/regress/expected/expressions.out | 2 +-
src/test/regress/sql/copy.sql | 2 +-
src/test/regress/sql/expressions.sql | 2 +-
src/test/ssl/t/SSL/Server.pm | 2 +-
11 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index 993af888659..082ba84c2b2 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -11,7 +11,7 @@ env:
CONTAINER_REPO: us-docker.pkg.dev/${GCP_PROJECT}/ci
# The lower depth accelerates git clone. Use a bit of depth so that
- # concurrent tasks and retrying older jobs has a chance of working.
+ # concurrent tasks and retrying older jobs have a chance of working.
CIRRUS_CLONE_DEPTH: 500
# Useful to be able to analyse what in a script takes long
CIRRUS_LOG_TIMESTAMP: true
@@ -47,7 +47,7 @@ on_failure_meson: &on_failure_meson
# In theory it'd be nice to upload the junit files meson generates, so that
# cirrus will nicely annotate the commit. Unfortunately the files don't
- # contain identifieable file + line numbers right now, so the annotations
+ # contain identifiable file + line numbers right now, so the annotations
# don't end up useful. We could probably improve on that with a some custom
# conversion script, but ...
meson_log_artifacts:
@@ -160,7 +160,7 @@ task:
ccache_cache:
folder: $CCACHE_DIR
- # Workaround around performance issues due to 32KB block size
+ # Work around performance issues due to 32KB block size
repartition_script: src/tools/ci/gcp_freebsd_repartition.sh
create_user_script: |
pw useradd postgres
@@ -251,7 +251,7 @@ task:
DEBUGINFOD_URLS: "https://debuginfod.debian.net"
# Enable a reasonable set of sanitizers. Use the linux task for that, as
- # it one of the fastest tasks (without sanitizers). Also several of the
+ # it's one of the fastest tasks (without sanitizers). Also several of the
# sanitizers work best on linux.
#
# The overhead of alignment sanitizer is low, undefined behaviour has
@@ -600,7 +600,7 @@ task:
CCACHE_MAXSIZE: "500M"
CCACHE_SLOPPINESS: pch_defines,time_macros
CCACHE_DEPEND: 1
- # for some reason mingw plpython cannot find it's installation without this
+ # for some reason mingw plpython cannot find its installation without this
PYTHONHOME: C:/msys64/ucrt64
# prevents MSYS bash from resetting error mode
MSYS: winjitdebug
@@ -655,7 +655,7 @@ task:
# Use larger ccache cache, as this task compiles with multiple compilers /
# flag combinations
- CCACHE_MAXSIZE: "1GB"
+ CCACHE_MAXSIZE: "1G"
CCACHE_DIR: "/tmp/ccache_dir"
LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml
index c8ca2b1d641..518bdb32d82 100644
--- a/doc/src/sgml/ref/grant.sgml
+++ b/doc/src/sgml/ref/grant.sgml
@@ -253,7 +253,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace
in a role to one or more other roles. Membership in a role is significant
because it potentially allows access to the privileges granted to a role
to each of its members, and potentially also the ability to make changes
- to the role itself. However, the actual permisions conferred depend on
+ to the role itself. However, the actual permissions conferred depend on
the options associated with the grant.
</para>
diff --git a/meson.build b/meson.build
index b872470cdfe..c60dc2c4111 100644
--- a/meson.build
+++ b/meson.build
@@ -21,7 +21,7 @@ project('postgresql',
'buildtype=release',
# For compatibility with the autoconf build, set a default prefix. This
# works even on windows, where it's a drive-relative path (i.e. when on
- # d:/sompath it'll install to d:/usr/local/pgsql)
+ # d:/somepath it'll install to d:/usr/local/pgsql)
'prefix=/usr/local/pgsql',
]
)
@@ -1078,7 +1078,7 @@ if not get_option('readline').disabled()
if not at_least_one_header_found
error('''readline header not found
-If you have @0@ already installed, see see meson-log/meson-log.txt for details on the
+If you have @0@ already installed, see meson-log/meson-log.txt for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use -Dreadline=false to disable readline support.'''.format(readline_dep))
endif
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c
index 784a1af82df..eed3e3fb75a 100644
--- a/src/backend/optimizer/util/tlist.c
+++ b/src/backend/optimizer/util/tlist.c
@@ -865,7 +865,7 @@ apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target)
*
* The outputs of this function are two parallel lists, one a list of
* PathTargets and the other an integer list of bool flags indicating
- * whether the corresponding PathTarget contains any evaluatable SRFs.
+ * whether the corresponding PathTarget contains any evaluable SRFs.
* The lists are given in the order they'd need to be evaluated in, with
* the "lowest" PathTarget first. So the last list entry is always the
* originally given PathTarget, and any entries before it indicate evaluation
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 7b40081678b..6f351034039 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -1034,7 +1034,7 @@ dumpRoleMembership(PGconn *conn)
ht = rolename_create(remaining, NULL);
/*
- * Make repeated passses over the grants for this role until all have
+ * Make repeated passes over the grants for this role until all have
* been dumped.
*/
while (remaining > 0)
diff --git a/src/include/lib/ilist.h b/src/include/lib/ilist.h
index 3c543e7c365..d7c4b2da5ed 100644
--- a/src/include/lib/ilist.h
+++ b/src/include/lib/ilist.h
@@ -162,7 +162,7 @@ typedef struct dlist_head
/*
- * Doubly linked list iterator type for dlist_head and and dclist_head types.
+ * Doubly linked list iterator type for dlist_head and dclist_head types.
*
* Used as state in dlist_foreach() and dlist_reverse_foreach() (and the
* dclist variant thereof).
diff --git a/src/test/regress/expected/copy.out b/src/test/regress/expected/copy.out
index 3fad1c52d1f..8a8bf43fdea 100644
--- a/src/test/regress/expected/copy.out
+++ b/src/test/regress/expected/copy.out
@@ -182,7 +182,7 @@ create table header_copytest (
b int,
c text
);
--- Make sure it works with with dropped columns
+-- Make sure it works with dropped columns
alter table header_copytest drop column c;
alter table header_copytest add column c text;
copy header_copytest to stdout with (header match);
diff --git a/src/test/regress/expected/expressions.out b/src/test/regress/expected/expressions.out
index df432d4c927..2d5342ab281 100644
--- a/src/test/regress/expected/expressions.out
+++ b/src/test/regress/expected/expressions.out
@@ -86,7 +86,7 @@ WARNING: TIMESTAMP(7) precision reduced to maximum allowed, 6
t
(1 row)
--- current_role/user/user is tested in rolnames.sql
+-- current_role/user/user is tested in rolenames.sql
-- current database / catalog
SELECT current_catalog = current_database();
?column?
diff --git a/src/test/regress/sql/copy.sql b/src/test/regress/sql/copy.sql
index 285022e07c6..f9da7b1508f 100644
--- a/src/test/regress/sql/copy.sql
+++ b/src/test/regress/sql/copy.sql
@@ -204,7 +204,7 @@ create table header_copytest (
b int,
c text
);
--- Make sure it works with with dropped columns
+-- Make sure it works with dropped columns
alter table header_copytest drop column c;
alter table header_copytest add column c text;
copy header_copytest to stdout with (header match);
diff --git a/src/test/regress/sql/expressions.sql b/src/test/regress/sql/expressions.sql
index fea5358d252..d315ef5af50 100644
--- a/src/test/regress/sql/expressions.sql
+++ b/src/test/regress/sql/expressions.sql
@@ -29,7 +29,7 @@ SELECT current_timestamp = current_timestamp(7);
SELECT localtime = localtime(7);
SELECT localtimestamp = localtimestamp(7);
--- current_role/user/user is tested in rolnames.sql
+-- current_role/user/user is tested in rolenames.sql
-- current database / catalog
SELECT current_catalog = current_database();
diff --git a/src/test/ssl/t/SSL/Server.pm b/src/test/ssl/t/SSL/Server.pm
index 9520578e7d9..0a9e5da01e4 100644
--- a/src/test/ssl/t/SSL/Server.pm
+++ b/src/test/ssl/t/SSL/Server.pm
@@ -257,7 +257,7 @@ The certificate file to use. Implementation is SSL backend specific.
=item keyfile => B<value>
-The private key to use. Implementation is SSL backend specific.
+The private key file to use. Implementation is SSL backend specific.
=item crlfile => B<value>
--
2.25.1
0007-nondecimal.patchtext/x-diff; charset=us-asciiDownload
From 1be0dbbd115e485c7361900dd8301870f7bb261c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 14 Dec 2022 19:04:13 -0600
Subject: [PATCH 07/16] +nondecimal
Per Erik Rijkers
---
doc/src/sgml/syntax.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
index 956182e7c6a..0ccddea310d 100644
--- a/doc/src/sgml/syntax.sgml
+++ b/doc/src/sgml/syntax.sgml
@@ -722,7 +722,7 @@ $function$
<note>
<para>
- Nondecimal integer constants are currently only supported in the range
+ Non-decimal integer constants are currently only supported in the range
of the <type>bigint</type> type (see <xref
linkend="datatype-numeric-table"/>).
</para>
--
2.25.1
0008-do-not-end-messages-with-newlines.patchtext/x-diff; charset=us-asciiDownload
From 25683fd3008fa312d4154ff13f172453c2dff42a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 18 Dec 2022 21:33:10 -0600
Subject: [PATCH 08/16] do not end messages with newlines
https://www.postgresql.org/docs/current/error-style-guide.html
---
src/backend/access/common/bufmask.c | 2 +-
src/backend/jit/llvm/llvmjit.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/common/bufmask.c b/src/backend/access/common/bufmask.c
index 4e953bfd61d..a8f213cf78f 100644
--- a/src/backend/access/common/bufmask.c
+++ b/src/backend/access/common/bufmask.c
@@ -78,7 +78,7 @@ mask_unused_space(Page page)
if (pd_lower > pd_upper || pd_special < pd_upper ||
pd_lower < SizeOfPageHeaderData || pd_special > BLCKSZ)
{
- elog(ERROR, "invalid page pd_lower %u pd_upper %u pd_special %u\n",
+ elog(ERROR, "invalid page pd_lower %u pd_upper %u pd_special %u",
pd_lower, pd_upper, pd_special);
}
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 9aca7fc7a47..941425c562c 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -816,7 +816,7 @@ llvm_session_initialize(void)
if (LLVMGetTargetFromTriple(llvm_triple, &llvm_targetref, &error) != 0)
{
- elog(FATAL, "failed to query triple %s\n", error);
+ elog(FATAL, "failed to query triple %s", error);
}
/*
--
2.25.1
0011-Update-comment-regarding-pg_upgrade-and-sequences.patchtext/x-diff; charset=us-asciiDownload
From 9acfbc78f2459f1282ee5363592ff39a8f3a2662 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 25 Jun 2022 10:50:14 -0500
Subject: [PATCH 11/16] Update comment regarding pg_upgrade and sequences
Missed at a7e5457db86642c078888bf666cf6b64636bb190
---
src/bin/pg_upgrade/info.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index f18cf971202..4b059dd2d7c 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -408,8 +408,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
query[0] = '\0'; /* initialize query string to empty */
/*
- * Create a CTE that collects OIDs of regular user tables, including
- * matviews and sequences, but excluding toast tables and indexes. We
+ * Create a CTE that collects OIDs of regular user tables and
+ * matviews, but excluding toast tables and indexes. We
* assume that relations with OIDs >= FirstNormalObjectId belong to the
* user. (That's probably redundant with the namespace-name exclusions,
* but let's be safe.)
--
2.25.1
0012-fix-whitespace.patchtext/x-diff; charset=us-asciiDownload
From 0c2bfa73b65cda20db4625f42caf635e8f652706 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 12/16] fix whitespace
weird since c91560defc57f89f7e88632ea14ae77b5cec78ee
See also:
https://www.postgresql.org/message-id/CAFBsxsHtYvE1Txm+NYM5gB1C3EZN_qDPJOOsJK_VsC2DXqZfcA@mail.gmail.com
---
src/backend/utils/cache/inval.c | 188 ++++++++++++++++----------------
1 file changed, 94 insertions(+), 94 deletions(-)
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index eb5782f82a4..53a6c135e50 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -3,100 +3,100 @@
* inval.c
* POSTGRES cache invalidation dispatcher code.
*
- * This is subtle stuff, so pay attention:
- *
- * When a tuple is updated or deleted, our standard visibility rules
- * consider that it is *still valid* so long as we are in the same command,
- * ie, until the next CommandCounterIncrement() or transaction commit.
- * (See access/heap/heapam_visibility.c, and note that system catalogs are
- * generally scanned under the most current snapshot available, rather than
- * the transaction snapshot.) At the command boundary, the old tuple stops
- * being valid and the new version, if any, becomes valid. Therefore,
- * we cannot simply flush a tuple from the system caches during heap_update()
- * or heap_delete(). The tuple is still good at that point; what's more,
- * even if we did flush it, it might be reloaded into the caches by a later
- * request in the same command. So the correct behavior is to keep a list
- * of outdated (updated/deleted) tuples and then do the required cache
- * flushes at the next command boundary. We must also keep track of
- * inserted tuples so that we can flush "negative" cache entries that match
- * the new tuples; again, that mustn't happen until end of command.
- *
- * Once we have finished the command, we still need to remember inserted
- * tuples (including new versions of updated tuples), so that we can flush
- * them from the caches if we abort the transaction. Similarly, we'd better
- * be able to flush "negative" cache entries that may have been loaded in
- * place of deleted tuples, so we still need the deleted ones too.
- *
- * If we successfully complete the transaction, we have to broadcast all
- * these invalidation events to other backends (via the SI message queue)
- * so that they can flush obsolete entries from their caches. Note we have
- * to record the transaction commit before sending SI messages, otherwise
- * the other backends won't see our updated tuples as good.
- *
- * When a subtransaction aborts, we can process and discard any events
- * it has queued. When a subtransaction commits, we just add its events
- * to the pending lists of the parent transaction.
- *
- * In short, we need to remember until xact end every insert or delete
- * of a tuple that might be in the system caches. Updates are treated as
- * two events, delete + insert, for simplicity. (If the update doesn't
- * change the tuple hash value, catcache.c optimizes this into one event.)
- *
- * We do not need to register EVERY tuple operation in this way, just those
- * on tuples in relations that have associated catcaches. We do, however,
- * have to register every operation on every tuple that *could* be in a
- * catcache, whether or not it currently is in our cache. Also, if the
- * tuple is in a relation that has multiple catcaches, we need to register
- * an invalidation message for each such catcache. catcache.c's
- * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
- * catcaches may need invalidation for a given tuple.
- *
- * Also, whenever we see an operation on a pg_class, pg_attribute, or
- * pg_index tuple, we register a relcache flush operation for the relation
- * described by that tuple (as specified in CacheInvalidateHeapTuple()).
- * Likewise for pg_constraint tuples for foreign keys on relations.
- *
- * We keep the relcache flush requests in lists separate from the catcache
- * tuple flush requests. This allows us to issue all the pending catcache
- * flushes before we issue relcache flushes, which saves us from loading
- * a catcache tuple during relcache load only to flush it again right away.
- * Also, we avoid queuing multiple relcache flush requests for the same
- * relation, since a relcache flush is relatively expensive to do.
- * (XXX is it worth testing likewise for duplicate catcache flush entries?
- * Probably not.)
- *
- * Many subsystems own higher-level caches that depend on relcache and/or
- * catcache, and they register callbacks here to invalidate their caches.
- * While building a higher-level cache entry, a backend may receive a
- * callback for the being-built entry or one of its dependencies. This
- * implies the new higher-level entry would be born stale, and it might
- * remain stale for the life of the backend. Many caches do not prevent
- * that. They rely on DDL for can't-miss catalog changes taking
- * AccessExclusiveLock on suitable objects. (For a change made with less
- * locking, backends might never read the change.) The relation cache,
- * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
- * than the beginning of the next transaction. Hence, when a relevant
- * invalidation callback arrives during a build, relcache.c reattempts that
- * build. Caches with similar needs could do likewise.
- *
- * If a relcache flush is issued for a system relation that we preload
- * from the relcache init file, we must also delete the init file so that
- * it will be rebuilt during the next backend restart. The actual work of
- * manipulating the init file is in relcache.c, but we keep track of the
- * need for it here.
- *
- * Currently, inval messages are sent without regard for the possibility
- * that the object described by the catalog tuple might be a session-local
- * object such as a temporary table. This is because (1) this code has
- * no practical way to tell the difference, and (2) it is not certain that
- * other backends don't have catalog cache or even relcache entries for
- * such tables, anyway; there is nothing that prevents that. It might be
- * worth trying to avoid sending such inval traffic in the future, if those
- * problems can be overcome cheaply.
- *
- * When wal_level=logical, write invalidations into WAL at each command end to
- * support the decoding of the in-progress transactions. See
- * CommandEndInvalidationMessages.
+ * This is subtle stuff, so pay attention:
+ *
+ * When a tuple is updated or deleted, our standard visibility rules
+ * consider that it is *still valid* so long as we are in the same command,
+ * ie, until the next CommandCounterIncrement() or transaction commit.
+ * (See access/heap/heapam_visibility.c, and note that system catalogs are
+ * generally scanned under the most current snapshot available, rather than
+ * the transaction snapshot.) At the command boundary, the old tuple stops
+ * being valid and the new version, if any, becomes valid. Therefore,
+ * we cannot simply flush a tuple from the system caches during heap_update()
+ * or heap_delete(). The tuple is still good at that point; what's more,
+ * even if we did flush it, it might be reloaded into the caches by a later
+ * request in the same command. So the correct behavior is to keep a list
+ * of outdated (updated/deleted) tuples and then do the required cache
+ * flushes at the next command boundary. We must also keep track of
+ * inserted tuples so that we can flush "negative" cache entries that match
+ * the new tuples; again, that mustn't happen until end of command.
+ *
+ * Once we have finished the command, we still need to remember inserted
+ * tuples (including new versions of updated tuples), so that we can flush
+ * them from the caches if we abort the transaction. Similarly, we'd better
+ * be able to flush "negative" cache entries that may have been loaded in
+ * place of deleted tuples, so we still need the deleted ones too.
+ *
+ * If we successfully complete the transaction, we have to broadcast all
+ * these invalidation events to other backends (via the SI message queue)
+ * so that they can flush obsolete entries from their caches. Note we have
+ * to record the transaction commit before sending SI messages, otherwise
+ * the other backends won't see our updated tuples as good.
+ *
+ * When a subtransaction aborts, we can process and discard any events
+ * it has queued. When a subtransaction commits, we just add its events
+ * to the pending lists of the parent transaction.
+ *
+ * In short, we need to remember until xact end every insert or delete
+ * of a tuple that might be in the system caches. Updates are treated as
+ * two events, delete + insert, for simplicity. (If the update doesn't
+ * change the tuple hash value, catcache.c optimizes this into one event.)
+ *
+ * We do not need to register EVERY tuple operation in this way, just those
+ * on tuples in relations that have associated catcaches. We do, however,
+ * have to register every operation on every tuple that *could* be in a
+ * catcache, whether or not it currently is in our cache. Also, if the
+ * tuple is in a relation that has multiple catcaches, we need to register
+ * an invalidation message for each such catcache. catcache.c's
+ * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
+ * catcaches may need invalidation for a given tuple.
+ *
+ * Also, whenever we see an operation on a pg_class, pg_attribute, or
+ * pg_index tuple, we register a relcache flush operation for the relation
+ * described by that tuple (as specified in CacheInvalidateHeapTuple()).
+ * Likewise for pg_constraint tuples for foreign keys on relations.
+ *
+ * We keep the relcache flush requests in lists separate from the catcache
+ * tuple flush requests. This allows us to issue all the pending catcache
+ * flushes before we issue relcache flushes, which saves us from loading
+ * a catcache tuple during relcache load only to flush it again right away.
+ * Also, we avoid queuing multiple relcache flush requests for the same
+ * relation, since a relcache flush is relatively expensive to do.
+ * (XXX is it worth testing likewise for duplicate catcache flush entries?
+ * Probably not.)
+ *
+ * Many subsystems own higher-level caches that depend on relcache and/or
+ * catcache, and they register callbacks here to invalidate their caches.
+ * While building a higher-level cache entry, a backend may receive a
+ * callback for the being-built entry or one of its dependencies. This
+ * implies the new higher-level entry would be born stale, and it might
+ * remain stale for the life of the backend. Many caches do not prevent
+ * that. They rely on DDL for can't-miss catalog changes taking
+ * AccessExclusiveLock on suitable objects. (For a change made with less
+ * locking, backends might never read the change.) The relation cache,
+ * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
+ * than the beginning of the next transaction. Hence, when a relevant
+ * invalidation callback arrives during a build, relcache.c reattempts that
+ * build. Caches with similar needs could do likewise.
+ *
+ * If a relcache flush is issued for a system relation that we preload
+ * from the relcache init file, we must also delete the init file so that
+ * it will be rebuilt during the next backend restart. The actual work of
+ * manipulating the init file is in relcache.c, but we keep track of the
+ * need for it here.
+ *
+ * Currently, inval messages are sent without regard for the possibility
+ * that the object described by the catalog tuple might be a session-local
+ * object such as a temporary table. This is because (1) this code has
+ * no practical way to tell the difference, and (2) it is not certain that
+ * other backends don't have catalog cache or even relcache entries for
+ * such tables, anyway; there is nothing that prevents that. It might be
+ * worth trying to avoid sending such inval traffic in the future, if those
+ * problems can be overcome cheaply.
+ *
+ * When wal_level=logical, write invalidations into WAL at each command end to
+ * support the decoding of the in-progress transactions. See
+ * CommandEndInvalidationMessages.
*
* Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
--
2.25.1
0013-move-view-name-outside-of-translated-string.patchtext/x-diff; charset=us-asciiDownload
From b25e3186a37ca3b30912ad9373f3bdb75db74fd1 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 20 Oct 2022 21:05:19 -0500
Subject: [PATCH 13/16] move view name outside of translated string
Noticed during discussion: 20221017202809.GX7745@telsasoft.com
---
src/backend/utils/misc/guc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index c6326d50532..1dfadee4a0b 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -4191,8 +4191,8 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of pg_read_all_settings to examine \"%s\"",
- name)));
+ errmsg("must be superuser or have privileges of %s to examine \"%s\"",
+ "pg_read_all_settings", name)));
switch (record->vartype)
{
@@ -4238,8 +4238,8 @@ GetConfigOptionResetString(const char *name)
!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of pg_read_all_settings to examine \"%s\"",
- name)));
+ errmsg("must be superuser or have privileges of %s to examine \"%s\"",
+ "pg_read_all_settings", name)));
switch (record->vartype)
{
@@ -5247,8 +5247,8 @@ GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of pg_read_all_settings to examine \"%s\"",
- name)));
+ errmsg("must be superuser or have privileges of %s to examine \"%s\"",
+ "pg_read_all_settings", name)));
if (varname)
*varname = record->name;
--
2.25.1
0014-more.patchtext/x-diff; charset=us-asciiDownload
From 364763047161a2c4343fedb6df061aaa80db4e07 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 21 Oct 2022 16:07:20 -0500
Subject: [PATCH 14/16] +more
---
contrib/file_fdw/file_fdw.c | 4 ++--
src/backend/backup/basebackup_server.c | 2 +-
src/backend/commands/copy.c | 6 +++---
src/backend/storage/ipc/procarray.c | 2 +-
src/backend/storage/ipc/signalfuncs.c | 4 ++--
src/backend/tcop/utility.c | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c
index 67821cd25b3..df6b7e6cb1c 100644
--- a/contrib/file_fdw/file_fdw.c
+++ b/contrib/file_fdw/file_fdw.c
@@ -278,13 +278,13 @@ file_fdw_validator(PG_FUNCTION_ARGS)
!has_privs_of_role(GetUserId(), ROLE_PG_READ_SERVER_FILES))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("only superuser or a role with privileges of the pg_read_server_files role may specify the filename option of a file_fdw foreign table")));
+ errmsg("only superuser or a role with privileges of the %s role may specify the filename option of a file_fdw foreign table", "pg_read_server_files")));
if (strcmp(def->defname, "program") == 0 &&
!has_privs_of_role(GetUserId(), ROLE_PG_EXECUTE_SERVER_PROGRAM))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("only superuser or a role with privileges of the pg_execute_server_program role may specify the program option of a file_fdw foreign table")));
+ errmsg("only superuser or a role with privileges of the %s role may specify the program option of a file_fdw foreign table", "pg_execute_server_program")));
filename = defGetString(def);
}
diff --git a/src/backend/backup/basebackup_server.c b/src/backend/backup/basebackup_server.c
index 0258d7a03b3..23934aef3e5 100644
--- a/src/backend/backup/basebackup_server.c
+++ b/src/backend/backup/basebackup_server.c
@@ -72,7 +72,7 @@ bbsink_server_new(bbsink *next, char *pathname)
if (!has_privs_of_role(GetUserId(), ROLE_PG_WRITE_SERVER_FILES))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or a role with privileges of the pg_write_server_files role to create backup stored on server")));
+ errmsg("must be superuser or a role with privileges of the %s role to create backup stored on server", "pg_write_server_files")));
CommitTransactionCommand();
/*
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index b8bd78d358b..65a3d147542 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -83,7 +83,7 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
if (!has_privs_of_role(GetUserId(), ROLE_PG_EXECUTE_SERVER_PROGRAM))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of the pg_execute_server_program role to COPY to or from an external program"),
+ errmsg("must be superuser or have privileges of the %s role to COPY to or from an external program", "pg_execute_server_program"),
errhint("Anyone can COPY to stdout or from stdin. "
"psql's \\copy command also works for anyone.")));
}
@@ -92,14 +92,14 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
if (is_from && !has_privs_of_role(GetUserId(), ROLE_PG_READ_SERVER_FILES))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of the pg_read_server_files role to COPY from a file"),
+ errmsg("must be superuser or have privileges of the %s role to COPY from a file", "pg_read_server_files"),
errhint("Anyone can COPY to stdout or from stdin. "
"psql's \\copy command also works for anyone.")));
if (!is_from && !has_privs_of_role(GetUserId(), ROLE_PG_WRITE_SERVER_FILES))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of the pg_write_server_files role to COPY to a file"),
+ errmsg("must be superuser or have privileges of the %s role to COPY to a file", "pg_write_server_files"),
errhint("Anyone can COPY to stdout or from stdin. "
"psql's \\copy command also works for anyone.")));
}
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 0176f302703..5d6d0e1eef0 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -3860,7 +3860,7 @@ TerminateOtherDBBackends(Oid databaseId)
!has_privs_of_role(GetUserId(), ROLE_PG_SIGNAL_BACKEND))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")));
+ errmsg("must be a member of the role whose process is being terminated or member of %s", "pg_signal_backend")));
}
}
diff --git a/src/backend/storage/ipc/signalfuncs.c b/src/backend/storage/ipc/signalfuncs.c
index 6e310b14ebd..3a73dc94ee6 100644
--- a/src/backend/storage/ipc/signalfuncs.c
+++ b/src/backend/storage/ipc/signalfuncs.c
@@ -126,7 +126,7 @@ pg_cancel_backend(PG_FUNCTION_ARGS)
if (r == SIGNAL_BACKEND_NOPERMISSION)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be a member of the role whose query is being canceled or member of pg_signal_backend")));
+ errmsg("must be a member of the role whose query is being canceled or member of %s", "pg_signal_backend")));
PG_RETURN_BOOL(r == SIGNAL_BACKEND_SUCCESS);
}
@@ -228,7 +228,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS)
if (r == SIGNAL_BACKEND_NOPERMISSION)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be a member of the role whose process is being terminated or member of pg_signal_backend")));
+ errmsg("must be a member of the role whose process is being terminated or member of %s", "pg_signal_backend")));
/* Wait only on success and if actually requested */
if (r == SIGNAL_BACKEND_SUCCESS && timeout > 0)
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 247d0816ad8..952034a9a39 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -950,7 +950,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINT))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser or have privileges of pg_checkpoint to do CHECKPOINT")));
+ errmsg("must be superuser or have privileges of %s to do CHECKPOINT", "pg_checkpoint")));
RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_WAIT |
(RecoveryInProgress() ? 0 : CHECKPOINT_FORCE));
--
2.25.1
0015-Rename-header-comment-and-define.patchtext/x-diff; charset=us-asciiDownload
From 0769faf55da803a0a954f5e291e9068af0b16605 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 19 Nov 2022 10:31:01 -0600
Subject: [PATCH 15/16] Rename header comment and #define
Maybe should fix more of these?
find src/ contrib/ -name '*.h' |xargs awk '/^#ifndef.*_H$/ && FILENAME!~/-/{reg=toupper(gensub(".*/","",1,FILENAME)); if ($0!~reg){print reg,$0}}'
---
src/backend/utils/misc/guc_internal.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/backend/utils/misc/guc_internal.h b/src/backend/utils/misc/guc_internal.h
index be3940951a2..bd96405cdad 100644
--- a/src/backend/utils/misc/guc_internal.h
+++ b/src/backend/utils/misc/guc_internal.h
@@ -1,16 +1,16 @@
/*--------------------------------------------------------------------
- * guc_internals.h
+ * guc_internal.h
*
* Declarations shared between backend/utils/misc/guc.c and
* backend/utils/misc/guc-file.l
*
* Copyright (c) 2000-2022, PostgreSQL Global Development Group
*
- * src/include/utils/guc_internals.h
+ * src/include/utils/guc_internal.h
*--------------------------------------------------------------------
*/
-#ifndef GUC_INTERNALS_H
-#define GUC_INTERNALS_H
+#ifndef GUC_INTERNAL_H
+#define GUC_INTERNAL_H
#include "utils/guc.h"
@@ -23,4 +23,4 @@ extern void record_config_file_error(const char *errmsg,
ConfigVariable **head_p,
ConfigVariable **tail_p);
-#endif /* GUC_INTERNALS_H */
+#endif /* GUC_INTERNAL_H */
--
2.25.1
0016-Add-some-missing-newlines-after-function-definitions.patchtext/x-diff; charset=us-asciiDownload
From c2f92e70f4800e609a857d73f13012df3bf28345 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 5 Jul 2021 11:16:38 -0500
Subject: [PATCH 16/16] Add some missing newlines after function definitions
---
src/backend/access/gin/ginlogic.c | 1 +
src/backend/access/rmgrdesc/heapdesc.c | 1 +
src/backend/utils/mmgr/freepage.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/src/backend/access/gin/ginlogic.c b/src/backend/access/gin/ginlogic.c
index c38c27fbae2..62f98f9cfaf 100644
--- a/src/backend/access/gin/ginlogic.c
+++ b/src/backend/access/gin/ginlogic.c
@@ -58,6 +58,7 @@ trueConsistentFn(GinScanKey key)
key->recheckCurItem = false;
return true;
}
+
static GinTernaryValue
trueTriConsistentFn(GinScanKey key)
{
diff --git a/src/backend/access/rmgrdesc/heapdesc.c b/src/backend/access/rmgrdesc/heapdesc.c
index 325aee93ff8..7556fc2546d 100644
--- a/src/backend/access/rmgrdesc/heapdesc.c
+++ b/src/backend/access/rmgrdesc/heapdesc.c
@@ -114,6 +114,7 @@ heap_desc(StringInfo buf, XLogReaderState *record)
appendStringInfo(buf, "off %u", xlrec->offnum);
}
}
+
void
heap2_desc(StringInfo buf, XLogReaderState *record)
{
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index dcf246faf11..1ba424c2298 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -270,6 +270,7 @@ sum_free_pages_recurse(FreePageManager *fpm, FreePageBtree *btp, Size *sum)
}
}
}
+
static Size
sum_free_pages(FreePageManager *fpm)
{
--
2.25.1
On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
# Use larger ccache cache, as this task compiles with multiple compilers /
# flag combinations
- CCACHE_MAXSIZE: "1GB"
+ CCACHE_MAXSIZE: "1G"
In 0006, I am not sure how much this matters. Perhaps somebody more
fluent with Cirrus, though, has a different opinion..
* pointer to this structure. The information here must be sufficient to
* properly initialize each new TableScanDesc as workers join the scan, and it
- * must act as a information what to scan for those workers.
+ * must provide information what to scan for those workers.
This comment in 0009 is obviously incorrect, but I am not sure whether
your new suggestion is an improvement. Do workers provide such
information or has this structure some information that the workers
rely on?
Not sure that the whitespace issue in 0021 for the header of inval.c
is worth caring about.
0014 and 0013 do not reduce the translation workload, as the messages
include some stuff specific to the GUC names accessed to, or some
specific details about the code paths triggered.
The rest has been applied where they matter.
--
Michael
On Tue, Jan 3, 2023 at 12:58 PM Michael Paquier <michael@paquier.xyz> wrote:
On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
# Use larger ccache cache, as this task compiles with multiple compilers / # flag combinations - CCACHE_MAXSIZE: "1GB" + CCACHE_MAXSIZE: "1G"In 0006, I am not sure how much this matters.
The other places in that file use M, so maybe, this is more consistent.
One minor comment:
- spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set
+ spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character set
Shouldn't this be <acronym>UTF8</acronym> as we are using in func.sgml?
--
With Regards,
Amit Kapila.
On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
One minor comment: - spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set + spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character setShouldn't this be <acronym>UTF8</acronym> as we are using in func.sgml?
Yeah, I was wondering as well why this change is not worse, which is
why I left it out of 33ab0a2. There is an acronym for UTF in
acronym.sgml, which makes sense to me, but that's the only place where
this is used. To add more on top of that, the docs basically need
only UTF8, and we have three references to UTF-16, none of them using
the <acronym> markup.
--
Michael
On 03.01.23 09:41, Michael Paquier wrote:
On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
One minor comment: - spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set + spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character setShouldn't this be <acronym>UTF8</acronym> as we are using in func.sgml?
Yeah, I was wondering as well why this change is not worse, which is
why I left it out of 33ab0a2. There is an acronym for UTF in
acronym.sgml, which makes sense to me, but that's the only place where
this is used. To add more on top of that, the docs basically need
only UTF8, and we have three references to UTF-16, none of them using
the <acronym> markup.
The thing is called "UTF-8". Here, we are not talking about the
PostgreSQL identifier.
On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote:
On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
# Use larger ccache cache, as this task compiles with multiple compilers / # flag combinations - CCACHE_MAXSIZE: "1GB" + CCACHE_MAXSIZE: "1G"In 0006, I am not sure how much this matters. Perhaps somebody more
fluent with Cirrus, though, has a different opinion..
It's got almost nothing to do with cirrus. It's an environment
variable, and we're using a suffix other than what's
supported/documented by ccache, which only happens to work.
0014 and 0013 do not reduce the translation workload, as the messages
include some stuff specific to the GUC names accessed to, or some
specific details about the code paths triggered.
It seems to matter because otherwise the translators sometimes re-type
the view name, which (not surprisingly) can get messed up, which is how
I mentioned having noticed this.
On Tue, Jan 03, 2023 at 05:41:58PM +0900, Michael Paquier wrote:
On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
One minor comment: - spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set + spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character setShouldn't this be <acronym>UTF8</acronym> as we are using in
func.sgml?Yeah, I was wondering as well why this change is not worse, which is
why I left it out of 33ab0a2. There is an acronym for UTF in
acronym.sgml, which makes sense to me, but that's the only place where
this is used. To add more on top of that, the docs basically need
only UTF8, and we have three references to UTF-16, none of them using
the <acronym> markup.
I changed it for consistency, as it's the only thing that says <>UTF-8<>
anywhere, and charset.sgml already says <>UTF<>-8 elsewhere.
Alternately, I suggest to change charset to say <>UTF8<> in both places.
--
Justin
On Tue, Jan 03, 2023 at 03:39:22PM -0600, Justin Pryzby wrote:
On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote:
On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
# Use larger ccache cache, as this task compiles with multiple compilers / # flag combinations - CCACHE_MAXSIZE: "1GB" + CCACHE_MAXSIZE: "1G"In 0006, I am not sure how much this matters. Perhaps somebody more
fluent with Cirrus, though, has a different opinion..It's got almost nothing to do with cirrus. It's an environment
variable, and we're using a suffix other than what's
supported/documented by ccache, which only happens to work.0014 and 0013 do not reduce the translation workload, as the messages
include some stuff specific to the GUC names accessed to, or some
specific details about the code paths triggered.It seems to matter because otherwise the translators sometimes re-type
the view name, which (not surprisingly) can get messed up, which is how
I mentioned having noticed this.On Tue, Jan 03, 2023 at 05:41:58PM +0900, Michael Paquier wrote:
On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
One minor comment: - spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set + spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character setShouldn't this be <acronym>UTF8</acronym> as we are using in
func.sgml?Yeah, I was wondering as well why this change is not worse, which is
why I left it out of 33ab0a2. There is an acronym for UTF in
acronym.sgml, which makes sense to me, but that's the only place where
this is used. To add more on top of that, the docs basically need
only UTF8, and we have three references to UTF-16, none of them using
the <acronym> markup.I changed it for consistency, as it's the only thing that says <>UTF-8<>
anywhere, and charset.sgml already says <>UTF<>-8 elsewhere.Alternately, I suggest to change charset to say <>UTF8<> in both places.
As attached.
This also fixes "specualtive" in Amit's recent commit.
--
Justin
Attachments:
0001-typos.patchtext/x-diff; charset=us-asciiDownload
From 8b56d6007e13e3b42bc75da3b9174ecab8a8dd70 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:40:36 -0500
Subject: [PATCH 1/9] typos
---
.cirrus.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index 69837bcd5ad..048a004e309 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -655,7 +655,7 @@ task:
# Use larger ccache cache, as this task compiles with multiple compilers /
# flag combinations
- CCACHE_MAXSIZE: "1GB"
+ CCACHE_MAXSIZE: "1G"
CCACHE_DIR: "/tmp/ccache_dir"
LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
--
2.25.1
0002-comments-grammar-extended-and-other-stats.patchtext/x-diff; charset=us-asciiDownload
From c082768a857ebd7a0a534ee497761dca0c621f64 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 2/9] comments grammar: extended (and other) stats
See:
202109272104.7t253iw236fb@alvherre.pgsql
070d2e19e40897d857f570f24888fc30727ed9c0
609b0652af00374b89411ea2613fd5bb92bca92c
a4d75c86bf15220df22de0a92c819ecef9db3849
7300a699502fe5432b05fbc75baca534b080bebb
ccaa3569f58796868303629bc2d63ddddb599b38
---
src/backend/commands/statscmds.c | 4 ++--
src/backend/statistics/README | 2 +-
src/backend/statistics/dependencies.c | 8 ++++----
src/backend/statistics/extended_stats.c | 4 ++--
src/backend/utils/adt/pgstatfuncs.c | 4 ++--
src/backend/utils/adt/ruleutils.c | 2 +-
src/include/statistics/extended_stats_internal.h | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 26ebd0819d6..2e41745646b 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -377,7 +377,7 @@ CreateStatistics(CreateStatsStmt *stmt)
/*
* If no statistic type was specified, build them all (but only when the
- * statistics is defined on more than one column/expression).
+ * statistics object is defined on more than one column/expression).
*/
if ((!requested_type) && (numcols >= 2))
{
@@ -432,7 +432,7 @@ CreateStatistics(CreateStatsStmt *stmt)
* similar to why we don't bother with extracting columns from
* expressions. It's either expensive or very easy to defeat for
* determined user, and there's no risk if we allow such statistics (the
- * statistics is useless, but harmless).
+ * statistic is useless, but harmless).
*/
foreach(cell, stxexprs)
{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
Compatible clause types
-----------------------
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
(a) functional dependencies - equality clauses (AND), possibly IS NULL
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index e6e2835345e..a54e038d6a1 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -846,7 +846,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
AttrNumber clause_attnum;
/*
- * Had we found incompatible clause in the arguments, treat the
+ * If we found an incompatible clause in the arguments, treat the
* whole clause as incompatible.
*/
if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1274,7 +1274,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
Node *or_expr = NULL;
/*
- * Had we found incompatible expression in the arguments, treat
+ * If we found an incompatible expression in the arguments, treat
* the whole expression as incompatible.
*/
if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
@@ -1725,7 +1725,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
/*
* For expressions, we need to do two translations. First
- * we have to translate the negative attnum to index in
+ * we have to translate the negative attnum to an index in
* the list of expressions (in the statistics object).
* Then we need to see if there's a matching clause. The
* index of the unique expression determines the attnum
@@ -1733,7 +1733,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
*/
idx = -(1 + attnum);
- /* Is the expression index is valid? */
+ /* Is the expression index valid? */
Assert((idx >= 0) && (idx < list_length(stat->exprs)));
expr = (Node *) list_nth(stat->exprs, idx);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index bdc21bb4577..edc7352562c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1214,8 +1214,8 @@ stat_covers_expressions(StatisticExtInfo *stat, List *exprs,
/*
* choose_best_statistics
- * Look for and return statistics with the specified 'requiredkind' which
- * have keys that match at least two of the given attnums. Return NULL if
+ * Look for and return the statistics object with the specified 'requiredkind' which
+ * has keys that match at least two of the given attnums. Return NULL if
* there's no match.
*
* The current selection criteria is very simple - we choose the statistics
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6cddd74aa76..fb46153d8bb 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1749,7 +1749,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
}
/*
- * Get the statistics for the replication slot. If the slot statistics is not
+ * Get the statistics for the replication slot. If the slot statistics are not
* available, return all-zeroes stats.
*/
Datum
@@ -1821,7 +1821,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
/*
* Get the subscription statistics for the given subscription. If the
- * subscription statistics is not available, return all-zeros stats.
+ * subscription statistics are not available, return all-zeros stats.
*/
Datum
pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 9ac42efdbc3..da59c85d3d5 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1699,7 +1699,7 @@ pg_get_statisticsobj_worker(Oid statextid, bool columns_only, bool missing_ok)
* will create all statistics types on a newer postgres version, if
* the statistics had all options enabled on the original version.
*
- * But if the statistics is defined on just a single column, it has to
+ * But if the statistics are defined on just a single column, it has to
* be an expression statistics. In that case we don't need to specify
* kinds.
*/
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index 7b55eb8ffac..72f94814704 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -57,7 +57,7 @@ typedef struct SortItem
int count;
} SortItem;
-/* a unified representation of the data the statistics is built on */
+/* a unified representation of the data the statistics object is built on */
typedef struct StatsBuildData
{
int numrows;
--
2.25.1
0003-fix-whitespace.patchtext/x-diff; charset=us-asciiDownload
From 6a80a46886d3659a3ccd5783fdf16b2ae750d73b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 3/9] fix whitespace
weird since c91560defc57f89f7e88632ea14ae77b5cec78ee
See also:
https://www.postgresql.org/message-id/CAFBsxsHtYvE1Txm+NYM5gB1C3EZN_qDPJOOsJK_VsC2DXqZfcA@mail.gmail.com
---
src/backend/utils/cache/inval.c | 188 ++++++++++++++++----------------
src/backend/utils/mmgr/mcxt.c | 4 +-
2 files changed, 96 insertions(+), 96 deletions(-)
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 0008826f67c..cc7de542b1e 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -3,100 +3,100 @@
* inval.c
* POSTGRES cache invalidation dispatcher code.
*
- * This is subtle stuff, so pay attention:
- *
- * When a tuple is updated or deleted, our standard visibility rules
- * consider that it is *still valid* so long as we are in the same command,
- * ie, until the next CommandCounterIncrement() or transaction commit.
- * (See access/heap/heapam_visibility.c, and note that system catalogs are
- * generally scanned under the most current snapshot available, rather than
- * the transaction snapshot.) At the command boundary, the old tuple stops
- * being valid and the new version, if any, becomes valid. Therefore,
- * we cannot simply flush a tuple from the system caches during heap_update()
- * or heap_delete(). The tuple is still good at that point; what's more,
- * even if we did flush it, it might be reloaded into the caches by a later
- * request in the same command. So the correct behavior is to keep a list
- * of outdated (updated/deleted) tuples and then do the required cache
- * flushes at the next command boundary. We must also keep track of
- * inserted tuples so that we can flush "negative" cache entries that match
- * the new tuples; again, that mustn't happen until end of command.
- *
- * Once we have finished the command, we still need to remember inserted
- * tuples (including new versions of updated tuples), so that we can flush
- * them from the caches if we abort the transaction. Similarly, we'd better
- * be able to flush "negative" cache entries that may have been loaded in
- * place of deleted tuples, so we still need the deleted ones too.
- *
- * If we successfully complete the transaction, we have to broadcast all
- * these invalidation events to other backends (via the SI message queue)
- * so that they can flush obsolete entries from their caches. Note we have
- * to record the transaction commit before sending SI messages, otherwise
- * the other backends won't see our updated tuples as good.
- *
- * When a subtransaction aborts, we can process and discard any events
- * it has queued. When a subtransaction commits, we just add its events
- * to the pending lists of the parent transaction.
- *
- * In short, we need to remember until xact end every insert or delete
- * of a tuple that might be in the system caches. Updates are treated as
- * two events, delete + insert, for simplicity. (If the update doesn't
- * change the tuple hash value, catcache.c optimizes this into one event.)
- *
- * We do not need to register EVERY tuple operation in this way, just those
- * on tuples in relations that have associated catcaches. We do, however,
- * have to register every operation on every tuple that *could* be in a
- * catcache, whether or not it currently is in our cache. Also, if the
- * tuple is in a relation that has multiple catcaches, we need to register
- * an invalidation message for each such catcache. catcache.c's
- * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
- * catcaches may need invalidation for a given tuple.
- *
- * Also, whenever we see an operation on a pg_class, pg_attribute, or
- * pg_index tuple, we register a relcache flush operation for the relation
- * described by that tuple (as specified in CacheInvalidateHeapTuple()).
- * Likewise for pg_constraint tuples for foreign keys on relations.
- *
- * We keep the relcache flush requests in lists separate from the catcache
- * tuple flush requests. This allows us to issue all the pending catcache
- * flushes before we issue relcache flushes, which saves us from loading
- * a catcache tuple during relcache load only to flush it again right away.
- * Also, we avoid queuing multiple relcache flush requests for the same
- * relation, since a relcache flush is relatively expensive to do.
- * (XXX is it worth testing likewise for duplicate catcache flush entries?
- * Probably not.)
- *
- * Many subsystems own higher-level caches that depend on relcache and/or
- * catcache, and they register callbacks here to invalidate their caches.
- * While building a higher-level cache entry, a backend may receive a
- * callback for the being-built entry or one of its dependencies. This
- * implies the new higher-level entry would be born stale, and it might
- * remain stale for the life of the backend. Many caches do not prevent
- * that. They rely on DDL for can't-miss catalog changes taking
- * AccessExclusiveLock on suitable objects. (For a change made with less
- * locking, backends might never read the change.) The relation cache,
- * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
- * than the beginning of the next transaction. Hence, when a relevant
- * invalidation callback arrives during a build, relcache.c reattempts that
- * build. Caches with similar needs could do likewise.
- *
- * If a relcache flush is issued for a system relation that we preload
- * from the relcache init file, we must also delete the init file so that
- * it will be rebuilt during the next backend restart. The actual work of
- * manipulating the init file is in relcache.c, but we keep track of the
- * need for it here.
- *
- * Currently, inval messages are sent without regard for the possibility
- * that the object described by the catalog tuple might be a session-local
- * object such as a temporary table. This is because (1) this code has
- * no practical way to tell the difference, and (2) it is not certain that
- * other backends don't have catalog cache or even relcache entries for
- * such tables, anyway; there is nothing that prevents that. It might be
- * worth trying to avoid sending such inval traffic in the future, if those
- * problems can be overcome cheaply.
- *
- * When wal_level=logical, write invalidations into WAL at each command end to
- * support the decoding of the in-progress transactions. See
- * CommandEndInvalidationMessages.
+ * This is subtle stuff, so pay attention:
+ *
+ * When a tuple is updated or deleted, our standard visibility rules
+ * consider that it is *still valid* so long as we are in the same command,
+ * ie, until the next CommandCounterIncrement() or transaction commit.
+ * (See access/heap/heapam_visibility.c, and note that system catalogs are
+ * generally scanned under the most current snapshot available, rather than
+ * the transaction snapshot.) At the command boundary, the old tuple stops
+ * being valid and the new version, if any, becomes valid. Therefore,
+ * we cannot simply flush a tuple from the system caches during heap_update()
+ * or heap_delete(). The tuple is still good at that point; what's more,
+ * even if we did flush it, it might be reloaded into the caches by a later
+ * request in the same command. So the correct behavior is to keep a list
+ * of outdated (updated/deleted) tuples and then do the required cache
+ * flushes at the next command boundary. We must also keep track of
+ * inserted tuples so that we can flush "negative" cache entries that match
+ * the new tuples; again, that mustn't happen until end of command.
+ *
+ * Once we have finished the command, we still need to remember inserted
+ * tuples (including new versions of updated tuples), so that we can flush
+ * them from the caches if we abort the transaction. Similarly, we'd better
+ * be able to flush "negative" cache entries that may have been loaded in
+ * place of deleted tuples, so we still need the deleted ones too.
+ *
+ * If we successfully complete the transaction, we have to broadcast all
+ * these invalidation events to other backends (via the SI message queue)
+ * so that they can flush obsolete entries from their caches. Note we have
+ * to record the transaction commit before sending SI messages, otherwise
+ * the other backends won't see our updated tuples as good.
+ *
+ * When a subtransaction aborts, we can process and discard any events
+ * it has queued. When a subtransaction commits, we just add its events
+ * to the pending lists of the parent transaction.
+ *
+ * In short, we need to remember until xact end every insert or delete
+ * of a tuple that might be in the system caches. Updates are treated as
+ * two events, delete + insert, for simplicity. (If the update doesn't
+ * change the tuple hash value, catcache.c optimizes this into one event.)
+ *
+ * We do not need to register EVERY tuple operation in this way, just those
+ * on tuples in relations that have associated catcaches. We do, however,
+ * have to register every operation on every tuple that *could* be in a
+ * catcache, whether or not it currently is in our cache. Also, if the
+ * tuple is in a relation that has multiple catcaches, we need to register
+ * an invalidation message for each such catcache. catcache.c's
+ * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
+ * catcaches may need invalidation for a given tuple.
+ *
+ * Also, whenever we see an operation on a pg_class, pg_attribute, or
+ * pg_index tuple, we register a relcache flush operation for the relation
+ * described by that tuple (as specified in CacheInvalidateHeapTuple()).
+ * Likewise for pg_constraint tuples for foreign keys on relations.
+ *
+ * We keep the relcache flush requests in lists separate from the catcache
+ * tuple flush requests. This allows us to issue all the pending catcache
+ * flushes before we issue relcache flushes, which saves us from loading
+ * a catcache tuple during relcache load only to flush it again right away.
+ * Also, we avoid queuing multiple relcache flush requests for the same
+ * relation, since a relcache flush is relatively expensive to do.
+ * (XXX is it worth testing likewise for duplicate catcache flush entries?
+ * Probably not.)
+ *
+ * Many subsystems own higher-level caches that depend on relcache and/or
+ * catcache, and they register callbacks here to invalidate their caches.
+ * While building a higher-level cache entry, a backend may receive a
+ * callback for the being-built entry or one of its dependencies. This
+ * implies the new higher-level entry would be born stale, and it might
+ * remain stale for the life of the backend. Many caches do not prevent
+ * that. They rely on DDL for can't-miss catalog changes taking
+ * AccessExclusiveLock on suitable objects. (For a change made with less
+ * locking, backends might never read the change.) The relation cache,
+ * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
+ * than the beginning of the next transaction. Hence, when a relevant
+ * invalidation callback arrives during a build, relcache.c reattempts that
+ * build. Caches with similar needs could do likewise.
+ *
+ * If a relcache flush is issued for a system relation that we preload
+ * from the relcache init file, we must also delete the init file so that
+ * it will be rebuilt during the next backend restart. The actual work of
+ * manipulating the init file is in relcache.c, but we keep track of the
+ * need for it here.
+ *
+ * Currently, inval messages are sent without regard for the possibility
+ * that the object described by the catalog tuple might be a session-local
+ * object such as a temporary table. This is because (1) this code has
+ * no practical way to tell the difference, and (2) it is not certain that
+ * other backends don't have catalog cache or even relcache entries for
+ * such tables, anyway; there is nothing that prevents that. It might be
+ * worth trying to avoid sending such inval traffic in the future, if those
+ * problems can be overcome cheaply.
+ *
+ * When wal_level=logical, write invalidations into WAL at each command end to
+ * support the decoding of the in-progress transactions. See
+ * CommandEndInvalidationMessages.
*
* Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 8b6591abfb2..392602a020f 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -929,7 +929,7 @@ MemoryContextCheck(MemoryContext context)
* context creation routines, not by the unwashed masses.
*
* The memory context creation procedure goes like this:
- * 1. Context-type-specific routine makes some initial space allocation,
+ * 1. Context-type-specific routine makes some initial space allocation,
* including enough space for the context header. If it fails,
* it can ereport() with no damage done.
* 2. Context-type-specific routine sets up all type-specific fields of
@@ -939,7 +939,7 @@ MemoryContextCheck(MemoryContext context)
* the initial space allocation should be freed before ereport'ing.
* 3. Context-type-specific routine calls MemoryContextCreate() to fill in
* the generic header fields and link the context into the context tree.
- * 4. We return to the context-type-specific routine, which finishes
+ * 4. We return to the context-type-specific routine, which finishes
* up type-specific initialization. This routine can now do things
* that might fail (like allocate more memory), so long as it's
* sure the node is left in a state that delete will handle.
--
2.25.1
0004-doc-acronym-UTF.patchtext/x-diff; charset=us-asciiDownload
From 6c9ab2b6afbfb40239b37d23950736d903b45ee7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Sep 2022 18:46:20 -0500
Subject: [PATCH 4/9] doc: acronym: UTF
for consistency
---
doc/src/sgml/charset.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 3032392b801..1b17c1fa8c1 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -2727,7 +2727,7 @@ RESET client_encoding;
<listitem>
<para>
- <acronym>UTF</acronym>-8 (8-bit UCS/Unicode Transformation
+ <acronym>UTF-8</acronym> (8-bit UCS/Unicode Transformation
Format) is defined here.
</para>
</listitem>
--
2.25.1
0005-doc-speculative-Perform-apply-of-large-transactions-.patchtext/x-diff; charset=us-asciiDownload
From 899185d3f6f79c22e856ee3ea36e1fb089d0c6ed Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 9 Jan 2023 22:38:16 -0600
Subject: [PATCH 5/9] doc: speculative: Perform apply of large transactions by
parallel workers.
f745739697e49a38a31a755d7d36d6c97008dd9f
---
doc/src/sgml/system-views.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index 5b1c73269b9..7c8fc3f654b 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -1580,7 +1580,7 @@
</para>
<para>
- A specualtive insertion lock consists of a transaction ID and a speculative
+ A speculative insertion lock consists of a transaction ID and a speculative
insertion token. The speculative insertion token is displayed in the
<structfield>objid</structfield> column.
</para>
--
2.25.1
0006-typos.patchtext/x-diff; charset=us-asciiDownload
From f872b6ee52953522eef113a1e0801d0b05fabfbe Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 4 Jan 2023 21:51:30 -0600
Subject: [PATCH 6/9] typos
misspell-fixer and codespell
---
src/backend/access/transam/xlogrecovery.c | 2 +-
src/bin/psql/common.c | 2 +-
.../expected/test_pg_db_role_setting.out | 2 +-
.../test_pg_db_role_setting/sql/test_pg_db_role_setting.sql | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index bc3c3eb3e79..5e657853066 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -2114,7 +2114,7 @@ CheckRecoveryConsistency(void)
/*
* Check that pg_tblspc doesn't contain any real directories. Replay
- * of Database/CREATE_* records may have created ficticious tablespace
+ * of Database/CREATE_* records may have created fictitious tablespace
* directories that should have been removed by the time consistency
* was reached.
*/
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 38f9b10b7c9..00627830c47 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1447,7 +1447,7 @@ ExecQueryAndProcessResults(const char *query,
if (!AcceptResult(result, false))
{
/*
- * Some error occured, either a server-side failure or a failure
+ * Some error occurred, either a server-side failure or a failure
* to submit the command string. Record that.
*/
const char *error = PQresultErrorMessage(result);
diff --git a/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out b/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
index bee237cf40b..ec18692c558 100644
--- a/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
+++ b/src/test/modules/test_pg_db_role_setting/expected/test_pg_db_role_setting.out
@@ -122,7 +122,7 @@ SHOW test_pg_db_role_setting.user_param;
bbb
(1 row)
--- module is loaded, and placeholder values are succesfully set
+-- module is loaded, and placeholder values are successfully set
SELECT load_test_pg_db_role_setting();
load_test_pg_db_role_setting
------------------------------
diff --git a/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql b/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
index c6095dfa98c..44f231c6b4b 100644
--- a/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
+++ b/src/test/modules/test_pg_db_role_setting/sql/test_pg_db_role_setting.sql
@@ -56,7 +56,7 @@ ALTER ROLE regress_regular_user SET test_pg_db_role_setting.superuser_param = 'c
SHOW test_pg_db_role_setting.superuser_param;
SHOW test_pg_db_role_setting.user_param;
--- module is loaded, and placeholder values are succesfully set
+-- module is loaded, and placeholder values are successfully set
SELECT load_test_pg_db_role_setting();
SHOW test_pg_db_role_setting.superuser_param;
--
2.25.1
0007-f-typos-from-43620e328617c1f41a2a54c8cee01723064e3ff.patchtext/x-diff; charset=us-asciiDownload
From 0b0db64fb0f9782d536a0d35c3276cd0ec769809 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 3 Jan 2023 15:05:24 -0600
Subject: [PATCH 7/9] f!typos from 43620e328617c1f41a2a54c8cee01723064e3ffa
---
src/backend/utils/mmgr/mcxt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 392602a020f..1c9eadeb167 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -717,9 +717,9 @@ MemoryContextStatsDetail(MemoryContext context, int max_children,
* to the connected client.
*
* We don't buffer the information about all memory contexts in a
- * backend into StringInfo and log it as one message. Otherwise which
- * may require the buffer to be enlarged very much and lead to OOM
- * error since there can be a large number of memory contexts in a
+ * backend into StringInfo and log it as one message. That would
+ * require the buffer to be enlarged and could even incur an OOM
+ * condition since there can be a large number of memory contexts in a
* backend. Instead, we log one message per memory context.
*/
ereport(LOG_SERVER_ONLY,
--
2.25.1
0008-doc-review-v16-Add-USER-SET-parameter-values-for-pg_.patchtext/x-diff; charset=us-asciiDownload
From 04c4fb3608ece1b80bbd86c6e9692da06f1c61b3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 6 Jan 2023 11:17:49 -0600
Subject: [PATCH 8/9] doc review: v16: Add USER SET parameter values for
pg_db_role_setting
096dd80f3ccc103c8e078fca05e6ccfb2071aa91
---
doc/src/sgml/ref/alter_database.sgml | 6 +++---
doc/src/sgml/ref/alter_role.sgml | 6 +++---
doc/src/sgml/ref/psql-ref.sgml | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml
index 181e9d36205..0962f32e134 100644
--- a/doc/src/sgml/ref/alter_database.sgml
+++ b/doc/src/sgml/ref/alter_database.sgml
@@ -211,9 +211,9 @@ ALTER DATABASE <replaceable class="parameter">name</replaceable> RESET ALL
<term><literal>USER SET</literal></term>
<listitem>
<para>
- Specifies that variable should be set on behalf of ordinary role.
- That lets non-superuser and non-replication role to set placeholder
- variables, with permission requirements is not known yet;
+ Specifies that the variable should be set on behalf of an ordinary role.
+ That allows non-superuser and non-replication roles to set placeholder
+ variables, whose permission requirements are not known yet;
see <xref linkend="runtime-config-custom"/>. The variable won't
be set if it appears to require superuser privileges.
</para>
diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml
index f5c1264942f..d7c5e8debce 100644
--- a/doc/src/sgml/ref/alter_role.sgml
+++ b/doc/src/sgml/ref/alter_role.sgml
@@ -239,9 +239,9 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
<term><literal>USER SET</literal></term>
<listitem>
<para>
- Specifies that variable should be set on behalf of ordinary role.
- That lets non-superuser and non-replication role to set placeholder
- variables, with permission requirements is not known yet;
+ Specifies that the variable should be set on behalf of an ordinary role.
+ That allows non-superuser and non-replication roles to set placeholder
+ variables, whose permission requirements are not known yet;
see <xref linkend="runtime-config-custom"/>. The variable won't
be set if it appears to require superuser privileges.
</para>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 1a117dbecba..dc6528dc11d 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1901,8 +1901,8 @@ INSERT INTO tbl1 VALUES ($1, $2) \bind 'first value' 'second value' \g
</para>
<para>
- Since <productname>PostgreSQL</productname> 16 the output includes
- column with the values of
+ Since <productname>PostgreSQL</productname> 16, the output includes a
+ column with the values of the
<link linkend="sql-alterrole-user-set"><literal>USER SET</literal></link>
flag for each setting.
</para>
--
2.25.1
0009-remove-declared-but-undefined-functions.patchtext/x-diff; charset=us-asciiDownload
From a268bc969f057c591db1e4b219d2fc30352d1a60 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 9 Jan 2023 13:21:02 -0600
Subject: [PATCH 9/9] remove declared but undefined functions
See:
b060dbe0001a1d6bf26cd294710f3cb203868d46
773df883e8f7543958d0d719c025b5f47c5a67f0
5b48925ad6ea04d1dfb5f893d1fa9dadd2a6a205
---
src/bin/pg_dump/compress_io.h | 2 --
src/include/access/gist_private.h | 2 --
src/include/access/xlogreader.h | 2 --
3 files changed, 6 deletions(-)
diff --git a/src/bin/pg_dump/compress_io.h b/src/bin/pg_dump/compress_io.h
index c04773a4006..a429dc4789d 100644
--- a/src/bin/pg_dump/compress_io.h
+++ b/src/bin/pg_dump/compress_io.h
@@ -54,8 +54,6 @@ typedef struct cfp cfp;
extern cfp *cfopen(const char *path, const char *mode,
const pg_compress_specification compression_spec);
-extern cfp *cfdopen(int fd, const char *mode,
- pg_compress_specification compression_spec);
extern cfp *cfopen_read(const char *path, const char *mode);
extern cfp *cfopen_write(const char *path, const char *mode,
const pg_compress_specification compression_spec);
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index f2bb4455f57..8af33d7b40d 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -549,8 +549,6 @@ extern void gistSplitByKey(Relation r, Page page, IndexTuple *itup,
/* gistbuild.c */
extern IndexBuildResult *gistbuild(Relation heap, Relation index,
struct IndexInfo *indexInfo);
-extern void gistValidateBufferingOption(const char *value);
-
/* gistbuildbuffers.c */
extern GISTBuildBuffers *gistInitBuildBuffers(int pagesPerBuffer, int levelStep,
int maxLevel);
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h
index da64f99f0b3..d77bb2ab9bc 100644
--- a/src/include/access/xlogreader.h
+++ b/src/include/access/xlogreader.h
@@ -332,8 +332,6 @@ extern XLogReaderState *XLogReaderAllocate(int wal_segment_size,
const char *waldir,
XLogReaderRoutine *routine,
void *private_data);
-extern XLogReaderRoutine *LocalXLogReaderRoutine(void);
-
/* Free an XLogReader */
extern void XLogReaderFree(XLogReaderState *state);
--
2.25.1
On Tue, Jan 10, 2023 at 10:27 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
On Tue, Jan 03, 2023 at 03:39:22PM -0600, Justin Pryzby wrote:
On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote:
On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote:
# Use larger ccache cache, as this task compiles with multiple compilers / # flag combinations - CCACHE_MAXSIZE: "1GB" + CCACHE_MAXSIZE: "1G"In 0006, I am not sure how much this matters. Perhaps somebody more
fluent with Cirrus, though, has a different opinion..It's got almost nothing to do with cirrus. It's an environment
variable, and we're using a suffix other than what's
supported/documented by ccache, which only happens to work.0014 and 0013 do not reduce the translation workload, as the messages
include some stuff specific to the GUC names accessed to, or some
specific details about the code paths triggered.It seems to matter because otherwise the translators sometimes re-type
the view name, which (not surprisingly) can get messed up, which is how
I mentioned having noticed this.On Tue, Jan 03, 2023 at 05:41:58PM +0900, Michael Paquier wrote:
On Tue, Jan 03, 2023 at 01:03:01PM +0530, Amit Kapila wrote:
One minor comment: - spoken in Belgium (BE), with a <acronym>UTF-8</acronym> character set + spoken in Belgium (BE), with a <acronym>UTF</acronym>-8 character setShouldn't this be <acronym>UTF8</acronym> as we are using in
func.sgml?Yeah, I was wondering as well why this change is not worse, which is
why I left it out of 33ab0a2. There is an acronym for UTF in
acronym.sgml, which makes sense to me, but that's the only place where
this is used. To add more on top of that, the docs basically need
only UTF8, and we have three references to UTF-16, none of them using
the <acronym> markup.I changed it for consistency, as it's the only thing that says <>UTF-8<>
anywhere, and charset.sgml already says <>UTF<>-8 elsewhere.Alternately, I suggest to change charset to say <>UTF8<> in both places.
As attached.
This also fixes "specualtive" in Amit's recent commit.
Thanks for noticing this. I'll take care of this and some other typo
patches together.
--
With Regards,
Amit Kapila.
On Tue, Jan 10, 2023 at 12:24:40PM +0530, Amit Kapila wrote:
Thanks for noticing this. I'll take care of this and some other typo
patches together.
Does this include 0010? I was just looking at the whole set and this
one looked like a cleanup worth on its own so I was going to handle
it, until I saw your update. If you are also looking at that, I won't
stand in your way, of course :)
--
Michael
On Tue, Jan 10, 2023 at 1:18 PM Michael Paquier <michael@paquier.xyz> wrote:
On Tue, Jan 10, 2023 at 12:24:40PM +0530, Amit Kapila wrote:
Thanks for noticing this. I'll take care of this and some other typo
patches together.Does this include 0010? I was just looking at the whole set and this
one looked like a cleanup worth on its own so I was going to handle
it, until I saw your update. If you are also looking at that, I won't
stand in your way, of course :)
I have not yet started, so please go ahead.
--
With Regards,
Amit Kapila.
On Tue, Jan 10, 2023 at 01:55:56PM +0530, Amit Kapila wrote:
I have not yet started, so please go ahead.
Okay, I have looked at that and fixed the whole new things, including
the typo you have introduced. 0001~0004 have been left out, as of the
same reasons as upthread.
--
Michael
Some more accumulated/new typos.
Attachments:
0001-use-an-SQL-rather-than-a-SQL.patchtext/x-diff; charset=us-asciiDownload
From 6c79a0d4e0251dbbac38babb60bb2d0fbae3da8d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Wed, 11 Jan 2023 12:52:25 -0600
Subject: [PATCH 01/10] use "an SQL" rather than a SQL
Per 04539e
---
doc/src/sgml/ecpg.sgml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index a76cf3538f1..f52165165dc 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -1506,7 +1506,7 @@ EXEC SQL TYPE serial_t IS long;
</para>
<para>
- Any word you declare as a typedef cannot be used as a SQL keyword
+ Any word you declare as a typedef cannot be used as an SQL keyword
in <literal>EXEC SQL</literal> commands later in the same program.
For example, this won't work:
<programlisting>
@@ -1518,7 +1518,7 @@ EXEC SQL START TRANSACTION;
</programlisting>
ECPG will report a syntax error for <literal>START
TRANSACTION</literal>, because it no longer
- recognizes <literal>START</literal> as a SQL keyword,
+ recognizes <literal>START</literal> as an SQL keyword,
only as a typedef.
(If you have such a conflict, and renaming the typedef
seems impractical, you could write the SQL command
@@ -1530,7 +1530,7 @@ EXEC SQL START TRANSACTION;
In <productname>PostgreSQL</productname> releases before v16, use
of SQL keywords as typedef names was likely to result in syntax
errors associated with use of the typedef itself, rather than use
- of the name as a SQL keyword. The new behavior is less likely to
+ of the name as an SQL keyword. The new behavior is less likely to
cause problems when an existing ECPG application is recompiled in
a new <productname>PostgreSQL</productname> release with new
keywords.
--
2.25.1
0002-comment-typos.patchtext/x-diff; charset=us-asciiDownload
From fef49b822bad849722ec9b043ffd676c80492d0d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 15 Jan 2023 17:00:06 -0600
Subject: [PATCH 02/10] comment typos
---
src/backend/commands/dbcommands.c | 2 +-
src/backend/executor/execMain.c | 2 +-
src/backend/jit/llvm/llvmjit_inline.cpp | 2 +-
src/backend/replication/logical/snapbuild.c | 2 +-
src/backend/replication/walsender.c | 6 +++---
src/bin/pg_dump/pg_backup_custom.c | 2 +-
src/bin/pg_dump/pg_dumpall.c | 2 +-
src/include/lib/ilist.h | 2 +-
src/test/regress/expected/alter_table.out | 2 +-
src/test/regress/expected/create_procedure.out | 2 +-
src/test/regress/sql/alter_table.sql | 2 +-
src/test/regress/sql/create_procedure.sql | 2 +-
src/test/subscription/t/031_column_list.pl | 2 +-
13 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 1f4ce2fb9cf..ef05633bb05 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -3090,7 +3090,7 @@ dbase_redo(XLogReaderState *record)
/*
* There's a case where the copy source directory is missing for the
- * same reason above. Create the emtpy source directory so that
+ * same reason above. Create the empty source directory so that
* copydir below doesn't fail. The directory will be dropped soon by
* recovery.
*/
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index a5115b9c1f7..39bfb48dc22 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -134,7 +134,7 @@ ExecutorStart(QueryDesc *queryDesc, int eflags)
/*
* In some cases (e.g. an EXECUTE statement) a query execution will skip
* parse analysis, which means that the query_id won't be reported. Note
- * that it's harmless to report the query_id multiple time, as the call
+ * that it's harmless to report the query_id multiple times, as the call
* will be ignored if the top level query_id has already been reported.
*/
pgstat_report_query_id(queryDesc->plannedstmt->queryId, false);
diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp
index dc35e002f51..c765add8564 100644
--- a/src/backend/jit/llvm/llvmjit_inline.cpp
+++ b/src/backend/jit/llvm/llvmjit_inline.cpp
@@ -753,7 +753,7 @@ function_inlinable(llvm::Function &F,
/* import referenced function itself */
importVars.insert(referencedFunction->getName());
- /* import referenced function and its dependants */
+ /* import referenced function and its dependents */
for (auto& recImportVar : recImportVars)
importVars.insert(recImportVar.first());
}
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 829c5681120..62542827e4b 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1816,7 +1816,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
fsync_fname("pg_logical/snapshots", true);
/*
- * Now there's no way we can loose the dumped state anymore, remember this
+ * Now there's no way we can lose the dumped state anymore, remember this
* as a serialization point.
*/
builder->last_serialized_snapshot = lsn;
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 4ed3747e3f9..75e8363e248 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2050,9 +2050,9 @@ PhysicalConfirmReceivedLocation(XLogRecPtr lsn)
/*
* One could argue that the slot should be saved to disk now, but that'd
- * be energy wasted - the worst lost information can do here is give us
- * wrong information in a statistics view - we'll just potentially be more
- * conservative in removing files.
+ * be energy wasted - the worst thing lost information could cause here is
+ * to give wrong information in a statistics view - we'll just potentially
+ * be more conservative in removing files.
*/
}
diff --git a/src/bin/pg_dump/pg_backup_custom.c b/src/bin/pg_dump/pg_backup_custom.c
index d1e54644a94..7529367a7b9 100644
--- a/src/bin/pg_dump/pg_backup_custom.c
+++ b/src/bin/pg_dump/pg_backup_custom.c
@@ -99,7 +99,7 @@ static size_t _CustomReadFunc(ArchiveHandle *AH, char **buf, size_t *buflen);
* It's task is to create any extra archive context (using AH->formatData),
* and to initialize the supported function pointers.
*
- * It should also prepare whatever it's input source is for reading/writing,
+ * It should also prepare whatever its input source is for reading/writing,
* and in the case of a read mode connection, it should load the Header & TOC.
*/
void
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index fbd1c6fc85b..cd421c59443 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -995,7 +995,7 @@ dumpRoleMembership(PGconn *conn)
fprintf(OPF, "--\n-- Role memberships\n--\n\n");
/*
- * We can't dump these GRANT commands in arbitary order, because a role
+ * We can't dump these GRANT commands in arbitrary order, because a role
* that is named as a grantor must already have ADMIN OPTION on the
* role for which it is granting permissions, except for the boostrap
* superuser, who can always be named as the grantor.
diff --git a/src/include/lib/ilist.h b/src/include/lib/ilist.h
index e03aa1c683b..095107a99c4 100644
--- a/src/include/lib/ilist.h
+++ b/src/include/lib/ilist.h
@@ -39,7 +39,7 @@
* operations that can be done without branches (and thus faster) on lists
* that use circular representation. However, it is often convenient to
* initialize list headers to zeroes rather than setting them up with an
- * explicit initialization function, so we also allow the NULL initalization.
+ * explicit initialization function, so we also allow the NULL initialization.
*
* EXAMPLES
*
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out
index 9e5f6c1a804..97bfc3475b6 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -2566,7 +2566,7 @@ select * from at_view_2;
drop view at_view_2;
drop view at_view_1;
drop table at_base_table;
--- check adding a column not iself requiring a rewrite, together with
+-- check adding a column not itself requiring a rewrite, together with
-- a column requiring a default (bug #16038)
-- ensure that rewrites aren't silently optimized away, removing the
-- value of the test
diff --git a/src/test/regress/expected/create_procedure.out b/src/test/regress/expected/create_procedure.out
index 46c827f9791..f2a677fa552 100644
--- a/src/test/regress/expected/create_procedure.out
+++ b/src/test/regress/expected/create_procedure.out
@@ -100,7 +100,7 @@ SELECT * FROM cp_test ORDER BY b COLLATE "C";
1 | xyzzy
(4 rows)
--- utitlity functions currently not supported here
+-- utility functions currently not supported here
CREATE PROCEDURE ptestx()
LANGUAGE SQL
BEGIN ATOMIC
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql
index f58b2f75d5b..b5d57a771ae 100644
--- a/src/test/regress/sql/alter_table.sql
+++ b/src/test/regress/sql/alter_table.sql
@@ -1635,7 +1635,7 @@ drop view at_view_2;
drop view at_view_1;
drop table at_base_table;
--- check adding a column not iself requiring a rewrite, together with
+-- check adding a column not itself requiring a rewrite, together with
-- a column requiring a default (bug #16038)
-- ensure that rewrites aren't silently optimized away, removing the
diff --git a/src/test/regress/sql/create_procedure.sql b/src/test/regress/sql/create_procedure.sql
index 75cc0fcf2a6..35b872779ef 100644
--- a/src/test/regress/sql/create_procedure.sql
+++ b/src/test/regress/sql/create_procedure.sql
@@ -42,7 +42,7 @@ CALL ptest1s('b');
SELECT * FROM cp_test ORDER BY b COLLATE "C";
--- utitlity functions currently not supported here
+-- utility functions currently not supported here
CREATE PROCEDURE ptestx()
LANGUAGE SQL
BEGIN ATOMIC
diff --git a/src/test/subscription/t/031_column_list.pl b/src/test/subscription/t/031_column_list.pl
index 7c313e26eea..fd77757352a 100644
--- a/src/test/subscription/t/031_column_list.pl
+++ b/src/test/subscription/t/031_column_list.pl
@@ -1034,7 +1034,7 @@ is( $node_subscriber->safe_psql('postgres', "SELECT * FROM s1.t ORDER BY a"),
4|5|6),
'two publications, publishing the same relation');
-# Now resync the subcription, but with publications in the opposite order.
+# Now resync the subscription, but with publications in the opposite order.
# The result should be the same.
$node_subscriber->safe_psql(
--
2.25.1
0003-Avoid-hardcoded-reference-only-to-.gz.patchtext/x-diff; charset=us-asciiDownload
From 226d9e218b2bfb6e7421dd50e53cfec4c7857ef4 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 28 Jan 2023 12:48:13 -0600
Subject: [PATCH 03/10] Avoid hardcoded reference (only) to .gz
This should've been updated at:
dab298471ff2f91f33bc25bfb73e435d3ab02148
751b8d23b788580bbff7463e3959f9a92a95b28a
Ideally it doesn't reference any specific compression algorithm at all.
---
src/bin/pg_basebackup/pg_basebackup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 1d3ef2c694e..414771ec87c 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -2015,8 +2015,8 @@ BaseBackup(char *compression_algorithm, char *compression_detail,
* If we write the data out to a tar file, it will be named
* base.tar if it's the main data directory or <tablespaceoid>.tar
* if it's for another tablespace. CreateBackupStreamer() will
- * arrange to add .gz to the archive name if pg_basebackup is
- * performing compression.
+ * arrange to add an extension to the archive name if pg_basebackup
+ * is performing compression.
*/
if (PQgetisnull(res, i, 0))
{
--
2.25.1
0004-duplicate-words.patchtext/x-diff; charset=us-asciiDownload
From b8296980b51629418336ba1c0a4ae3a57b73d8f9 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 17 Jan 2023 22:28:42 -0600
Subject: [PATCH 04/10] duplicate words
---
contrib/postgres_fdw/deparse.c | 2 +-
doc/src/sgml/ref/create_database.sgml | 2 +-
doc/src/sgml/ref/create_schema.sgml | 2 +-
src/include/partitioning/partdesc.h | 2 +-
src/include/port/simd.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 8a847deb13b..09d6dd60ddc 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -2412,7 +2412,7 @@ deparseAnalyzeInfoSql(StringInfo buf, Relation rel)
*
* We could also do "ORDER BY random() LIMIT x", which would always pick
* the expected number of rows, but it requires sorting so it may be much
- * more expensive (particularly on large tables, which is what what the
+ * more expensive (particularly on large tables, which is what the
* remote sampling is meant to improve).
*/
void
diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index f3df2def864..91c39c52303 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -89,7 +89,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
The role name of the user who will own the new database,
or <literal>DEFAULT</literal> to use the default (namely, the
user executing the command). To create a database owned by another
- role, you must must be able to <literal>SET ROLE</literal> to that
+ role, you must be able to <literal>SET ROLE</literal> to that
role.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/create_schema.sgml b/doc/src/sgml/ref/create_schema.sgml
index 04b0c28731e..ed69298ccc6 100644
--- a/doc/src/sgml/ref/create_schema.sgml
+++ b/doc/src/sgml/ref/create_schema.sgml
@@ -89,7 +89,7 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp
<para>
The role name of the user who will own the new schema. If omitted,
defaults to the user executing the command. To create a schema
- owned by another role, you must must be able to
+ owned by another role, you must be able to
<literal>SET ROLE</literal> to that role.
</para>
</listitem>
diff --git a/src/include/partitioning/partdesc.h b/src/include/partitioning/partdesc.h
index 7d71fb6e931..e157eae9c1e 100644
--- a/src/include/partitioning/partdesc.h
+++ b/src/include/partitioning/partdesc.h
@@ -31,7 +31,7 @@ typedef struct PartitionDescData
int nparts; /* Number of partitions */
bool detached_exist; /* Are there any detached partitions? */
Oid *oids; /* Array of 'nparts' elements containing
- * partition OIDs in order of the their bounds */
+ * partition OIDs in order of their bounds */
bool *is_leaf; /* Array of 'nparts' elements storing whether
* the corresponding 'oids' element belongs to
* a leaf partition or not */
diff --git a/src/include/port/simd.h b/src/include/port/simd.h
index c836360d4b7..1fa6c3bc6c4 100644
--- a/src/include/port/simd.h
+++ b/src/include/port/simd.h
@@ -345,7 +345,7 @@ vector8_ssub(const Vector8 v1, const Vector8 v2)
#endif /* ! USE_NO_SIMD */
/*
- * Return a vector with all bits set in each lane where the the corresponding
+ * Return a vector with all bits set in each lane where the corresponding
* lanes in the inputs are equal.
*/
#ifndef USE_NO_SIMD
--
2.25.1
0005-WIP-avoid-whitespace-preceding-following-else.patchtext/x-diff; charset=us-asciiDownload
From fe2c8749fd0ca92a433e5beca00014266074ff4d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 12 Jan 2023 21:23:09 -0600
Subject: [PATCH 05/10] WIP: avoid whitespace preceding/following 'else'
---
contrib/dblink/dblink.c | 1 -
contrib/spi/refint.c | 1 -
src/backend/commands/functioncmds.c | 1 -
src/backend/commands/tablecmds.c | 1 -
src/backend/executor/nodeTidrangescan.c | 1 -
src/backend/libpq/be-secure-openssl.c | 1 -
src/backend/optimizer/geqo/geqo_erx.c | 1 -
src/backend/optimizer/geqo/geqo_pmx.c | 1 -
src/backend/optimizer/geqo/geqo_pool.c | 1 -
src/backend/optimizer/util/clauses.c | 1 -
src/backend/replication/logical/origin.c | 1 -
src/backend/replication/logical/snapbuild.c | 1 -
src/backend/rewrite/rowsecurity.c | 1 -
src/backend/utils/adt/formatting.c | 1 -
src/backend/utils/adt/pgstatfuncs.c | 5 -----
.../mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c | 1 -
src/backend/utils/mmgr/mcxt.c | 1 -
src/bin/pg_amcheck/pg_amcheck.c | 3 ---
src/bin/psql/command.c | 4 ----
src/interfaces/libpq/fe-connect.c | 1 -
20 files changed, 29 deletions(-)
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 78a8bcee6e3..263e35442b3 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -2428,7 +2428,6 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk
ereport(ERROR,
(errcode(ERRCODE_CARDINALITY_VIOLATION),
errmsg("source criteria matched more than one record")));
-
else if (ret == SPI_OK_SELECT && SPI_processed == 1)
{
SPITupleTable *tuptable = SPI_tuptable;
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 18062eb1cff..31e95663466 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -456,7 +456,6 @@ check_foreign_key(PG_FUNCTION_ARGS)
* updates new key values in referenced tables
*/
-
else if (action == 'c')
{
if (is_update == 1)
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index 69f66dfe7da..bfd44d3b2c6 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -1575,7 +1575,6 @@ CreateCast(CreateCastStmt *stmt)
ereport(WARNING,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("cast will be ignored because the source data type is a domain")));
-
else if (targettyptype == TYPTYPE_DOMAIN)
ereport(WARNING,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 1293545947e..debbe8a73ef 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -17002,7 +17002,6 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
}
else if (IsA(stmt, AlterObjectSchemaStmt))
reltype = ((AlterObjectSchemaStmt *) stmt)->objectType;
-
else if (IsA(stmt, AlterTableStmt))
reltype = ((AlterTableStmt *) stmt)->objtype;
else
diff --git a/src/backend/executor/nodeTidrangescan.c b/src/backend/executor/nodeTidrangescan.c
index 2124c55ef53..5f0c9f06879 100644
--- a/src/backend/executor/nodeTidrangescan.c
+++ b/src/backend/executor/nodeTidrangescan.c
@@ -183,7 +183,6 @@ TidRangeEval(TidRangeScanState *node)
if (ItemPointerCompare(&lb, &lowerBound) > 0)
ItemPointerCopy(&lb, &lowerBound);
}
-
else if (tidopexpr->exprtype == TIDEXPR_UPPER_BOUND)
{
ItemPointerData ub;
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index e3c7c12aa0e..4e721b705d5 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -1630,7 +1630,6 @@ default_openssl_tls_init(SSL_CTX *context, bool isServerStart)
if (ssl_passphrase_command[0] && ssl_passphrase_command_supports_reload)
SSL_CTX_set_default_passwd_cb(context, ssl_external_passwd_cb);
else
-
/*
* If reloading and no external command is configured, override
* OpenSSL's default handling of passphrase-protected files,
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index 21ad7854118..26b58f43dee 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -212,7 +212,6 @@ gimme_tour(PlannerInfo *root, Edge *edge_table, Gene *new_gene, int num_gene)
if (edge_table[new_gene[i - 1]].unused_edges > 0)
new_gene[i] = gimme_gene(root, edge_table[(int) new_gene[i - 1]], edge_table);
-
else
{ /* cope with fault */
edge_failures++;
diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c
index e44fd0bae5a..dd35d269281 100644
--- a/src/backend/optimizer/geqo/geqo_pmx.c
+++ b/src/backend/optimizer/geqo/geqo_pmx.c
@@ -112,7 +112,6 @@ pmx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene)
if (tour1[k] == tour2[k])
found = 1; /* find match in tour2 */
-
else
{
found = 0; /* substitute elements */
diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c
index e45bd7286b2..584dc020fda 100644
--- a/src/backend/optimizer/geqo/geqo_pool.c
+++ b/src/backend/optimizer/geqo/geqo_pool.c
@@ -218,7 +218,6 @@ spread_chromo(PlannerInfo *root, Chromosome *chromo, Pool *pool)
else if (bot - top <= 1)
index = bot;
-
/*
* these 2 cases move the search indices since a new location has not
* yet been found.
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 76e25118f94..080180e2d0d 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -733,7 +733,6 @@ max_parallel_hazard_walker(Node *node, max_parallel_hazard_context *context)
if (max_parallel_hazard_test(PROPARALLEL_RESTRICTED, context))
return true;
}
-
else if (IsA(node, NextValueExpr))
{
if (max_parallel_hazard_test(PROPARALLEL_UNSAFE, context))
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index 2c04c8707dc..04b084d298e 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -1133,7 +1133,6 @@ replorigin_session_setup(RepOriginId node, int acquired_by)
/* not our slot */
if (curstate->roident != node)
continue;
-
else if (curstate->acquired_by != 0 && acquired_by == 0)
{
ereport(ERROR,
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 62542827e4b..e45e0e56756 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1647,7 +1647,6 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not stat file \"%s\": %m", path)));
-
else if (ret == 0)
{
/*
diff --git a/src/backend/rewrite/rowsecurity.c b/src/backend/rewrite/rowsecurity.c
index 569c1c94679..0666e7ba06a 100644
--- a/src/backend/rewrite/rowsecurity.c
+++ b/src/backend/rewrite/rowsecurity.c
@@ -727,7 +727,6 @@ add_security_quals(int rt_index,
*securityQuals = list_append_unique(*securityQuals, rowsec_expr);
}
else
-
/*
* A permissive policy must exist for rows to be visible at all.
* Therefore, if there were no permissive policies found, return a
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index f3f4db5ef60..7ac400ce092 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -5082,7 +5082,6 @@ NUM_prepare_locale(NUMProc *Np)
*/
if (lconv->decimal_point && *lconv->decimal_point)
Np->decimal = lconv->decimal_point;
-
else
Np->decimal = ".";
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 67374934022..1797416427d 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -814,7 +814,6 @@ pg_stat_get_backend_activity_start(PG_FUNCTION_ARGS)
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
PG_RETURN_NULL();
-
else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
PG_RETURN_NULL();
@@ -840,7 +839,6 @@ pg_stat_get_backend_xact_start(PG_FUNCTION_ARGS)
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
PG_RETURN_NULL();
-
else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
PG_RETURN_NULL();
@@ -862,7 +860,6 @@ pg_stat_get_backend_start(PG_FUNCTION_ARGS)
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
PG_RETURN_NULL();
-
else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
PG_RETURN_NULL();
@@ -886,7 +883,6 @@ pg_stat_get_backend_client_addr(PG_FUNCTION_ARGS)
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
PG_RETURN_NULL();
-
else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
PG_RETURN_NULL();
@@ -931,7 +927,6 @@ pg_stat_get_backend_client_port(PG_FUNCTION_ARGS)
if ((beentry = pgstat_fetch_stat_beentry(beid)) == NULL)
PG_RETURN_NULL();
-
else if (!HAS_PGSTAT_PERMISSIONS(beentry->st_userid))
PG_RETURN_NULL();
diff --git a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
index bae24681668..9d344e9a8e4 100644
--- a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
+++ b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
@@ -162,7 +162,6 @@ euc_jis_20042shift_jis_2004(const unsigned char *euc, unsigned char *p, int len,
else
*p++ = ten + 0x9e;
}
-
else if (l == 2) /* JIS X 0213 plane 1? */
{
ku = c1 - 0xa0;
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 0b00802df70..4646ae50277 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -711,7 +711,6 @@ MemoryContextStatsDetail(MemoryContext context, int max_children,
grand_totals.freespace, grand_totals.freechunks,
grand_totals.totalspace - grand_totals.freespace);
else
-
/*
* Use LOG_SERVER_ONLY to prevent the memory contexts from being sent
* to the connected client.
diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c
index 68f8180c19f..4b770d83a70 100644
--- a/src/bin/pg_amcheck/pg_amcheck.c
+++ b/src/bin/pg_amcheck/pg_amcheck.c
@@ -1017,18 +1017,15 @@ verify_heap_slot_handler(PGresult *res, PGconn *conn, void *context)
PQgetvalue(res, i, 0), /* blkno */
PQgetvalue(res, i, 1), /* offnum */
PQgetvalue(res, i, 2)); /* attnum */
-
else if (!PQgetisnull(res, i, 1))
printf(_("heap table \"%s.%s.%s\", block %s, offset %s:\n"),
rel->datinfo->datname, rel->nspname, rel->relname,
PQgetvalue(res, i, 0), /* blkno */
PQgetvalue(res, i, 1)); /* offnum */
-
else if (!PQgetisnull(res, i, 0))
printf(_("heap table \"%s.%s.%s\", block %s:\n"),
rel->datinfo->datname, rel->nspname, rel->relname,
PQgetvalue(res, i, 0)); /* blkno */
-
else
printf(_("heap table \"%s.%s.%s\":\n"),
rel->datinfo->datname, rel->nspname, rel->relname);
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index b5201edf555..3e0b37a17ca 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -1992,7 +1992,6 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
success = do_lo_export(opt1, opt2);
}
}
-
else if (strcmp(cmd + 3, "import") == 0)
{
if (!opt1)
@@ -2006,12 +2005,10 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
success = do_lo_import(opt1, opt2);
}
}
-
else if (strcmp(cmd + 3, "list") == 0)
success = listLargeObjects(false);
else if (strcmp(cmd + 3, "list+") == 0)
success = listLargeObjects(true);
-
else if (strcmp(cmd + 3, "unlink") == 0)
{
if (!opt1)
@@ -2022,7 +2019,6 @@ exec_command_lo(PsqlScanState scan_state, bool active_branch, const char *cmd)
else
success = do_lo_unlink(opt1);
}
-
else
status = PSQL_CMD_UNKNOWN;
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 50b5df3490b..00ba10b01b4 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7012,7 +7012,6 @@ passwordFromFile(const char *hostname, const char *port, const char *dbname,
if (hostname == NULL || hostname[0] == '\0')
hostname = DefaultHost;
else if (is_unixsock_path(hostname))
-
/*
* We should probably use canonicalize_path(), but then we have to
* bring path.c into libpq, and it doesn't seem worth it.
--
2.25.1
0006-doc-typo-pg_used_reserved_connections.patchtext/x-diff; charset=us-asciiDownload
From 25547eaf0cd16ffcd49894922c3f478a4b005308 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Fri, 20 Jan 2023 17:39:35 -0600
Subject: [PATCH 06/10] doc typo: pg_used_reserved_connections
v16: 6e2775e4d4e47775f0d933e4a93c148024a3bc63
---
doc/src/sgml/config.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index d190be1925d..8c56b134a84 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -718,7 +718,7 @@ include_dir 'conf.d'
<para>
Determines the number of connection <quote>slots</quote> that are
reserved for connections by roles with privileges of the
- <link linkend="predefined-roles-table"><literal>pg_used_reserved_connections</literal></link>
+ <link linkend="predefined-roles-table"><literal>pg_use_reserved_connections</literal></link>
role. Whenever the number of free connection slots is greater than
<xref linkend="guc-superuser-reserved-connections"/> but less than or
equal to the sum of <varname>superuser_reserved_connections</varname>
--
2.25.1
0007-cirrus-ccache-use-G-rather-than-GB-suffix.patchtext/x-diff; charset=us-asciiDownload
From 83556cfd8be8c1f0f27cbed3ffd42dfae038ddd3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 13 Nov 2022 14:03:27 -0600
Subject: [PATCH 07/10] cirrus/ccache: use G rather than GB suffix..
the former being the documented spelling.
---
.cirrus.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.cirrus.yml b/.cirrus.yml
index f2129787529..10ec7ac406a 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -665,7 +665,7 @@ task:
# Use larger ccache cache, as this task compiles with multiple compilers /
# flag combinations
- CCACHE_MAXSIZE: "1GB"
+ CCACHE_MAXSIZE: "1G"
CCACHE_DIR: "/tmp/ccache_dir"
LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
--
2.25.1
0008-comments-grammar-extended-and-other-stats.patchtext/x-diff; charset=us-asciiDownload
From cc3c1536bd6f6d69d960c2cecc5e32ca814c9a21 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 26 Sep 2021 11:13:27 -0500
Subject: [PATCH 08/10] comments grammar: extended (and other) stats
See:
202109272104.7t253iw236fb@alvherre.pgsql
070d2e19e40897d857f570f24888fc30727ed9c0
609b0652af00374b89411ea2613fd5bb92bca92c
a4d75c86bf15220df22de0a92c819ecef9db3849
7300a699502fe5432b05fbc75baca534b080bebb
ccaa3569f58796868303629bc2d63ddddb599b38
---
src/backend/commands/statscmds.c | 4 ++--
src/backend/statistics/README | 2 +-
src/backend/statistics/dependencies.c | 8 ++++----
src/backend/statistics/extended_stats.c | 4 ++--
src/backend/utils/adt/pgstatfuncs.c | 4 ++--
src/backend/utils/adt/ruleutils.c | 4 ++--
src/include/statistics/extended_stats_internal.h | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 26ebd0819d6..2e41745646b 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -377,7 +377,7 @@ CreateStatistics(CreateStatsStmt *stmt)
/*
* If no statistic type was specified, build them all (but only when the
- * statistics is defined on more than one column/expression).
+ * statistics object is defined on more than one column/expression).
*/
if ((!requested_type) && (numcols >= 2))
{
@@ -432,7 +432,7 @@ CreateStatistics(CreateStatsStmt *stmt)
* similar to why we don't bother with extracting columns from
* expressions. It's either expensive or very easy to defeat for
* determined user, and there's no risk if we allow such statistics (the
- * statistics is useless, but harmless).
+ * statistic is useless, but harmless).
*/
foreach(cell, stxexprs)
{
diff --git a/src/backend/statistics/README b/src/backend/statistics/README
index 13a97a35662..b87ca4734b2 100644
--- a/src/backend/statistics/README
+++ b/src/backend/statistics/README
@@ -24,7 +24,7 @@ There are currently several kinds of extended statistics:
Compatible clause types
-----------------------
-Each type of statistics may be used to estimate some subset of clause types.
+Each type of statistic may be used to estimate some subset of clause types.
(a) functional dependencies - equality clauses (AND), possibly IS NULL
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index e6e2835345e..a54e038d6a1 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -846,7 +846,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
AttrNumber clause_attnum;
/*
- * Had we found incompatible clause in the arguments, treat the
+ * If we found an incompatible clause in the arguments, treat the
* whole clause as incompatible.
*/
if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1274,7 +1274,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
Node *or_expr = NULL;
/*
- * Had we found incompatible expression in the arguments, treat
+ * If we found an incompatible expression in the arguments, treat
* the whole expression as incompatible.
*/
if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
@@ -1725,7 +1725,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
/*
* For expressions, we need to do two translations. First
- * we have to translate the negative attnum to index in
+ * we have to translate the negative attnum to an index in
* the list of expressions (in the statistics object).
* Then we need to see if there's a matching clause. The
* index of the unique expression determines the attnum
@@ -1733,7 +1733,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
*/
idx = -(1 + attnum);
- /* Is the expression index is valid? */
+ /* Is the expression index valid? */
Assert((idx >= 0) && (idx < list_length(stat->exprs)));
expr = (Node *) list_nth(stat->exprs, idx);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 572d9b44643..e18398cd428 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1214,8 +1214,8 @@ stat_covers_expressions(StatisticExtInfo *stat, List *exprs,
/*
* choose_best_statistics
- * Look for and return statistics with the specified 'requiredkind' which
- * have keys that match at least two of the given attnums. Return NULL if
+ * Look for and return the statistics object with the specified 'requiredkind' which
+ * has keys that match at least two of the given attnums. Return NULL if
* there's no match.
*
* The current selection criteria is very simple - we choose the statistics
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 1797416427d..268ff16f99c 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1755,7 +1755,7 @@ pg_stat_get_archiver(PG_FUNCTION_ARGS)
}
/*
- * Get the statistics for the replication slot. If the slot statistics is not
+ * Get the statistics for the replication slot. If the slot statistics are not
* available, return all-zeroes stats.
*/
Datum
@@ -1827,7 +1827,7 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
/*
* Get the subscription statistics for the given subscription. If the
- * subscription statistics is not available, return all-zeros stats.
+ * subscription statistics are not available, return all-zeros stats.
*/
Datum
pg_stat_get_subscription_stats(PG_FUNCTION_ARGS)
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 9ac42efdbc3..075c4d0ad86 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1699,8 +1699,8 @@ pg_get_statisticsobj_worker(Oid statextid, bool columns_only, bool missing_ok)
* will create all statistics types on a newer postgres version, if
* the statistics had all options enabled on the original version.
*
- * But if the statistics is defined on just a single column, it has to
- * be an expression statistics. In that case we don't need to specify
+ * But if the statistics are defined on just a single column, it has to
+ * be a statistics expression. In that case we don't need to specify
* kinds.
*/
if ((!ndistinct_enabled || !dependencies_enabled || !mcv_enabled) &&
diff --git a/src/include/statistics/extended_stats_internal.h b/src/include/statistics/extended_stats_internal.h
index 7b55eb8ffac..72f94814704 100644
--- a/src/include/statistics/extended_stats_internal.h
+++ b/src/include/statistics/extended_stats_internal.h
@@ -57,7 +57,7 @@ typedef struct SortItem
int count;
} SortItem;
-/* a unified representation of the data the statistics is built on */
+/* a unified representation of the data the statistics object is built on */
typedef struct StatsBuildData
{
int numrows;
--
2.25.1
0009-fix-whitespace.patchtext/x-diff; charset=us-asciiDownload
From f2e68b7c2f5dd727815fbe24390996324d692d43 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 23 Jul 2022 15:10:01 -0500
Subject: [PATCH 09/10] fix whitespace
weird since c91560defc57f89f7e88632ea14ae77b5cec78ee
See also:
https://www.postgresql.org/message-id/CAFBsxsHtYvE1Txm+NYM5gB1C3EZN_qDPJOOsJK_VsC2DXqZfcA@mail.gmail.com
---
src/backend/commands/indexcmds.c | 2 +-
src/backend/utils/activity/backend_status.c | 2 +-
src/backend/utils/cache/inval.c | 188 ++++++++++----------
src/backend/utils/mmgr/mcxt.c | 4 +-
4 files changed, 98 insertions(+), 98 deletions(-)
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 16ec0b114e6..38e6d9ebe7e 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2313,7 +2313,7 @@ GetDefaultOpClass(Oid type_id, Oid am_id)
* extended statistics, etc.
*
* The parameters are typically: the original table name, the original field
- * name, and a "type" string (such as "seq" or "pkey"). The field name
+ * name, and a "type" string (such as "seq" or "pkey"). The field name
* and/or type can be NULL if not relevant.
*
* The result is a palloc'd string.
diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c
index 608d01ea0dd..f6e847ff3b6 100644
--- a/src/backend/utils/activity/backend_status.c
+++ b/src/backend/utils/activity/backend_status.c
@@ -786,7 +786,7 @@ pgstat_read_current_status(void)
* Follow the protocol of retrying if st_changecount changes while we
* copy the entry, or if it's odd. (The check for odd is needed to
* cover the case where we are able to completely copy the entry while
- * the source backend is between increment steps.) We use a volatile
+ * the source backend is between increment steps.) We use a volatile
* pointer here to ensure the compiler doesn't try to get cute.
*/
for (;;)
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 0008826f67c..cc7de542b1e 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -3,100 +3,100 @@
* inval.c
* POSTGRES cache invalidation dispatcher code.
*
- * This is subtle stuff, so pay attention:
- *
- * When a tuple is updated or deleted, our standard visibility rules
- * consider that it is *still valid* so long as we are in the same command,
- * ie, until the next CommandCounterIncrement() or transaction commit.
- * (See access/heap/heapam_visibility.c, and note that system catalogs are
- * generally scanned under the most current snapshot available, rather than
- * the transaction snapshot.) At the command boundary, the old tuple stops
- * being valid and the new version, if any, becomes valid. Therefore,
- * we cannot simply flush a tuple from the system caches during heap_update()
- * or heap_delete(). The tuple is still good at that point; what's more,
- * even if we did flush it, it might be reloaded into the caches by a later
- * request in the same command. So the correct behavior is to keep a list
- * of outdated (updated/deleted) tuples and then do the required cache
- * flushes at the next command boundary. We must also keep track of
- * inserted tuples so that we can flush "negative" cache entries that match
- * the new tuples; again, that mustn't happen until end of command.
- *
- * Once we have finished the command, we still need to remember inserted
- * tuples (including new versions of updated tuples), so that we can flush
- * them from the caches if we abort the transaction. Similarly, we'd better
- * be able to flush "negative" cache entries that may have been loaded in
- * place of deleted tuples, so we still need the deleted ones too.
- *
- * If we successfully complete the transaction, we have to broadcast all
- * these invalidation events to other backends (via the SI message queue)
- * so that they can flush obsolete entries from their caches. Note we have
- * to record the transaction commit before sending SI messages, otherwise
- * the other backends won't see our updated tuples as good.
- *
- * When a subtransaction aborts, we can process and discard any events
- * it has queued. When a subtransaction commits, we just add its events
- * to the pending lists of the parent transaction.
- *
- * In short, we need to remember until xact end every insert or delete
- * of a tuple that might be in the system caches. Updates are treated as
- * two events, delete + insert, for simplicity. (If the update doesn't
- * change the tuple hash value, catcache.c optimizes this into one event.)
- *
- * We do not need to register EVERY tuple operation in this way, just those
- * on tuples in relations that have associated catcaches. We do, however,
- * have to register every operation on every tuple that *could* be in a
- * catcache, whether or not it currently is in our cache. Also, if the
- * tuple is in a relation that has multiple catcaches, we need to register
- * an invalidation message for each such catcache. catcache.c's
- * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
- * catcaches may need invalidation for a given tuple.
- *
- * Also, whenever we see an operation on a pg_class, pg_attribute, or
- * pg_index tuple, we register a relcache flush operation for the relation
- * described by that tuple (as specified in CacheInvalidateHeapTuple()).
- * Likewise for pg_constraint tuples for foreign keys on relations.
- *
- * We keep the relcache flush requests in lists separate from the catcache
- * tuple flush requests. This allows us to issue all the pending catcache
- * flushes before we issue relcache flushes, which saves us from loading
- * a catcache tuple during relcache load only to flush it again right away.
- * Also, we avoid queuing multiple relcache flush requests for the same
- * relation, since a relcache flush is relatively expensive to do.
- * (XXX is it worth testing likewise for duplicate catcache flush entries?
- * Probably not.)
- *
- * Many subsystems own higher-level caches that depend on relcache and/or
- * catcache, and they register callbacks here to invalidate their caches.
- * While building a higher-level cache entry, a backend may receive a
- * callback for the being-built entry or one of its dependencies. This
- * implies the new higher-level entry would be born stale, and it might
- * remain stale for the life of the backend. Many caches do not prevent
- * that. They rely on DDL for can't-miss catalog changes taking
- * AccessExclusiveLock on suitable objects. (For a change made with less
- * locking, backends might never read the change.) The relation cache,
- * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
- * than the beginning of the next transaction. Hence, when a relevant
- * invalidation callback arrives during a build, relcache.c reattempts that
- * build. Caches with similar needs could do likewise.
- *
- * If a relcache flush is issued for a system relation that we preload
- * from the relcache init file, we must also delete the init file so that
- * it will be rebuilt during the next backend restart. The actual work of
- * manipulating the init file is in relcache.c, but we keep track of the
- * need for it here.
- *
- * Currently, inval messages are sent without regard for the possibility
- * that the object described by the catalog tuple might be a session-local
- * object such as a temporary table. This is because (1) this code has
- * no practical way to tell the difference, and (2) it is not certain that
- * other backends don't have catalog cache or even relcache entries for
- * such tables, anyway; there is nothing that prevents that. It might be
- * worth trying to avoid sending such inval traffic in the future, if those
- * problems can be overcome cheaply.
- *
- * When wal_level=logical, write invalidations into WAL at each command end to
- * support the decoding of the in-progress transactions. See
- * CommandEndInvalidationMessages.
+ * This is subtle stuff, so pay attention:
+ *
+ * When a tuple is updated or deleted, our standard visibility rules
+ * consider that it is *still valid* so long as we are in the same command,
+ * ie, until the next CommandCounterIncrement() or transaction commit.
+ * (See access/heap/heapam_visibility.c, and note that system catalogs are
+ * generally scanned under the most current snapshot available, rather than
+ * the transaction snapshot.) At the command boundary, the old tuple stops
+ * being valid and the new version, if any, becomes valid. Therefore,
+ * we cannot simply flush a tuple from the system caches during heap_update()
+ * or heap_delete(). The tuple is still good at that point; what's more,
+ * even if we did flush it, it might be reloaded into the caches by a later
+ * request in the same command. So the correct behavior is to keep a list
+ * of outdated (updated/deleted) tuples and then do the required cache
+ * flushes at the next command boundary. We must also keep track of
+ * inserted tuples so that we can flush "negative" cache entries that match
+ * the new tuples; again, that mustn't happen until end of command.
+ *
+ * Once we have finished the command, we still need to remember inserted
+ * tuples (including new versions of updated tuples), so that we can flush
+ * them from the caches if we abort the transaction. Similarly, we'd better
+ * be able to flush "negative" cache entries that may have been loaded in
+ * place of deleted tuples, so we still need the deleted ones too.
+ *
+ * If we successfully complete the transaction, we have to broadcast all
+ * these invalidation events to other backends (via the SI message queue)
+ * so that they can flush obsolete entries from their caches. Note we have
+ * to record the transaction commit before sending SI messages, otherwise
+ * the other backends won't see our updated tuples as good.
+ *
+ * When a subtransaction aborts, we can process and discard any events
+ * it has queued. When a subtransaction commits, we just add its events
+ * to the pending lists of the parent transaction.
+ *
+ * In short, we need to remember until xact end every insert or delete
+ * of a tuple that might be in the system caches. Updates are treated as
+ * two events, delete + insert, for simplicity. (If the update doesn't
+ * change the tuple hash value, catcache.c optimizes this into one event.)
+ *
+ * We do not need to register EVERY tuple operation in this way, just those
+ * on tuples in relations that have associated catcaches. We do, however,
+ * have to register every operation on every tuple that *could* be in a
+ * catcache, whether or not it currently is in our cache. Also, if the
+ * tuple is in a relation that has multiple catcaches, we need to register
+ * an invalidation message for each such catcache. catcache.c's
+ * PrepareToInvalidateCacheTuple() routine provides the knowledge of which
+ * catcaches may need invalidation for a given tuple.
+ *
+ * Also, whenever we see an operation on a pg_class, pg_attribute, or
+ * pg_index tuple, we register a relcache flush operation for the relation
+ * described by that tuple (as specified in CacheInvalidateHeapTuple()).
+ * Likewise for pg_constraint tuples for foreign keys on relations.
+ *
+ * We keep the relcache flush requests in lists separate from the catcache
+ * tuple flush requests. This allows us to issue all the pending catcache
+ * flushes before we issue relcache flushes, which saves us from loading
+ * a catcache tuple during relcache load only to flush it again right away.
+ * Also, we avoid queuing multiple relcache flush requests for the same
+ * relation, since a relcache flush is relatively expensive to do.
+ * (XXX is it worth testing likewise for duplicate catcache flush entries?
+ * Probably not.)
+ *
+ * Many subsystems own higher-level caches that depend on relcache and/or
+ * catcache, and they register callbacks here to invalidate their caches.
+ * While building a higher-level cache entry, a backend may receive a
+ * callback for the being-built entry or one of its dependencies. This
+ * implies the new higher-level entry would be born stale, and it might
+ * remain stale for the life of the backend. Many caches do not prevent
+ * that. They rely on DDL for can't-miss catalog changes taking
+ * AccessExclusiveLock on suitable objects. (For a change made with less
+ * locking, backends might never read the change.) The relation cache,
+ * however, needs to reflect changes from CREATE INDEX CONCURRENTLY no later
+ * than the beginning of the next transaction. Hence, when a relevant
+ * invalidation callback arrives during a build, relcache.c reattempts that
+ * build. Caches with similar needs could do likewise.
+ *
+ * If a relcache flush is issued for a system relation that we preload
+ * from the relcache init file, we must also delete the init file so that
+ * it will be rebuilt during the next backend restart. The actual work of
+ * manipulating the init file is in relcache.c, but we keep track of the
+ * need for it here.
+ *
+ * Currently, inval messages are sent without regard for the possibility
+ * that the object described by the catalog tuple might be a session-local
+ * object such as a temporary table. This is because (1) this code has
+ * no practical way to tell the difference, and (2) it is not certain that
+ * other backends don't have catalog cache or even relcache entries for
+ * such tables, anyway; there is nothing that prevents that. It might be
+ * worth trying to avoid sending such inval traffic in the future, if those
+ * problems can be overcome cheaply.
+ *
+ * When wal_level=logical, write invalidations into WAL at each command end to
+ * support the decoding of the in-progress transactions. See
+ * CommandEndInvalidationMessages.
*
* Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 4646ae50277..bdaa9539e40 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -928,7 +928,7 @@ MemoryContextCheck(MemoryContext context)
* context creation routines, not by the unwashed masses.
*
* The memory context creation procedure goes like this:
- * 1. Context-type-specific routine makes some initial space allocation,
+ * 1. Context-type-specific routine makes some initial space allocation,
* including enough space for the context header. If it fails,
* it can ereport() with no damage done.
* 2. Context-type-specific routine sets up all type-specific fields of
@@ -938,7 +938,7 @@ MemoryContextCheck(MemoryContext context)
* the initial space allocation should be freed before ereport'ing.
* 3. Context-type-specific routine calls MemoryContextCreate() to fill in
* the generic header fields and link the context into the context tree.
- * 4. We return to the context-type-specific routine, which finishes
+ * 4. We return to the context-type-specific routine, which finishes
* up type-specific initialization. This routine can now do things
* that might fail (like allocate more memory), so long as it's
* sure the node is left in a state that delete will handle.
--
2.25.1
0010-WIP-whitespace-issues.patchtext/x-diff; charset=us-asciiDownload
From 9a38d4fbf2a3b441505c169533f1b96726c8b03b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Tue, 31 Jan 2023 13:32:59 -0600
Subject: [PATCH 10/10] WIP: whitespace issues
TODO:
git grep '\*.*\w.* \w' '*.c'
git grep '\*.* .* .*\w.* \w' '*.c'
---
contrib/pg_trgm/trgm_regexp.c | 2 +-
src/backend/access/common/tupconvert.c | 2 +-
src/backend/access/gin/ginfast.c | 2 +-
src/backend/access/heap/heapam.c | 2 +-
src/backend/access/heap/hio.c | 2 +-
src/backend/access/nbtree/nbtutils.c | 2 +-
src/backend/access/transam/clog.c | 2 +-
src/backend/access/transam/multixact.c | 2 +-
src/backend/access/transam/xlog.c | 2 +-
src/backend/catalog/aclchk.c | 2 +-
src/backend/catalog/namespace.c | 6 +++---
src/backend/catalog/pg_proc.c | 2 +-
src/backend/catalog/pg_shdepend.c | 4 ++--
src/backend/commands/analyze.c | 2 +-
src/backend/commands/dbcommands.c | 2 +-
src/backend/commands/opclasscmds.c | 4 ++--
src/backend/commands/vacuum.c | 2 +-
src/backend/executor/execAmi.c | 2 +-
src/backend/executor/execExpr.c | 2 +-
src/backend/executor/functions.c | 2 +-
src/backend/executor/nodeAgg.c | 2 +-
src/backend/executor/nodeGather.c | 2 +-
src/backend/executor/nodeGatherMerge.c | 2 +-
src/backend/executor/nodeIncrementalSort.c | 2 +-
src/backend/lib/rbtree.c | 2 +-
src/backend/libpq/be-secure-openssl.c | 2 +-
src/backend/optimizer/path/clausesel.c | 2 +-
src/backend/optimizer/path/costsize.c | 6 +++---
src/backend/optimizer/path/joinpath.c | 2 +-
src/backend/optimizer/path/pathkeys.c | 2 +-
src/backend/optimizer/plan/createplan.c | 4 ++--
src/backend/optimizer/plan/initsplan.c | 2 +-
src/backend/optimizer/prep/prepjointree.c | 2 +-
src/backend/optimizer/util/orclauses.c | 2 +-
src/backend/optimizer/util/pathnode.c | 2 +-
src/backend/optimizer/util/var.c | 2 +-
src/backend/parser/parse_coerce.c | 2 +-
src/backend/postmaster/postmaster.c | 2 +-
src/backend/statistics/extended_stats.c | 2 +-
src/backend/storage/file/fd.c | 2 +-
src/backend/storage/lmgr/lock.c | 4 ++--
src/backend/storage/smgr/smgr.c | 2 +-
src/backend/tcop/postgres.c | 2 +-
src/backend/tsearch/ts_parse.c | 2 +-
src/backend/utils/adt/acl.c | 2 +-
src/backend/utils/adt/like_support.c | 2 +-
src/backend/utils/adt/selfuncs.c | 4 ++--
src/backend/utils/adt/varlena.c | 6 +++---
src/backend/utils/cache/plancache.c | 2 +-
src/backend/utils/cache/relcache.c | 2 +-
src/backend/utils/cache/ts_cache.c | 2 +-
src/backend/utils/misc/guc.c | 2 +-
src/backend/utils/mmgr/dsa.c | 2 +-
src/bin/initdb/initdb.c | 2 +-
src/bin/pg_dump/dumputils.c | 2 +-
src/bin/pg_dump/pg_dump.c | 2 +-
src/bin/pg_test_timing/pg_test_timing.c | 2 +-
src/bin/pg_upgrade/server.c | 2 +-
src/interfaces/ecpg/ecpglib/prepare.c | 2 +-
src/interfaces/ecpg/pgtypeslib/timestamp.c | 2 +-
60 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c
index 9a00564ae4f..5f41ff1e5d1 100644
--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -1608,7 +1608,7 @@ selectColorTrigrams(TrgmNFA *trgmNFA)
/*
* Does any arc of this color trigram connect initial and final
- * states? If so we can't remove it.
+ * states? If so we can't remove it.
*/
foreach(cell, trgmInfo->arcs)
{
diff --git a/src/backend/access/common/tupconvert.c b/src/backend/access/common/tupconvert.c
index d303fe010a2..128d407e24a 100644
--- a/src/backend/access/common/tupconvert.c
+++ b/src/backend/access/common/tupconvert.c
@@ -93,7 +93,7 @@ convert_tuples_by_position(TupleDesc indesc,
/*
* Set up for tuple conversion, matching input and output columns by name.
- * (Dropped columns are ignored in both input and output.) This is intended
+ * (Dropped columns are ignored in both input and output.) This is intended
* for use when the rowtypes are related by inheritance, so we expect an exact
* match of both type and typmod. The error messages will be a bit unhelpful
* unless both rowtypes are named composite types.
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index ca7d770d864..ec3bd4f4baf 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -889,7 +889,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
vacuum_delay_point();
/*
- * Is it time to flush memory to disk? Flush if we are at the end of
+ * Is it time to flush memory to disk? Flush if we are at the end of
* the pending list, or if we have a full row and memory is getting
* full.
*/
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 7eb79cee58d..1e752972a4d 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -3915,7 +3915,7 @@ HeapDetermineColumnsInfo(Relation relation,
/*
* Extract the corresponding values. XXX this is pretty inefficient
* if there are many indexed columns. Should we do a single
- * heap_deform_tuple call on each tuple, instead? But that doesn't
+ * heap_deform_tuple call on each tuple, instead? But that doesn't
* work for system columns ...
*/
value1 = heap_getattr(oldtup, attrnum, tupdesc, &isnull1);
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index e152807d2dc..4d38667fcee 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -716,7 +716,7 @@ loop:
*
* XXX should we enter the new page into the free space map immediately,
* or just keep it for this backend's exclusive use in the short run
- * (until VACUUM sees it)? Seems to depend on whether you expect the
+ * (until VACUUM sees it)? Seems to depend on whether you expect the
* current backend to make more insertions or not, which is probably a
* good bet most of the time. So for now, don't add it to FSM yet.
*/
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 7da499c4dd5..634735b7306 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -1713,7 +1713,7 @@ _bt_check_rowcompare(ScanKey skey, IndexTuple tuple, int tupnatts,
* any items from the page, and so there is no need to search left from the
* recorded offset. (This observation also guarantees that the item is still
* the right one to delete, which might otherwise be questionable since heap
- * TIDs can get recycled.) This holds true even if the page has been modified
+ * TIDs can get recycled.) This holds true even if the page has been modified
* by inserts and page splits, so there is no need to consult the LSN.
*
* If the pin was released after reading the page, then we re-read it. If it
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 4a431d58767..d6dc5739a4f 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -626,7 +626,7 @@ TransactionIdSetStatusBit(TransactionId xid, XidStatus status, XLogRecPtr lsn, i
* an LSN that is late enough to be able to guarantee that if we flush up to
* that LSN then we will have flushed the transaction's commit record to disk.
* The result is not necessarily the exact LSN of the transaction's commit
- * record! For example, for long-past transactions (those whose clog pages
+ * record! For example, for long-past transactions (those whose clog pages
* already migrated to disk), we'll return InvalidXLogRecPtr. Also, because
* we group transactions on the same clog page to conserve storage, we might
* return the LSN of a later transaction that falls into the same group.
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fe6698d5ffa..1d9fec7c3e7 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2668,7 +2668,7 @@ SetOffsetVacuumLimit(bool is_startup)
LWLockRelease(MultiXactGenLock);
/*
- * Do we need an emergency autovacuum? If we're not sure, assume yes.
+ * Do we need an emergency autovacuum? If we're not sure, assume yes.
*/
return !oldestOffsetKnown ||
(nextOffset - oldestOffset > MULTIXACT_MEMBER_SAFE_THRESHOLD);
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f9f0f6db8d1..231276e189d 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -2658,7 +2658,7 @@ XLogFlush(XLogRecPtr record)
* the whole system due to corruption on one data page. In particular, if
* the bad page is encountered again during recovery then we would be
* unable to restart the database at all! (This scenario actually
- * happened in the field several times with 7.1 releases.) As of 8.4, bad
+ * happened in the field several times with 7.1 releases.) As of 8.4, bad
* LSNs encountered during recovery are UpdateMinRecoveryPoint's problem;
* the only time we can reach here during recovery is while flushing the
* end-of-recovery checkpoint record, and we don't expect that to have a
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index c4232344aab..ff990020e52 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4056,7 +4056,7 @@ object_ownercheck(Oid classid, Oid objectid, Oid roleid)
* Note: roles do not have owners per se; instead we use this test in
* places where an ownership-like permissions test is needed for a role.
* Be sure to apply it to the role trying to do the operation, not the
- * role being operated on! Also note that this generally should not be
+ * role being operated on! Also note that this generally should not be
* considered enough privilege if the target role is a superuser.
* (We don't handle that consideration here because we want to give a
* separate error message for such cases, so the caller has to deal with it.)
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 14e57adee2b..dee850d8bdf 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -88,7 +88,7 @@
*
* The textual specification of search_path can include "$user" to refer to
* the namespace named the same as the current user, if any. (This is just
- * ignored if there is no such namespace.) Also, it can include "pg_temp"
+ * ignored if there is no such namespace.) Also, it can include "pg_temp"
* to refer to the current backend's temp namespace. This is usually also
* ignorable if the temp namespace hasn't been set up, but there's a special
* case: if "pg_temp" appears first then it should be the default creation
@@ -1710,7 +1710,7 @@ OpernameGetCandidates(List *names, char oprkind, bool missing_schema_ok)
/*
* Okay, it's in the search path, but does it have the same
- * arguments as something we already accepted? If so, keep only
+ * arguments as something we already accepted? If so, keep only
* the one that appears earlier in the search path.
*
* If we have an ordered list from SearchSysCacheList (the normal
@@ -3813,7 +3813,7 @@ recomputeNamespacePath(void)
* Convert the list of names to a list of OIDs. If any names are not
* recognizable or we don't have read access, just leave them out of the
* list. (We can't raise an error, since the search_path setting has
- * already been accepted.) Don't make duplicate entries, either.
+ * already been accepted.) Don't make duplicate entries, either.
*/
oidlist = NIL;
temp_missing = false;
diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c
index 14d552fe2dd..380a948bc58 100644
--- a/src/backend/catalog/pg_proc.c
+++ b/src/backend/catalog/pg_proc.c
@@ -687,7 +687,7 @@ ProcedureCreate(const char *procedureName,
* check_function_bodies is off, we don't do this, because that would
* create dump ordering hazards that pg_dump doesn't know how to deal
* with. (For example, a SET clause might refer to a not-yet-created
- * text search configuration.) This means that the validator
+ * text search configuration.) This means that the validator
* shouldn't complain about anything that might depend on a GUC
* parameter when check_function_bodies is off.
*/
diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c
index 64d326f073c..fe1868d3b3c 100644
--- a/src/backend/catalog/pg_shdepend.c
+++ b/src/backend/catalog/pg_shdepend.c
@@ -186,7 +186,7 @@ recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
* an object's owner.
*
* There must be no more than one existing entry for the given dependent
- * object and dependency type! So in practice this can only be used for
+ * object and dependency type! So in practice this can only be used for
* updating SHARED_DEPENDENCY_OWNER and SHARED_DEPENDENCY_TABLESPACE
* entries, which should have that property.
*
@@ -476,7 +476,7 @@ getOidListDiff(Oid *list1, int *nlist1, Oid *list2, int *nlist2)
*
* NOTE: Both input arrays must be sorted and de-duped. (Typically they
* are extracted from an ACL array by aclmembers(), which takes care of
- * both requirements.) The arrays are pfreed before return.
+ * both requirements.) The arrays are pfreed before return.
*/
void
updateAclDependencies(Oid classId, Oid objectId, int32 objsubId,
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 65750958bb2..02d3676011e 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -1026,7 +1026,7 @@ examine_attribute(Relation onerel, int attnum, Node *index_expr)
* type of the opclass, which is not interesting for our purposes. (Note:
* if we did anything with non-expression index columns, we'd need to
* figure out where to get the correct type info from, but for now that's
- * not a problem.) It's not clear whether anyone will care about the
+ * not a problem.) It's not clear whether anyone will care about the
* typmod, but we store that too just in case.
*/
if (index_expr)
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index ef05633bb05..dccb86597d6 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -2083,7 +2083,7 @@ movedb(const char *dbname, const char *tblspcname)
*
* (This is OK because we know we aren't inside a transaction block.)
*
- * XXX would it be safe/better to do this inside the ensure block? Not
+ * XXX would it be safe/better to do this inside the ensure block? Not
* convinced it's a good idea; consider elog just after the transaction
* really commits.
*/
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 864e35e45b4..a4cc0354baf 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -1702,7 +1702,7 @@ dropProcedures(List *opfamilyname, Oid amoid, Oid opfamilyoid,
* Subroutine for ALTER OPERATOR CLASS SET SCHEMA/RENAME
*
* Is there an operator class with the given name and signature already
- * in the given namespace? If so, raise an appropriate error message.
+ * in the given namespace? If so, raise an appropriate error message.
*/
void
IsThereOpClassInNamespace(const char *opcname, Oid opcmethod,
@@ -1725,7 +1725,7 @@ IsThereOpClassInNamespace(const char *opcname, Oid opcmethod,
* Subroutine for ALTER OPERATOR FAMILY SET SCHEMA/RENAME
*
* Is there an operator family with the given name and signature already
- * in the given namespace? If so, raise an appropriate error message.
+ * in the given namespace? If so, raise an appropriate error message.
*/
void
IsThereOpFamilyInNamespace(const char *opfname, Oid opfmethod,
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index aa79d9de4d4..bf9466101a7 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -319,7 +319,7 @@ vacuum(List *relations, VacuumParams *params,
/*
* We cannot run VACUUM inside a user transaction block; if we were inside
* a transaction, then our commit- and start-transaction-command calls
- * would not have the intended effect! There are numerous other subtle
+ * would not have the intended effect! There are numerous other subtle
* dependencies on this, too.
*
* ANALYZE (without VACUUM) can run either way.
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 9d18ce8c6b2..084b91f6617 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -370,7 +370,7 @@ ExecMarkPos(PlanState *node)
* the mark operation. It is unspecified what happens to the plan node's
* result TupleTableSlot. (In most cases the result slot is unchanged by
* a restore, but the node may choose to clear it or to load it with the
- * restored-to tuple.) Hence the caller should discard any previously
+ * restored-to tuple.) Hence the caller should discard any previously
* returned TupleTableSlot after doing a restore.
*/
void
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 812ead95bc6..797b4fa67c1 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -1946,7 +1946,7 @@ ExecInitExprRec(Expr *node, ExprState *state,
/*
* Guard against ALTER COLUMN TYPE on rowtype since
* the RowExpr was created. XXX should we check
- * typmod too? Not sure we can be sure it'll be the
+ * typmod too? Not sure we can be sure it'll be the
* same.
*/
if (exprType((Node *) e) != att->atttypid)
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 50e06ec6931..662c4a7d7ba 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -1668,7 +1668,7 @@ check_sql_fn_retval(List *queryTreeLists,
* Otherwise, if it's INSERT/UPDATE/DELETE with RETURNING, it returns
* that. Otherwise, the function return type must be VOID.
*
- * Note: eventually replace this test with QueryReturnsTuples? We'd need
+ * Note: eventually replace this test with QueryReturnsTuples? We'd need
* a more general method of determining the output type, though. Also, it
* seems too dangerous to consider FETCH or EXECUTE as returning a
* determinable rowtype, since they depend on relatively short-lived
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 20d23696a53..004724741fd 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -34,7 +34,7 @@
* input tuples and eliminate duplicates (if required) before performing
* the above-depicted process. (However, we don't do that for ordered-set
* aggregates; their "ORDER BY" inputs are ordinary aggregate arguments
- * so far as this module is concerned.) Note that partial aggregation
+ * so far as this module is concerned.) Note that partial aggregation
* is not supported in these cases, since we couldn't ensure global
* ordering or distinctness of the inputs.
*
diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c
index 307fc10eea7..2c0530426a5 100644
--- a/src/backend/executor/nodeGather.c
+++ b/src/backend/executor/nodeGather.c
@@ -200,7 +200,7 @@ ExecGather(PlanState *pstate)
}
else
{
- /* No workers? Then never mind. */
+ /* No workers? Then never mind. */
node->nreaders = 0;
node->reader = NULL;
}
diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c
index 9d5e1a46e9e..71052bf08e6 100644
--- a/src/backend/executor/nodeGatherMerge.c
+++ b/src/backend/executor/nodeGatherMerge.c
@@ -241,7 +241,7 @@ ExecGatherMerge(PlanState *pstate)
}
else
{
- /* No workers? Then never mind. */
+ /* No workers? Then never mind. */
node->nreaders = 0;
node->reader = NULL;
}
diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c
index 12bc22f33c6..26ceafec5f8 100644
--- a/src/backend/executor/nodeIncrementalSort.c
+++ b/src/backend/executor/nodeIncrementalSort.c
@@ -69,7 +69,7 @@
* the entire result set is available.
*
* The hybrid mode approach allows us to optimize for both very small
- * groups (where the overhead of a new tuplesort is high) and very large
+ * groups (where the overhead of a new tuplesort is high) and very large
* groups (where we can lower cost by not having to sort on already sorted
* columns), albeit at some extra cost while switching between modes.
*
diff --git a/src/backend/lib/rbtree.c b/src/backend/lib/rbtree.c
index f362dce220f..91eab40397f 100644
--- a/src/backend/lib/rbtree.c
+++ b/src/backend/lib/rbtree.c
@@ -87,7 +87,7 @@ static RBTNode sentinel =
*
* The freefunc should just be pfree or equivalent; it should NOT attempt
* to free any subsidiary data, because the node passed to it may not contain
- * valid data! freefunc can be NULL if caller doesn't require retail
+ * valid data! freefunc can be NULL if caller doesn't require retail
* space reclamation.
*
* The RBTree node is palloc'd in the caller's memory context. Note that
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 4e721b705d5..6a7f87f17c8 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -1025,7 +1025,7 @@ load_dh_file(char *filename, bool isServerStart)
* Load hardcoded DH parameters.
*
* If DH parameters cannot be loaded from a specified file, we can load
- * the hardcoded DH parameters supplied with the backend to prevent
+ * the hardcoded DH parameters supplied with the backend to prevent
* problems.
*/
static DH *
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index 435438a1735..b7dd77ca882 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -610,7 +610,7 @@ treat_as_join_clause(PlannerInfo *root, Node *clause, RestrictInfo *rinfo,
* Otherwise, it's a join if there's more than one base relation used.
* We can optimize this calculation if an rinfo was passed.
*
- * XXX Since we know the clause is being evaluated at a join, the
+ * XXX Since we know the clause is being evaluated at a join, the
* only way it could be single-relation is if it was delayed by outer
* joins. We intentionally count only baserels here, not OJs that
* might be present in rinfo->clause_relids, so that we direct such
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 7918bb6f0db..991b95ab812 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -47,7 +47,7 @@
* plan nodes below the LIMIT node) are set without regard to any LIMIT, so
* that this equation works properly. (Note: while path->rows is never zero
* for ordinary relations, it is zero for paths for provably-empty relations,
- * so beware of division-by-zero.) The LIMIT is applied as a top-level
+ * so beware of division-by-zero.) The LIMIT is applied as a top-level
* plan node.
*
* For largely historical reasons, most of the routines in this module use
@@ -2439,7 +2439,7 @@ cost_material(Path *path,
* if it is exactly the same then there will be a cost tie between
* nestloop with A outer, materialized B inner and nestloop with B outer,
* materialized A inner. The extra cost ensures we'll prefer
- * materializing the smaller rel.) Note that this is normally a good deal
+ * materializing the smaller rel.) Note that this is normally a good deal
* less than cpu_tuple_cost; which is OK because a Material plan node
* doesn't do qual-checking or projection, so it's got less overhead than
* most plan nodes.
@@ -3613,7 +3613,7 @@ final_cost_mergejoin(PlannerInfo *root, MergePath *path,
* never spill to disk, since it only has to remember tuples back to the
* last mark. (If there are a huge number of duplicates, our other cost
* factors will make the path so expensive that it probably won't get
- * chosen anyway.) So we don't use cost_rescan here.
+ * chosen anyway.) So we don't use cost_rescan here.
*
* Note: keep this estimate in sync with create_mergejoin_plan's labeling
* of the generated Material node.
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c
index 9d4a9197ee6..b5ca895f9cb 100644
--- a/src/backend/optimizer/path/joinpath.c
+++ b/src/backend/optimizer/path/joinpath.c
@@ -230,7 +230,7 @@ add_paths_to_joinrel(PlannerInfo *root,
* is usually no need to create a parameterized result path unless there
* is a join order restriction that prevents joining one of our input rels
* directly to the parameter source rel instead of joining to the other
- * input rel. (But see allow_star_schema_join().) This restriction
+ * input rel. (But see allow_star_schema_join().) This restriction
* reduces the number of parameterized paths we have to deal with at
* higher join levels, without compromising the quality of the resulting
* plan. We express the restriction as a Relids set that must overlap the
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index c4e7f97f687..175bb1d407c 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -896,7 +896,7 @@ convert_subquery_pathkeys(PlannerInfo *root, RelOptInfo *rel,
* expression is *not* volatile in the outer query: it's just
* a Var referencing whatever the subquery emitted. (IOW, the
* outer query isn't going to re-execute the volatile
- * expression itself.) So this is okay.
+ * expression itself.) So this is okay.
*/
outer_ec =
get_eclass_for_sort_expr(root,
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 134130476e4..38bc21ce7b7 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -936,7 +936,7 @@ use_physical_tlist(PlannerInfo *root, Path *path, int flags)
* to emit any sort/group columns that are not simple Vars. (If they are
* simple Vars, they should appear in the physical tlist, and
* apply_pathtarget_labeling_to_tlist will take care of getting them
- * labeled again.) We also have to check that no two sort/group columns
+ * labeled again.) We also have to check that no two sort/group columns
* are the same Var, else that element of the physical tlist would need
* conflicting ressortgroupref labels.
*/
@@ -4210,7 +4210,7 @@ create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path,
* 0, but there can be no Var with relid 0 in the rel's targetlist or the
* restriction clauses, so we skip this in that case. Note that any such
* columns in base relations that were joined are assumed to be contained
- * in fdw_scan_tlist.) This is a bit of a kluge and might go away
+ * in fdw_scan_tlist.) This is a bit of a kluge and might go away
* someday, so we intentionally leave it out of the API presented to FDWs.
*/
scan_plan->fsSystemCol = false;
diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c
index 904f710d593..95c3cdb201b 100644
--- a/src/backend/optimizer/plan/initsplan.c
+++ b/src/backend/optimizer/plan/initsplan.c
@@ -1373,7 +1373,7 @@ make_outerjoininfo(PlannerInfo *root,
* Presently the executor cannot support FOR [KEY] UPDATE/SHARE marking of
* rels appearing on the nullable side of an outer join. (It's somewhat
* unclear what that would mean, anyway: what should we mark when a result
- * row is generated from no element of the nullable relation?) So,
+ * row is generated from no element of the nullable relation?) So,
* complain if any nullable rel is FOR [KEY] UPDATE/SHARE.
*
* You might be wondering why this test isn't made far upstream in the
diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c
index 870d84b29d7..3f6d4e91f89 100644
--- a/src/backend/optimizer/prep/prepjointree.c
+++ b/src/backend/optimizer/prep/prepjointree.c
@@ -1578,7 +1578,7 @@ is_simple_subquery(PlannerInfo *root, Query *subquery, RangeTblEntry *rte,
* outer-query quals, but we don't have enough info here to check
* that. Also, maybe this restriction could be removed if we forced
* such refs to be wrapped in PlaceHolderVars, even when they're below
- * the nearest outer join? But it's a pretty hokey usage, so not
+ * the nearest outer join? But it's a pretty hokey usage, so not
* clear this is worth sweating over.)
*/
if (lowest_outer_join != NULL)
diff --git a/src/backend/optimizer/util/orclauses.c b/src/backend/optimizer/util/orclauses.c
index 85ecdfc14f2..380d541dc5a 100644
--- a/src/backend/optimizer/util/orclauses.c
+++ b/src/backend/optimizer/util/orclauses.c
@@ -167,7 +167,7 @@ extract_or_clause(RestrictInfo *or_rinfo, RelOptInfo *rel)
* cheaper. We'll strip those nodes from the returned tree, though,
* meaning that fresh ones will be built if the clause is accepted as a
* restriction clause. This might seem wasteful --- couldn't we re-use
- * the existing RestrictInfos? But that'd require assuming that
+ * the existing RestrictInfos? But that'd require assuming that
* selectivity and other cached data is computed exactly the same way for
* a restriction clause as for a join clause, which seems undesirable.
*/
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index d749b505785..a5438819876 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -508,7 +508,7 @@ add_path(RelOptInfo *parent_rel, Path *new_path)
* very small fuzz limit. (We used to do an
* exact cost comparison, but that results in
* annoying platform-specific plan variations
- * due to roundoff in the cost estimates.) If
+ * due to roundoff in the cost estimates.) If
* things are still tied, arbitrarily keep
* only the old path. Notice that we will
* keep only the old path even if the
diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c
index c55c5f805b3..732546571e7 100644
--- a/src/backend/optimizer/util/var.c
+++ b/src/backend/optimizer/util/var.c
@@ -101,7 +101,7 @@ static Relids alias_relid_set(Query *query, Relids relids);
*
* NOTE: this is used on not-yet-planned expressions. It may therefore find
* bare SubLinks, and if so it needs to recurse into them to look for uplevel
- * references to the desired rtable level! But when we find a completed
+ * references to the desired rtable level! But when we find a completed
* SubPlan, we only need to look at the parameters passed to the subplan.
*/
Relids
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 52787b67943..73bf0abcac7 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -1681,7 +1681,7 @@ select_common_typmod(ParseState *pstate, List *exprs, Oid common_type)
*
* Domains over arrays match ANYARRAY, and are immediately flattened to their
* base type. (Thus, for example, we will consider it a match if one ANYARRAY
- * argument is a domain over int4[] while another one is just int4[].) Also
+ * argument is a domain over int4[] while another one is just int4[].) Also
* notice that such a domain does *not* match ANYNONARRAY. The same goes
* for ANYCOMPATIBLEARRAY and ANYCOMPATIBLENONARRAY.
*
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 2552327d904..d78346e45c3 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -3208,7 +3208,7 @@ process_pm_child_exit(void)
}
/*
- * Was it the autovacuum launcher? Normal exit can be ignored; we'll
+ * Was it the autovacuum launcher? Normal exit can be ignored; we'll
* start a new one at the next iteration of the postmaster's main
* loop, if necessary. Any other exit condition is treated as a
* crash.
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index e18398cd428..e5ed4ed90b7 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -550,7 +550,7 @@ examine_attribute(Node *expr)
* of the opclass, which is not interesting for our purposes. (Note: if
* we did anything with non-expression statistics columns, we'd need to
* figure out where to get the correct type info from, but for now that's
- * not a problem.) It's not clear whether anyone will care about the
+ * not a problem.) It's not clear whether anyone will care about the
* typmod, but we store that too just in case.
*/
stats->attrtypid = exprType(expr);
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 926d000f2ea..7ea6ae7f690 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1001,7 +1001,7 @@ BasicOpenFile(const char *fileName, int fileFlags)
* This is exported for use by places that really want a plain kernel FD,
* but need to be proof against running out of FDs. Once an FD has been
* successfully returned, it is the caller's responsibility to ensure that
- * it will not be leaked on ereport()! Most users should *not* call this
+ * it will not be leaked on ereport()! Most users should *not* call this
* routine directly, but instead use the VFD abstraction level, which
* provides protection against descriptor leaks as well as management of
* files that need to be open for more than a short period of time.
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index a87372f33f9..4a6d034d962 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -3527,7 +3527,7 @@ PostPrepare_Locks(TransactionId xid)
* the proclock would then be in the wrong hash chain. Instead
* use hash_update_hash_key. (We used to create a new hash entry,
* but that risks out-of-memory failure if other processes are
- * busy making proclocks too.) We must unlink the proclock from
+ * busy making proclocks too.) We must unlink the proclock from
* our procLink chain and put it into the new proc's chain, too.
*
* Note: the updated proclock hash key will still belong to the
@@ -3831,7 +3831,7 @@ GetBlockerStatusData(int blocked_pid)
* In addition, to examine the lock grouping fields of any other backend,
* we must hold all the hash partition locks. (Only one of those locks is
* actually relevant for any one lock group, but we can't know which one
- * ahead of time.) It's fairly annoying to hold all those locks
+ * ahead of time.) It's fairly annoying to hold all those locks
* throughout this, but it's no worse than GetLockStatusData(), and it
* does have the advantage that we're guaranteed to return a
* self-consistent instantaneous state.
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index b2bd749d770..eefba40d39a 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -511,7 +511,7 @@ smgrextend(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
* smgrprefetch() -- Initiate asynchronous read of the specified block of a relation.
*
* In recovery only, this can return false to indicate that a file
- * doesn't exist (presumably it has been dropped by a later WAL
+ * doesn't exist (presumably it has been dropped by a later WAL
* record).
*/
bool
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 5d439f27100..224db7216b8 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -4263,7 +4263,7 @@ PostgresMain(const char *dbname, const char *username)
* future we might want to allow some timeout requests to survive, but
* at minimum it'd be necessary to do reschedule_timeouts(), in case
* we got here because of a query cancel interrupting the SIGALRM
- * interrupt handler.) Note in particular that we must clear the
+ * interrupt handler.) Note in particular that we must clear the
* statement and lock timeout indicators, to prevent any future plain
* query cancels from being misreported as timeouts in case we're
* forgetting a timeout cancel.
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index 25d98527786..8c4e1a9e327 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -50,7 +50,7 @@ typedef struct
/*
* fields to store last variant to lexize (basically, thesaurus or similar
- * to, which wants several lexemes
+ * to, which wants several lexemes)
*/
ParsedLex *lastRes;
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 8f7522d1033..c7a196f960d 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -5091,7 +5091,7 @@ is_member_of_role_nosuper(Oid member, Oid role)
/*
- * Is member an admin of role? That is, is member the role itself (subject to
+ * Is member an admin of role? That is, is member the role itself (subject to
* restrictions below), a member (directly or indirectly) WITH ADMIN OPTION,
* or a superuser?
*/
diff --git a/src/backend/utils/adt/like_support.c b/src/backend/utils/adt/like_support.c
index 9b603d42f3d..bdd0f5999ee 100644
--- a/src/backend/utils/adt/like_support.c
+++ b/src/backend/utils/adt/like_support.c
@@ -559,7 +559,7 @@ patternsel_common(PlannerInfo *root,
/*
* Similarly, the exposed type of the left-hand side should be one of
* those we know. (Do not look at vardata.atttype, which might be
- * something binary-compatible but different.) We can use it to identify
+ * something binary-compatible but different.) We can use it to identify
* the comparison operators and the required type of the comparison
* constant, much as in match_pattern_prefix().
*/
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index fe37e65af03..93cff772703 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -5512,7 +5512,7 @@ examine_simple_variable(PlannerInfo *root, Var *var,
* Punt if subquery uses set operations or GROUP BY, as these will
* mash underlying columns' stats beyond recognition. (Set ops are
* particularly nasty; if we forged ahead, we would return stats
- * relevant to only the leftmost subselect...) DISTINCT is also
+ * relevant to only the leftmost subselect...) DISTINCT is also
* problematic, but we check that later because there is a possibility
* of learning something even with it.
*/
@@ -5603,7 +5603,7 @@ examine_simple_variable(PlannerInfo *root, Var *var,
/*
* Otherwise, the Var comes from a FUNCTION, VALUES, or CTE RTE. (We
* won't see RTE_JOIN here because join alias Vars have already been
- * flattened.) There's not much we can do with function outputs, but
+ * flattened.) There's not much we can do with function outputs, but
* maybe someday try to be smarter about VALUES and/or CTEs.
*/
}
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 170b3a3820b..762c33c7aab 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -1435,7 +1435,7 @@ text_position_next_internal(char *start_ptr, TextPositionState *state)
p = hptr;
while (*nptr == *p)
{
- /* Matched it all? If so, return 1-based position */
+ /* Matched it all? If so, return 1-based position */
if (nptr == needle)
return (char *) p;
nptr--, p--;
@@ -3712,7 +3712,7 @@ textToQualifiedNameList(text *textval)
* amount of stuff that needs to be allocated and freed.
*
* Inputs:
- * rawstring: the input string; must be overwritable! On return, it's
+ * rawstring: the input string; must be overwritable! On return, it's
* been modified to contain the separated identifiers.
* separator: the separator punctuation expected between identifiers
* (typically '.' or ','). Whitespace may also appear around
@@ -3963,7 +3963,7 @@ SplitDirectoriesString(char *rawstring, char separator,
* Be sure to update that if you have to change this.
*
* Inputs:
- * rawstring: the input string; must be overwritable! On return, it's
+ * rawstring: the input string; must be overwritable! On return, it's
* been modified to contain the separated identifiers.
* separator: the separator punctuation expected between identifiers
* (typically '.' or ','). Whitespace may also appear around
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index 77c2ba3f8f4..353fd390aee 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -401,7 +401,7 @@ CompleteCachedPlan(CachedPlanSource *plansource,
/*
* Also save the current search_path in the query_context. (This
* should not generate much extra cruft either, since almost certainly
- * the path is already valid.) Again, we don't really need this for
+ * the path is already valid.) Again, we don't really need this for
* one-shot plans; and we *must* skip this for transaction control
* commands, because this could result in catalog accesses.
*/
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 13f79873733..1598f7a3418 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -2582,7 +2582,7 @@ RelationClearRelation(Relation relation, bool rebuild)
* sufficient to prevent any significant change in the rel's schema,
* so the existing entry contents should be good enough for its
* purposes; at worst we might be behind on statistics updates or the
- * like. (See also CheckTableNotInUse() and its callers.) These same
+ * like. (See also CheckTableNotInUse() and its callers.) These same
* remarks also apply to the cases above where we exit without having
* done RelationReloadIndexInfo() yet.
*/
diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c
index 7760ad764ea..4058dddb710 100644
--- a/src/backend/utils/cache/ts_cache.c
+++ b/src/backend/utils/cache/ts_cache.c
@@ -12,7 +12,7 @@
* safe to hold onto a pointer to the cache entry while doing things that
* might result in recognizing a cache invalidation. Beware however that
* subsidiary information might be deleted and reallocated somewhere else
- * if a cache inval and reval happens! This does not look like it will be
+ * if a cache inval and reval happens! This does not look like it will be
* a big problem as long as parser and dictionary methods do not attempt
* any database access.
*
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index bc83f3577d7..ce5a6c987bd 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3572,7 +3572,7 @@ set_config_option_ext(const char *name, const char *value,
/*
* Should we set reset/stacked values? (If so, the behavior is not
- * transactional.) This is done either when we get a default value from
+ * transactional.) This is done either when we get a default value from
* the database's/user's/client's default settings or when we reset a
* value to its default.
*/
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
index f5a62061a3e..20111fd6fe9 100644
--- a/src/backend/utils/mmgr/dsa.c
+++ b/src/backend/utils/mmgr/dsa.c
@@ -135,7 +135,7 @@ typedef size_t dsa_segment_index;
/*
* What is the lowest bin that holds segments that *might* have n contiguous
- * free pages? There is no point in looking in segments in lower bins; they
+ * free pages? There is no point in looking in segments in lower bins; they
* definitely can't service a request for n free pages.
*/
static inline size_t
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 7a58c33ace3..d6a3828ad31 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -687,7 +687,7 @@ find_matching_ts_config(const char *lc_type)
* underscore (usual case) or a hyphen (Windows "locale name"; see
* comments at IsoLocaleName()).
*
- * XXX Should ' ' be a stop character? This would select "norwegian" for
+ * XXX Should ' ' be a stop character? This would select "norwegian" for
* the Windows locale "Norwegian (Nynorsk)_Norway.1252". If we do so, we
* should also accept the "nn" and "nb" Unix locales.
*
diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c
index 9753a6d8682..b24e1f56525 100644
--- a/src/bin/pg_dump/dumputils.c
+++ b/src/bin/pg_dump/dumputils.c
@@ -707,7 +707,7 @@ variable_is_guc_list_quote(const char *name)
* See comparable code in src/backend/utils/adt/varlena.c.
*
* Inputs:
- * rawstring: the input string; must be overwritable! On return, it's
+ * rawstring: the input string; must be overwritable! On return, it's
* been modified to contain the separated identifiers.
* separator: the separator punctuation expected between identifiers
* (typically '.' or ','). Whitespace may also appear around
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 527c7651ab2..c730900891f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -16151,7 +16151,7 @@ dumpIndex(Archive *fout, const IndxInfo *indxinfo)
/*
* If there's an associated constraint, don't dump the index per se, but
* do dump any comment for it. (This is safe because dependency ordering
- * will have ensured the constraint is emitted first.) Note that the
+ * will have ensured the constraint is emitted first.) Note that the
* emitted comment has to be shown as depending on the constraint, not the
* index, in such cases.
*/
diff --git a/src/bin/pg_test_timing/pg_test_timing.c b/src/bin/pg_test_timing/pg_test_timing.c
index c29d6f87629..ab8cf261ec3 100644
--- a/src/bin/pg_test_timing/pg_test_timing.c
+++ b/src/bin/pg_test_timing/pg_test_timing.c
@@ -1,6 +1,6 @@
/*
* pg_test_timing.c
- * tests overhead of timing calls and their monotonicity: that
+ * tests overhead of timing calls and their monotonicity: that
* they always move forward
*/
diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c
index 820bddf3159..7a96fc7c79d 100644
--- a/src/bin/pg_upgrade/server.c
+++ b/src/bin/pg_upgrade/server.c
@@ -217,7 +217,7 @@ start_postmaster(ClusterInfo *cluster, bool report_and_exit_on_error)
strcat(socket_string,
" -c listen_addresses='' -c unix_socket_permissions=0700");
- /* Have a sockdir? Tell the postmaster. */
+ /* Have a sockdir? Tell the postmaster. */
if (cluster->sockdir)
snprintf(socket_string + strlen(socket_string),
sizeof(socket_string) - strlen(socket_string),
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
index ea1146f520f..46103acea90 100644
--- a/src/interfaces/ecpg/ecpglib/prepare.c
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -519,7 +519,7 @@ AddStmtToCache(int lineno, /* line # of statement */
for (ix = 0; ix < stmtCacheEntPerBucket; ++ix)
{
entry = &stmtCacheEntries[entNo];
- if (!entry->stmtID[0]) /* unused entry - use it */
+ if (!entry->stmtID[0]) /* unused entry - use it */
break;
if (entry->execs < stmtCacheEntries[luEntNo].execs)
luEntNo = entNo; /* save new 'least used' entry */
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 54cc04addd2..6185fc18957 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -346,7 +346,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm *tm,
break;
/*
- * The preferred date and time representation for
+ * The preferred date and time representation for
* the current locale.
*/
case 'c':
--
2.25.1
On Wed, Feb 08, 2023 at 09:56:44AM -0600, Justin Pryzby wrote:
Some more accumulated/new typos.
0001 has been a debate for a long time, and it depends on the way SQL
is spelled. For reference:
$ git grep -i " an sql" -- *.c | wc -l
63
$ git grep -i " a sql" -- *.c | wc -l
135
0005 can indeed fix a lot of confusion around the spaces after an
"else if" block. Is that something that could be automated with the
indentation, though? Same remark for 0009 and 0010.
Applied 0002, 0003, 0004, 0006, after rewording a bit 0003 to mention
the compression type.
--
Michael
Michael Paquier <michael@paquier.xyz> writes:
On Wed, Feb 08, 2023 at 09:56:44AM -0600, Justin Pryzby wrote:
Some more accumulated/new typos.
0005 can indeed fix a lot of confusion around the spaces after an
"else if" block. Is that something that could be automated with the
indentation, though? Same remark for 0009 and 0010.
I see your point about 0005, but I've never seen pgindent remove
vertical whitespace once it's been added. Not sure what it'd take
to teach it to do so, or whether we'd like the results.
I'd reject 0009 and 0010 altogether --- they don't add any readability
that's worth the potential increase in back-patch problems.
regards, tom lane