Fix various typos, grammar and code style in comments and docs
authorMichael Paquier <michael@paquier.xyz>
Tue, 25 Jan 2022 00:40:04 +0000 (09:40 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 25 Jan 2022 00:40:04 +0000 (09:40 +0900)
This fixes a set of issues that have accumulated over the past months
(or years) in various code areas.  Most fixes are related to some recent
additions, as of the development of v15.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20220124030001.GQ23027@telsasoft.com

44 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/func.sgml
doc/src/sgml/glossary.sgml
doc/src/sgml/indexam.sgml
doc/src/sgml/perform.sgml
doc/src/sgml/postgres-fdw.sgml
doc/src/sgml/protocol.sgml
doc/src/sgml/ref/alter_publication.sgml
doc/src/sgml/ref/create_publication.sgml
doc/src/sgml/ref/pg_receivewal.sgml
doc/src/sgml/ref/pgbench.sgml
doc/src/sgml/ref/pgupgrade.sgml
doc/src/sgml/ref/select_into.sgml
src/backend/access/gin/ginget.c
src/backend/access/heap/heapam.c
src/backend/access/transam/xlog.c
src/backend/catalog/pg_publication.c
src/backend/commands/cluster.c
src/backend/commands/indexcmds.c
src/backend/commands/publicationcmds.c
src/backend/commands/subscriptioncmds.c
src/backend/optimizer/util/appendinfo.c
src/backend/optimizer/util/inherit.c
src/backend/replication/logical/logicalfuncs.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/logical/worker.c
src/backend/statistics/extended_stats.c
src/backend/statistics/mcv.c
src/backend/storage/sync/sync.c
src/backend/utils/activity/backend_progress.c
src/backend/utils/activity/backend_status.c
src/backend/utils/activity/wait_event.c
src/bin/psql/describe.c
src/include/replication/pgoutput.h
src/include/utils/dynahash.h
src/pl/plperl/plperl.c
src/port/pgcheckdir.c
src/test/modules/unsafe_tests/expected/alter_system_table.out
src/test/modules/unsafe_tests/sql/alter_system_table.sql
src/test/regress/expected/sysviews.out
src/test/regress/sql/sysviews.sql
src/tools/msvc/vcregress.pl

index 4cd9818acf87d37eb0626af7c518b0318afe1d17..692d8a2a1782ebc18183f9636b7041a89b2652da 100644 (file)
@@ -8442,8 +8442,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
         This parameter specifies the default table access method to use when
         creating tables or materialized views if the <command>CREATE</command>
         command does not explicitly specify an access method, or when
-        <command>SELECT ... INTO</command> is used, which does not allow to
-        specify a table access method. The default is <literal>heap</literal>.
+        <command>SELECT ... INTO</command> is used, which does not allow
+        specifying a table access method. The default is <literal>heap</literal>.
        </para>
       </listitem>
      </varlistentry>
index 22f6c5c7abc09902f8c7349e2606e233ca20e8f3..7cf0f0da3b27bf824edbcfc64fc0d668f161d338 100644 (file)
@@ -1071,7 +1071,7 @@ CREATE TABLE order_items (
     represent independent objects, then <literal>RESTRICT</literal> or
     <literal>NO ACTION</literal> is more appropriate; an application that
     actually wants to delete both objects would then have to be explicit about
-    this and run two delete options.  In the above example, order items are
+    this and run two delete commands.  In the above example, order items are
     part of an order, and it is convenient if they are deleted automatically
     if an order is deleted.  But products and orders are different things, and
     so making a deletion of a product automatically cause the deletion of some
@@ -4044,7 +4044,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
      holding an <literal>ACCESS EXCLUSIVE</literal> lock on that partition.
      It is recommended to drop the now-redundant <literal>CHECK</literal>
      constraint after the <command>ATTACH PARTITION</command> is complete.  If
-     the table being attached is itself a partitioned table then each of its
+     the table being attached is itself a partitioned table, then each of its
      sub-partitions will be recursively locked and scanned until either a
      suitable <literal>CHECK</literal> constraint is encountered or the leaf
      partitions are reached.
@@ -4059,7 +4059,7 @@ ALTER TABLE measurement ATTACH PARTITION measurement_y2008m02
      the partition being attached.  This operation will be performed whilst
      holding an <literal>ACCESS EXCLUSIVE</literal> lock on the <literal>
      DEFAULT</literal> partition.  If the <literal>DEFAULT</literal> partition
-     is itself a partitioned table then each of its partitions will be
+     is itself a partitioned table, then each of its partitions will be
      recursively checked in the same way as the table being attached, as
      mentioned above.
     </para>
index 034fecc3a1913d843344cda27ec015603dcf91d2..0ee6974f1c6466927219bf618547419afb4a0149 100644 (file)
@@ -27367,6 +27367,79 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
        </para></entry>
       </row>
 
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_logicalmapdir</primary>
+        </indexterm>
+        <function>pg_ls_logicalmapdir</function> ()
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's <filename>pg_logical/mappings</filename>
+        directory. Filenames beginning with a dot, directories, and other
+        special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_logicalsnapdir</primary>
+        </indexterm>
+        <function>pg_ls_logicalsnapdir</function> ()
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's <filename>pg_logical/snapshots</filename>
+        directory. Filenames beginning with a dot, directories, and other
+        special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>pg_ls_replslotdir</primary>
+        </indexterm>
+        <function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> )
+        <returnvalue>setof record</returnvalue>
+        ( <parameter>name</parameter> <type>text</type>,
+        <parameter>size</parameter> <type>bigint</type>,
+        <parameter>modification</parameter> <type>timestamp with time zone</type> )
+       </para>
+       <para>
+        Returns the name, size, and last modification time (mtime) of each
+        ordinary file in the server's <filename>pg_replslot/slot_name</filename>
+        directory, where <parameter>slot_name</parameter> is the name of the
+        replication slot provided as input of the function. Filenames beginning
+        with a dot, directories, and other special files are excluded.
+       </para>
+       <para>
+        This function is restricted to superusers and members of
+        the <literal>pg_monitor</literal> role by default, but other users can
+        be granted EXECUTE to run the function.
+       </para></entry>
+      </row>
+
       <row>
        <entry role="func_table_entry"><para role="func_signature">
         <indexterm>
@@ -27498,78 +27571,6 @@ SELECT convert_from(pg_read_binary_file('file_in_utf8.txt'), 'UTF8');
        </para></entry>
       </row>
 
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_logicalsnapdir</primary>
-        </indexterm>
-        <function>pg_ls_logicalsnapdir</function> ()
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's <filename>pg_logical/snapshots</filename>
-        directory. Filenames beginning with a dot, directories, and other
-        special files are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
-
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_logicalmapdir</primary>
-        </indexterm>
-        <function>pg_ls_logicalmapdir</function> ()
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's <filename>pg_logical/mappings</filename>
-        directory. Filenames beginning with a dot, directories, and other
-        special files are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
-
-      <row>
-       <entry role="func_table_entry"><para role="func_signature">
-        <indexterm>
-         <primary>pg_ls_replslotdir</primary>
-        </indexterm>
-        <function>pg_ls_replslotdir</function> ( <parameter>slot_name</parameter> <type>text</type> )
-        <returnvalue>setof record</returnvalue>
-        ( <parameter>name</parameter> <type>text</type>,
-        <parameter>size</parameter> <type>bigint</type>,
-        <parameter>modification</parameter> <type>timestamp with time zone</type> )
-       </para>
-       <para>
-        Returns the name, size, and last modification time (mtime) of each
-        ordinary file in the server's <filename>pg_replslot/slot_name</filename>
-        directory, where <parameter>slot_name</parameter> is the name of the
-        replication slot provided as input of the function. Filenames beginning
-        with a dot, directories, and other special files are excluded.
-       </para>
-       <para>
-        This function is restricted to superusers and members of
-        the <literal>pg_monitor</literal> role by default, but other users can
-        be granted EXECUTE to run the function.
-       </para></entry>
-      </row>
      </tbody>
     </tgroup>
    </table>
index f23f78c00e4dc6b49b9a3b1d5d9d652fa7923c4c..1835d0e65a3692f2d37614a6c1a2016319a5987d 100644 (file)
    </glossdef>
   </glossentry>
 
-  <glossentry id="glossary-startup-process">
-   <glossterm>Startup process</glossterm>
-   <glossdef>
-    <para>
-     An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm>
-     that replays WAL during crash recovery and in a
-     <glossterm linkend="glossary-replication">physical replica</glossterm>.
-    </para>
-    <para>
-     (The name is historical: the startup process was named before
-     replication was implemented; the name refers to its task as it
-     relates to the server startup following a crash.)
-    </para>
-   </glossdef>
-  </glossentry>
-
   <glossentry id="glossary-sql-object">
    <glossterm>SQL object</glossterm>
     <glossdef>
    <glosssee otherterm="glossary-replica" />
   </glossentry>
 
+  <glossentry id="glossary-startup-process">
+   <glossterm>Startup process</glossterm>
+   <glossdef>
+    <para>
+     An <glossterm linkend="glossary-auxiliary-proc">auxiliary process</glossterm>
+     that replays WAL during crash recovery and in a
+     <glossterm linkend="glossary-replication">physical replica</glossterm>.
+    </para>
+    <para>
+     (The name is historical: the startup process was named before
+     replication was implemented; the name refers to its task as it
+     relates to the server startup following a crash.)
+    </para>
+   </glossdef>
+  </glossentry>
+
   <glossentry id="glossary-stats-collector">
    <glossterm>Stats collector (process)</glossterm>
    <glossdef>
index 84de93107127f1818498b305c8ab9833d6217e7c..d4163c96e9f8a8d4b77d116e4b28ef106af0f097 100644 (file)
@@ -253,7 +253,7 @@ typedef struct IndexAmRoutine
    access method blocks <acronym>HOT</acronym> when an indexed attribute is
    updated. Access methods without pointers to individual tuples (like
    <acronym>BRIN</acronym>) may allow <acronym>HOT</acronym> even in this
-   case. This does not apply to attributes referenced in index predicates,
+   case. This does not apply to attributes referenced in index predicates;
    an update of such attribute always disables <acronym>HOT</acronym>.
   </para>
 
index 89ff58338e5db0362687f0d5489e7fa43e630cac..9cf8ebea8088ce1347591dd4d2fa71d42947b654 100644 (file)
@@ -1337,7 +1337,7 @@ nd | {"1, 2": 33178, "1, 5": 33178, "2, 5": 27435, "1, 2, 5": 33178}
     <title>Multivariate MCV Lists</title>
 
     <para>
-     Another type of statistics stored for each column are most-common value
+     Another type of statistic stored for each column are most-common value
      lists.  This allows very accurate estimates for individual columns, but
      may result in significant misestimates for queries with conditions on
      multiple columns.
index 41cdb9ea1b595d8a4490a9cd154744878dc4cdee..2bb31f11255ddd88d2bf3655c14fa73b90cf7fa1 100644 (file)
@@ -955,8 +955,8 @@ postgres=# SELECT postgres_fdw_disconnect_all();
       of any length and contain even non-ASCII characters.  However when
       it's passed to and used as <varname>application_name</varname>
       in a foreign server, note that it will be truncated to less than
-      <symbol>NAMEDATALEN</symbol> characters and any characters other
-      than printable ASCII ones in it will be replaced with question
+      <symbol>NAMEDATALEN</symbol> characters and anything other than
+      than printable ASCII characters will be replaced with question
       marks (<literal>?</literal>).
       See <xref linkend="guc-application-name"/> for details.
      </para>
@@ -981,19 +981,19 @@ postgres=# SELECT postgres_fdw_disconnect_all();
        <tbody>
         <row>
          <entry><literal>%a</literal></entry>
-         <entry>Application name in local server</entry>
+         <entry>Application name on local server</entry>
         </row>
         <row>
          <entry><literal>%u</literal></entry>
-         <entry>User name in local server</entry>
+         <entry>User name on local server</entry>
         </row>
         <row>
          <entry><literal>%d</literal></entry>
-         <entry>Database name in local server</entry>
+         <entry>Database name on local server</entry>
         </row>
         <row>
          <entry><literal>%p</literal></entry>
-         <entry>Process ID of backend in local server</entry>
+         <entry>Process ID of backend on local server</entry>
         </row>
         <row>
          <entry><literal>%%</literal></entry>
index 2d63e0132c9530dd91984bf2ca8bb386bcb951d6..68908dcb7b33788c48c985e2afc7bdd1e62fc31f 100644 (file)
@@ -2101,7 +2101,7 @@ The commands accepted in replication mode are:
     </term>
     <listitem>
      <para>
-      Read some information associated to a replication slot. Returns a tuple
+      Read some information associated with a replication slot. Returns a tuple
       with <literal>NULL</literal> values if the replication slot does not
       exist. This command is currently only supported for physical replication
       slots.
@@ -2133,7 +2133,7 @@ The commands accepted in replication mode are:
         <term><literal>restart_tli</literal> (<type>int8</type>)</term>
         <listitem>
          <para>
-          The timeline ID associated to <literal>restart_lsn</literal>,
+          The timeline ID associated with <literal>restart_lsn</literal>,
           following the current timeline history.
          </para>
         </listitem>
@@ -2155,7 +2155,7 @@ The commands accepted in replication mode are:
       streaming starts on timeline <replaceable class="parameter">tli</replaceable>;
       otherwise, the server's current timeline is selected. The server can
       reply with an error, for example if the requested section of WAL has already
-      been recycled. On success, server responds with a CopyBothResponse
+      been recycled. On success, the server responds with a CopyBothResponse
       message, and then starts to stream WAL to the frontend.
      </para>
 
@@ -2516,7 +2516,7 @@ The commands accepted in replication mode are:
 
      <para>
       The server can reply with an error, for example if the
-      slot does not exist. On success, server responds with a CopyBothResponse
+      slot does not exist. On success, the server responds with a CopyBothResponse
       message, and then starts to stream WAL to the frontend.
      </para>
 
@@ -6680,7 +6680,7 @@ not line breaks.
 <para>
 This section describes the detailed format of each logical replication
 message.  These messages are either returned by the replication slot SQL
-interface or are sent by a walsender.  In the case of a walsender they are
+interface or are sent by a walsender.  In the case of a walsender, they are
 encapsulated inside replication protocol WAL messages as described in
 <xref linkend="protocol-replication"/>, and generally obey the same message
 flow as physical replication.
index bb4ef5e5e2256333b817281a941cabbabf3a486f..7c7c27bf7ce9f44795d1ac85e7c615418f3bdee2 100644 (file)
@@ -50,7 +50,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
    tables/schemas that were present in the publication will be removed.  The
    <literal>ADD</literal> and <literal>DROP</literal> clauses will add and
    remove one or more tables/schemas from the publication.  Note that adding
-   tables/schemas to a publication that is already subscribed to will require a
+   tables/schemas to a publication that is already subscribed to will require an
    <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> action on the
    subscribing side in order to become effective.
   </para>
@@ -82,7 +82,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
   <para>
    Adding/Setting a table that is part of schema specified in
    <literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a
-   publication that already has a table that is part of specified schema or
+   publication that already has a table that is part of the specified schema or
    adding/setting a table to a publication that already has a table's schema as
    part of the specified schema is not supported.
   </para>
index d805e8e77a7ec5fc18b6867013536a4b49314912..385975bfaddd0b1f5f7d51bda75eaaf9828a5c70 100644 (file)
@@ -131,9 +131,9 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
 
      <para>
       When a partitioned table is published via schema level publication, all
-      of its existing and future partitions irrespective of it being from the
-      publication schema or not are implicitly considered to be part of the
-      publication. So, even operations that are performed directly on a
+      of its existing and future partitions are implicitly considered to be part of the
+      publication, regardless of whether they are from the publication schema or not.
+      So, even operations that are performed directly on a
       partition are also published via publications that its ancestors are
       part of.
      </para>
@@ -195,7 +195,7 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
 
   <para>
    If <literal>FOR TABLE</literal>, <literal>FOR ALL TABLES</literal> or
-   <literal>FOR ALL TABLES IN SCHEMA</literal> is not specified, then the
+   <literal>FOR ALL TABLES IN SCHEMA</literal> are not specified, then the
    publication starts out with an empty set of tables.  That is useful if
    tables or schemas are to be added later.
   </para>
index 5de80f8c640de31c737608b3bbc57b64836d72c8..b2e41ea814c72b06bd289b364a5e5bcc430882b6 100644 (file)
@@ -82,9 +82,8 @@ PostgreSQL documentation
     <listitem>
      <para>
       First, scan the directory where the WAL segment files are written and
-      find the newest completed segment file, using as starting point the
-      beginning of the next WAL segment file. This is calculated independently
-      on the compression method used to compress each segment.
+      find the newest completed segment file, using as the starting point the
+      beginning of the next WAL segment file.
      </para>
     </listitem>
 
@@ -93,7 +92,7 @@ PostgreSQL documentation
       If a starting point cannot be calculated with the previous method,
       and if a replication slot is used, an extra
       <command>READ_REPLICATION_SLOT</command> command is issued to retrieve
-      the slot's <literal>restart_lsn</literal> to use as starting point.
+      the slot's <literal>restart_lsn</literal> to use as the starting point.
       This option is only available when streaming write-ahead logs from
       <productname>PostgreSQL</productname> 15 and up.
      </para>
@@ -103,7 +102,7 @@ PostgreSQL documentation
      <para>
       If a starting point cannot be calculated with the previous method,
       the latest WAL flush location is used as reported by the server from
-      a <literal>IDENTIFY_SYSTEM</literal> command.
+      an <literal>IDENTIFY_SYSTEM</literal> command.
      </para>
     </listitem>
    </orderedlist>
@@ -268,7 +267,7 @@ PostgreSQL documentation
       <listitem>
        <para>
         Enables compression of write-ahead logs using the specified method.
-        Supported values <literal>gzip</literal>, <literal>lz4</literal>
+        Supported values are <literal>gzip</literal>, <literal>lz4</literal>
         (if <productname>PostgreSQL</productname> was compiled with
         <option>--with-lz4</option>), and <literal>none</literal>.
        </para>
index c71dab644cad58510c9a0f498fae3b74ceba270f..be1896fa99d6a1fbcd910372635c8e420b1d0573 100644 (file)
@@ -220,8 +220,8 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
             data is generated in <command>pgbench</command> client and then
             sent to the server. This uses the client/server bandwidth
             extensively through a <command>COPY</command>.
-            <command>pgbench</command> uses the FREEZE option with 14 or later
-            versions of <productname>PostgreSQL</productname> to speed up
+            <command>pgbench</command> uses the FREEZE option with version 14 or later
+            of <productname>PostgreSQL</productname> to speed up
             subsequent <command>VACUUM</command>, unless partitions are enabled.
             Using <literal>g</literal> causes logging to print one message
             every 100,000 rows while generating data for the
index c5ce732ee983db5cfaa35310f040c4b5c8b8c7da..a1745a2642cef1ca0169b3176ba98eaaff667b2d 100644 (file)
@@ -139,7 +139,7 @@ PostgreSQL documentation
         of the upgraded cluster to be written safely to disk.  This option
         causes <command>pg_upgrade</command> to return without waiting, which
         is faster, but means that a subsequent operating system crash can leave
-        the synchronized data directory corrupt.  Generally, this option is
+        the data directory corrupt.  Generally, this option is
         useful for testing but should not be used on a production
         installation.
        </para>
index acc6401485b77599f577980be81e306261f250b4..82a77784b99763e20eefe1903692324b9de1f761 100644 (file)
@@ -107,7 +107,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
 
   <para>
    In contrast to <command>CREATE TABLE AS</command>, <command>SELECT
-   INTO</command> does not allow to specify properties like a table's access
+   INTO</command> does not allow specifying properties like a table's access
    method with <xref linkend="sql-createtable-method" /> or the table's
    tablespace with <xref linkend="sql-createtable-tablespace" />. Use
    <command>CREATE TABLE AS</command> if necessary.  Therefore, the default table
index a1751c86ccd721c98c76e13a97d005aaeb722c9d..fc85ba99ac133364c08cb0a916fd12a1507e2d77 100644 (file)
@@ -1319,7 +1319,7 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
            GinScanKey  key = so->keys + i;
 
            /*
-            * If we're considering a lossy page, skip excludeOnly keys They
+            * If we're considering a lossy page, skip excludeOnly keys. They
             * can't exclude the whole page anyway.
             */
            if (ItemPointerIsLossyPage(item) && key->excludeOnly)
index 6ec57f3d8b2258498c24d6d788e6dd7ca1ec9713..98230aac49c131ecc4b197931f205f07574f680a 100644 (file)
@@ -8354,7 +8354,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
 
 /*
  * Build a heap tuple representing the configured REPLICA IDENTITY to represent
- * the old tuple in a UPDATE or DELETE.
+ * the old tuple in an UPDATE or DELETE.
  *
  * Returns NULL if there's no need to log an identity or if there's no suitable
  * key defined.
index c9d4cbf3ff52f12b678420218b3bb9415595a469..58922f7edea83b573d1ff24c15751425f6f92982 100644 (file)
@@ -2706,7 +2706,6 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible)
     */
    if (LogwrtResult.Flush < WriteRqst.Flush &&
        LogwrtResult.Flush < LogwrtResult.Write)
-
    {
        /*
         * Could get here without iterating above loop, in which case we might
index cf0700f8ba08bb0603592f116173533526c72537..e14ca2f56305c699e0ec8f5d194ba17a9c57127a 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *     pg_publication.c
+ *     src/backend/catalog/pg_publication.c
  *
  *-------------------------------------------------------------------------
  */
index 61853e6dec47c70bb28964bbc8ae8f8e1e9c1a88..2e8efe4f8fc151c5fa9b97b35eb07898e5610915 100644 (file)
@@ -906,7 +906,7 @@ copy_table_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
                        RelationGetRelationName(OldHeap))));
 
    /*
-    * Hand of the actual copying to AM specific function, the generic code
+    * Hand off the actual copying to AM specific function, the generic code
     * cannot know how to deal with visibility across AMs. Note that this
     * routine is allowed to set FreezeXid / MultiXactCutoff to different
     * values (e.g. because the AM doesn't use freezing).
index e5cf1bde13feb58d7d77296bd1eb9df8173057b0..42aacc8f0a2209ba3c7958900104e091531e9437 100644 (file)
@@ -2219,7 +2219,7 @@ makeObjectName(const char *name1, const char *name2, const char *label)
    Assert(availchars > 0);     /* else caller chose a bad label */
 
    /*
-    * If we must truncate,  preferentially truncate the longer name. This
+    * If we must truncate, preferentially truncate the longer name. This
     * logic could be expressed without a loop, but it's simple and obvious as
     * a loop.
     */
index 3ab1bdeae1b77481bf7dfaad7bfc45b43d0512f7..0e4bb97fb73e0af653fd3a29f6293e9f6fcab46a 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *     publicationcmds.c
+ *     src/backend/commands/publicationcmds.c
  *
  *-------------------------------------------------------------------------
  */
index f5eba450ceb6dc18d2a1e948ac2c0646e227a0f4..3ef6607d2460183053422e5444545dfd9b902c7c 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *     subscriptioncmds.c
+ *     src/backend/commands/subscriptioncmds.c
  *
  *-------------------------------------------------------------------------
  */
index b8039c323b6c22002371b6c91023443e258a28ff..2f06fa743c228b7e39c294c0bba4070d88a4e3dc 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   src/backend/optimizer/path/appendinfo.c
+ *   src/backend/optimizer/util/appendinfo.c
  *
  *-------------------------------------------------------------------------
  */
index 8c5dc6594749ad2fb0ecb2b6700a05ad67157bc2..7e134822f36d122c57cd7ead1faf36d9e4671735 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   src/backend/optimizer/path/inherit.c
+ *   src/backend/optimizer/util/inherit.c
  *
  *-------------------------------------------------------------------------
  */
index 4f633888b4fed814dd1c2c43d05bb4ef8cc80cb1..4d71e71f6866244975f212f284e9149179ddd9e2 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (c) 2012-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *   src/backend/replication/logicalfuncs.c
+ *   src/backend/replication/logical/logicalfuncs.c
  *-------------------------------------------------------------------------
  */
 
index d317a626e1e06133d658fa4d17db844c8180d946..19b2ba2000c4aae71e76c8ca12f8260a91fc19a6 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   src/backend/replication/reorderbuffer.c
+ *   src/backend/replication/logical/reorderbuffer.c
  *
  * NOTES
  *   This module gets handed individual pieces of transactions in the order
index ab04e946bc213ce8516905904de01c8b699bb70a..83fca8a77d97a3afc058399c34e6a0647e811385 100644 (file)
  * Copyright (c) 2012-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *   src/backend/replication/snapbuild.c
+ *   src/backend/replication/logical/snapbuild.c
  *
  *-------------------------------------------------------------------------
  */
index c9af775bc18395fa31a40e75d744b203a110da45..d77bb32bb9e64e6f66825ac8f0374e8542d2aa51 100644 (file)
@@ -2368,7 +2368,7 @@ apply_dispatch(StringInfo s)
 
    /*
     * Set the current command being applied. Since this function can be
-    * called recusively when applying spooled changes, save the current
+    * called recursively when applying spooled changes, save the current
     * command.
     */
    saved_command = apply_error_callback_arg.command;
@@ -2587,8 +2587,8 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
    pgstat_report_activity(STATE_IDLE, NULL);
 
    /*
-    * Push apply error context callback. Fields will be filled during
-    * applying a change.
+    * Push apply error context callback. Fields will be filled while applying
+    * a change.
     */
    errcallback.callback = apply_error_callback;
    errcallback.previous = error_context_stack;
@@ -3608,7 +3608,7 @@ ApplyWorkerMain(Datum main_arg)
        }
 
        ereport(DEBUG1,
-               (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s.",
+               (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s",
                        MySubscription->name,
                        MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_DISABLED ? "DISABLED" :
                        MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_PENDING ? "PENDING" :
index 87fe82ed1146f1ab5c1f7f1a2fd933933a8c64af..ca48395d5c5a717a0161e54d9e7c5d12e9bb000a 100644 (file)
@@ -958,7 +958,7 @@ compare_datums_simple(Datum a, Datum b, SortSupport ssup)
  * build_attnums_array
  *     Transforms a bitmap into an array of AttrNumber values.
  *
- * This is used for extended statistics only, so all the attribute must be
+ * This is used for extended statistics only, so all the attributes must be
  * user-defined. That means offsetting by FirstLowInvalidHeapAttributeNumber
  * is not necessary here (and when querying the bitmap).
  */
index bad1787cfb2eea37e3585fa760e87d102d639be0..1ef303442854d2de907ce7aa7f821a090e2f3f8f 100644 (file)
@@ -134,7 +134,7 @@ static int  count_distinct_groups(int numrows, SortItem *items,
  * This bound is at most 25, and approaches 0 as n approaches 0 or N. The
  * case where n approaches 0 cannot happen in practice, since the sample
  * size is at least 300.  The case where n approaches N corresponds to
- * sampling the whole the table, in which case it is reasonable to keep
+ * sampling the whole table, in which case it is reasonable to keep
  * the whole MCV list (have no lower bound), so it makes sense to apply
  * this formula for all inputs, even though the above derivation is
  * technically only valid when the right hand side is at least around 10.
@@ -295,7 +295,7 @@ statext_mcv_build(StatsBuildData *data, double totalrows, int stattarget)
        /* Copy the first chunk of groups into the result. */
        for (i = 0; i < nitems; i++)
        {
-           /* just pointer to the proper place in the list */
+           /* just point to the proper place in the list */
            MCVItem    *item = &mcvlist->items[i];
 
            item->values = (Datum *) palloc(sizeof(Datum) * numattrs);
@@ -556,7 +556,7 @@ build_column_frequencies(SortItem *groups, int ngroups,
 
 /*
  * statext_mcv_load
- *     Load the MCV list for the indicated pg_statistic_ext tuple.
+ *     Load the MCV list for the indicated pg_statistic_ext_data tuple.
  */
 MCVList *
 statext_mcv_load(Oid mvoid, bool inh)
@@ -1620,7 +1620,7 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
    Assert(mcvlist->nitems <= STATS_MCVLIST_MAX_ITEMS);
 
    matches = palloc(sizeof(bool) * mcvlist->nitems);
-   memset(matches, !is_or,  sizeof(bool) * mcvlist->nitems);
+   memset(matches, !is_or, sizeof(bool) * mcvlist->nitems);
 
    /*
     * Loop through the list of clauses, and for each of them evaluate all the
index 11fa17ddea206380417d5806f3071f8fff536c26..543f691f2d2df9f004df562df0d72cc86b7a9f2a 100644 (file)
@@ -274,7 +274,6 @@ SyncPostCheckpoint(void)
 }
 
 /*
-
  * ProcessSyncRequests() -- Process queued fsync requests.
  */
 void
index e5958fa77c54f025a511d51f04c185f9a3913d6f..f29199725b72771739fdd94fab4c1e5777e92dd6 100644 (file)
@@ -1,11 +1,11 @@
 /* ----------
- * progress.c
+ * backend_progress.c
  *
  * Command progress reporting infrastructure.
  *
  * Copyright (c) 2001-2022, PostgreSQL Global Development Group
  *
- * src/backend/postmaster/progress.c
+ * src/backend/utils/activity/backend_progress.c
  * ----------
  */
 #include "postgres.h"
index 2fecf26a2c3b4ba36d655042780a215460f898b7..c7ed1e6d7ac084ed161a600bbabf34967877dfd4 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   src/backend/postmaster/backend_status.c
+ *   src/backend/utils/activity/backend_status.c
  * ----------
  */
 #include "postgres.h"
index 021b83de7a3526821c48ae7a795ef9f26e9657b8..60972c3a750babfa7fff445cf4e730b432674f52 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *   src/backend/postmaster/wait_event.c
+ *   src/backend/utils/activity/wait_event.c
  *
  * NOTES
  *
index 40433e32fa0030dc8edd975ea10d81c9a5e7be4c..346cd92793c8fcf480ad987c29246da0cfb775d5 100644 (file)
@@ -2652,8 +2652,8 @@ describeOneTableDetails(const char *schemaname,
 
                    /*
                     * When printing kinds we ignore expression statistics,
-                    * which is used only internally and can't be specified by
-                    * user. We don't print the kinds when either none are
+                    * which are used only internally and can't be specified
+                    * by user. We don't print the kinds when none are
                     * specified (in which case it has to be statistics on a
                     * single expr) or when all are specified (in which case
                     * we assume it's expanded by CREATE STATISTICS).
index fe1d0892aa621746a5331aa921ef6a0865dff054..78aa9151ef5776196527540151552eb835154fc5 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 2015-2022, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *     pgoutput.h
+ *     src/include/replication/pgoutput.h
  *
  *-------------------------------------------------------------------------
  */
index 28fa58a66297712df6b208460e7c2a7a6913f3fe..4564fb2467a1ca666280a6c403e0ac0fcb9f50bf 100644 (file)
@@ -1,13 +1,14 @@
 /*-------------------------------------------------------------------------
  *
- * dynahash
+ * dynahash.h
  *   POSTGRES dynahash.h file definitions
  *
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * src/include/utils/dynahash.h
+ * IDENTIFICATION
+ *     src/include/utils/dynahash.h
  *
  *-------------------------------------------------------------------------
  */
index 1c77211ac45426984a1bba5a3b608ae6df78a3a1..1ae8195e023d7f5f6730acba3f1f3459d7242b87 100644 (file)
@@ -334,7 +334,7 @@ hek2cstr(HE *he)
    SAVETMPS;
 
    /*-------------------------
-    * Unfortunately,  while HeUTF8 is true for most things > 256, for values
+    * Unfortunately, while HeUTF8 is true for most things > 256, for values
     * 128..255 it's not, but perl will treat them as unicode code points if
     * the utf8 flag is not set ( see The "Unicode Bug" in perldoc perlunicode
     * for more)
index 75dbb147d716b164af1f1c50efe659b6b1899dce..6c09cf298101dae91620dd69d92b5e1714600e14 100644 (file)
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * src/port/pgcheckdir.c
+ * pgcheckdir.c
  *
  * A simple subroutine to check whether a directory exists and is empty or not.
  * Useful in both initdb and the backend.
@@ -8,6 +8,8 @@
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
+ * IDENTIFICATION
+ *     src/port/pgcheckdir.c
  *-------------------------------------------------------------------------
  */
 
index 4b2f63a95ed9d18fbb563985fc8b26614b17d762..be0559503b6ff3bf14e79e0d0c82a3c1094eca1f 100644 (file)
@@ -53,7 +53,7 @@ ERROR:  permission denied: "pg_description" is a system catalog
 CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_description);
 ERROR:  permission denied: "pg_description" is a system catalog
 -- RangeVarCallbackOwnsRelation()
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 ERROR:  permission denied: "pg_description" is a system catalog
 -- RangeVarCallbackForAlterRelation()
 ALTER TABLE pg_description RENAME TO pg_comment;
@@ -151,7 +151,7 @@ CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_descr
 ROLLBACK;
 -- RangeVarCallbackOwnsRelation()
 BEGIN;
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 ROLLBACK;
 -- RangeVarCallbackForAlterRelation()
 BEGIN;
index 6bfc896ef9cf5f91d50c78b2b649eae80aa280ba..b77b68c946a1044ba4fcebf3e06d3c2a2ca219d8 100644 (file)
@@ -55,7 +55,7 @@ ALTER TABLE pg_description ALTER COLUMN description SET STATISTICS -1;
 CREATE TABLE foo (a oid, b oid, c int, FOREIGN KEY (a, b, c) REFERENCES pg_description);
 
 -- RangeVarCallbackOwnsRelation()
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 
 -- RangeVarCallbackForAlterRelation()
 ALTER TABLE pg_description RENAME TO pg_comment;
@@ -161,7 +161,7 @@ ROLLBACK;
 
 -- RangeVarCallbackOwnsRelation()
 BEGIN;
-CREATE INDEX pg_descripton_test_index ON pg_description (description);
+CREATE INDEX pg_description_test_index ON pg_description (description);
 ROLLBACK;
 
 -- RangeVarCallbackForAlterRelation()
index 2088857615a2976d16797a233938d1c34985218b..442eeb1e3fe7779421c26a971d231def72597993 100644 (file)
@@ -20,7 +20,7 @@ select count(*) >= 0 as ok from pg_available_extensions;
 (1 row)
 
 -- The entire output of pg_backend_memory_contexts is not stable,
--- we test only the existance and basic condition of TopMemoryContext.
+-- we test only the existence and basic condition of TopMemoryContext.
 select name, ident, parent, level, total_bytes >= free_bytes
   from pg_backend_memory_contexts where level = 0;
        name       | ident | parent | level | ?column? 
index b24816e3d5a2c38ddad7c68f189e35ca20f83a79..4980f07be25c6041f7eb84c911f6c453c751b390 100644 (file)
@@ -13,7 +13,7 @@ select count(*) >= 0 as ok from pg_available_extension_versions;
 select count(*) >= 0 as ok from pg_available_extensions;
 
 -- The entire output of pg_backend_memory_contexts is not stable,
--- we test only the existance and basic condition of TopMemoryContext.
+-- we test only the existence and basic condition of TopMemoryContext.
 select name, ident, parent, level, total_bytes >= free_bytes
   from pg_backend_memory_contexts where level = 0;
 
index 6dcd742fa6cb5348415894d54761ce7138c7557d..ddce4680a94694d0a9b293ee421055b69f26e44b 100644 (file)
@@ -538,7 +538,6 @@ sub recoverycheck
 
    $ENV{REGRESS_OUTPUTDIR} = "$topdir/src/test/recovery/tmp_check";
 
-   my $mstat  = 0;
    my $dir    = "$topdir/src/test/recovery";
    my $status = tap_check($dir);
    exit $status if $status;
@@ -717,7 +716,6 @@ sub fetchRegressOpts
 # list is returned if the module does not need to run anything.
 sub fetchTests
 {
-
    my $handle;
    open($handle, '<', "GNUmakefile")
      || open($handle, '<', "Makefile")
@@ -783,7 +781,7 @@ sub InstallTemp
 sub usage
 {
    print STDERR
-     "Usage: vcregress.pl <mode> [ <arg>]\n\n",
+     "Usage: vcregress.pl <mode> [<arg>]\n\n",
      "Options for <mode>:\n",
      "  bincheck       run tests of utilities in src/bin/\n",
      "  check          deploy instance and run regression tests on it\n",