Fix various typos and incorrect/outdated name references
authorDavid Rowley <[email protected]>
Wed, 19 Apr 2023 01:50:33 +0000 (13:50 +1200)
committerDavid Rowley <[email protected]>
Wed, 19 Apr 2023 01:50:33 +0000 (13:50 +1200)
Author: Alexander Lakhin
Discussion: https://postgr.es/m/699beab4-a6ca-92c9-f152-f559caf6dc25@gmail.com

28 files changed:
contrib/basebackup_to_shell/t/001_basic.pl
contrib/pg_walinspect/pg_walinspect.c
src/backend/access/transam/parallel.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogprefetcher.c
src/backend/access/transam/xlogrecovery.c
src/backend/backup/basebackup_copy.c
src/backend/catalog/pg_publication.c
src/backend/commands/vacuumparallel.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeModifyTable.c
src/backend/executor/spi.c
src/backend/optimizer/plan/initsplan.c
src/backend/replication/logical/tablesync.c
src/backend/storage/ipc/procarray.c
src/backend/utils/mmgr/generation.c
src/backend/utils/sort/tuplesort.c
src/backend/utils/time/snapmgr.c
src/bin/pg_basebackup/bbstreamer_gzip.c
src/bin/pg_dump/pg_dump.c
src/include/utils/pgstat_internal.h
src/include/utils/sortsupport.h
src/interfaces/libpq/fe-trace.c
src/pl/plpython/plpy_main.c
src/test/subscription/t/013_partition.pl
src/test/subscription/t/023_twophase_stream.pl
src/test/subscription/t/029_on_error.pl
src/tools/mark_pgdllimport.pl

index a278df3f91b65d84bb5e14dce8f1a3633cf579b1..84ad93f6140d1c8fcae49206e6ca9ee7e97c4c9b 100644 (file)
@@ -49,7 +49,7 @@ $node->command_fails_like(
        qr/shell command for backup is not configured/,
        'fails if basebackup_to_shell.command is not set');
 
-# Configure basebackup_to_shell.command and reload the configuation file.
+# Configure basebackup_to_shell.command and reload the configuration file.
 my $backup_path         = PostgreSQL::Test::Utils::tempdir;
 my $escaped_backup_path = $backup_path;
 $escaped_backup_path =~ s{\\}{\\\\}g
index e6f18e1c644eb00a7cf8df733e98047720e5fda9..1cd3744d5dfa7f084821d938b8441bb4308a1eb3 100644 (file)
@@ -85,7 +85,7 @@ GetCurrentLSN(void)
 }
 
 /*
- * Intialize WAL reader and identify first valid LSN.
+ * Initialize WAL reader and identify first valid LSN.
  */
 static XLogReaderState *
 InitXLogReaderState(XLogRecPtr lsn)
index b26f2a64fbcb4de5b7384ca99aa21b181daf41b8..7133ec0b22c98ba27760c1629878ab03ee3fd221 100644 (file)
@@ -376,7 +376,7 @@ InitializeParallelDSM(ParallelContext *pcxt)
 
                /*
                 * Serialize the transaction snapshot if the transaction
-                * isolation-level uses a transaction snapshot.
+                * isolation level uses a transaction snapshot.
                 */
                if (IsolationUsesXactSnapshot())
                {
index b393f1b6c1f52b445dc0c6ccff90b424115ab1cb..63481d826f74ad8c0889e0b69e4adb14b47805f2 100644 (file)
@@ -5835,7 +5835,7 @@ ReachedEndOfBackup(XLogRecPtr EndRecPtr, TimeLineID tli)
 {
        /*
         * We have reached the end of base backup, as indicated by pg_control. The
-        * data on disk is now consistent (unless minRecovery point is further
+        * data on disk is now consistent (unless minRecoveryPoint is further
         * ahead, which can happen if we crashed during previous recovery).  Reset
         * backupStartPoint and backupEndPoint, and update minRecoveryPoint to
         * make sure we don't allow starting up at an earlier point even if
index 7ba18f2a761e510cbbe2977574fb82f57dfd9c1b..906e3d94690ffc784c7ce7088a71a601807d9baa 100644 (file)
@@ -457,9 +457,9 @@ XLogPrefetcherComputeStats(XLogPrefetcher *prefetcher)
  * *lsn, and the I/O will be considered to have completed once that LSN is
  * replayed.
  *
- * Returns LRQ_NO_IO if we examined the next block reference and found that it
- * was already in the buffer pool, or we decided for various reasons not to
- * prefetch.
+ * Returns LRQ_NEXT_NO_IO if we examined the next block reference and found
+ * that it was already in the buffer pool, or we decided for various reasons
+ * not to prefetch.
  */
 static LsnReadQueueNextStatus
 XLogPrefetcherNextBlock(uintptr_t pgsr_private, XLogRecPtr *lsn)
index 02d1b2cd6d86ddd5ffd484b7344168cfc6e15bdd..188f6d6f85afc2a1b229ef15194d6d5c00a38c37 100644 (file)
@@ -8,7 +8,7 @@
  * or standby mode, depending on configuration options and the state of
  * the control file and possible backup label file.  PerformWalRecovery()
  * performs the actual WAL replay, calling the rmgr-specific redo routines.
- * EndWalRecovery() performs end-of-recovery checks and cleanup actions,
+ * FinishWalRecovery() performs end-of-recovery checks and cleanup actions,
  * and prepares information needed to initialize the WAL for writes.  In
  * addition to these three main functions, there are a bunch of functions
  * for interrogating recovery state and controlling the recovery process.
@@ -505,7 +505,7 @@ EnableStandbyMode(void)
  * disk does after initializing other subsystems, but before calling
  * PerformWalRecovery().
  *
- * This initializes some global variables like ArchiveModeRequested, and
+ * This initializes some global variables like ArchiveRecoveryRequested, and
  * StandbyModeRequested and InRecovery.
  */
 void
@@ -1396,11 +1396,11 @@ read_tablespace_map(List **tablespaces)
  *
  * This does not close the 'xlogreader' yet, because in some cases the caller
  * still wants to re-read the last checkpoint record by calling
- * ReadCheckPointRecord().
+ * ReadCheckpointRecord().
  *
  * Returns the position of the last valid or applied record, after which new
  * WAL should be appended, information about why recovery was ended, and some
- * other things. See the WalRecoveryResult struct for details.
+ * other things. See the EndOfWalRecoveryInfo struct for details.
  */
 EndOfWalRecoveryInfo *
 FinishWalRecovery(void)
index 2bb6c89f8c0cd5af607509e1ba6070b4e24aad3d..73a3f4a97093b856d2bf721f9947e83fc9c35a9d 100644 (file)
@@ -3,7 +3,7 @@
  * basebackup_copy.c
  *       send basebackup archives using COPY OUT
  *
- * We send a result set with information about the tabelspaces to be included
+ * We send a result set with information about the tablespaces to be included
  * in the backup before starting COPY OUT. Then, we start a single COPY OUT
  * operation and transmits all the archives and the manifest if present during
  * the course of that single COPY OUT. Each CopyData message begins with a
index 47637f28ab6427bd876c9a7ffe5bca971f0ecc13..c488b6370b62f34b6ffa05e2f13b1cc85ae12821 100644 (file)
@@ -497,7 +497,7 @@ compare_int16(const void *a, const void *b)
  * and a Bitmapset with them; verify that each attribute is appropriate
  * to have in a publication column list (no system or generated attributes,
  * no duplicates).  Additional checks with replica identity are done later;
- * see check_publication_columns.
+ * see pub_collist_contains_invalid_column.
  *
  * Note that the attribute numbers are *not* offset by
  * FirstLowInvalidHeapAttributeNumber; system columns are forbidden so this
index 87ea5c524264ca27908c6032b43d51313b14c32f..a79067fd461deaff4fbb599decf6552d251a2342 100644 (file)
@@ -8,7 +8,7 @@
  *
  * In a parallel vacuum, we perform both index bulk deletion and index cleanup
  * with parallel worker processes.  Individual indexes are processed by one
- * vacuum process.  ParalleVacuumState contains shared information as well as
+ * vacuum process.  ParallelVacuumState contains shared information as well as
  * the memory space for storing dead items allocated in the DSM segment.  We
  * launch parallel worker processes at the start of parallel index
  * bulk-deletion and index cleanup and once all indexes are processed, the
index 28205f74331c08036d4ab7b1b8985290441dfa60..3aab5a0e80bba3043853902f695377c41fd6dc42 100644 (file)
@@ -4081,7 +4081,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
        numTransArgs = pertrans->numTransInputs + 1;
 
        /*
-        * Set up infrastructure for calling the transfn.  Note that invtrans is
+        * Set up infrastructure for calling the transfn.  Note that invtransfn is
         * not needed here.
         */
        build_aggregate_transfn_expr(inputTypes,
index 5b596f1e7a9f7e66822ba1622aeb83b842563daa..6aa8c03defb9a9761401705d9cd608175fa98336 100644 (file)
@@ -740,7 +740,7 @@ ExecGetUpdateNewTuple(ResultRelInfo *relinfo,
  *
  *             Returns RETURNING result if any, otherwise NULL.
  *             *inserted_tuple is the tuple that's effectively inserted;
- *             *inserted_destrel is the relation where it was inserted.
+ *             *insert_destrel is the relation where it was inserted.
  *             These are only set on success.
  *
  *             This may change the currently active tuple conversion map in
index e3a170c38b84eb1c687bcd9bf4dc36e259f92bdd..256632c98587c52fbe1db3f994b95e2e369a0dc2 100644 (file)
@@ -432,7 +432,7 @@ AtEOXact_SPI(bool isCommit)
 
        /*
         * Pop stack entries, stopping if we find one marked internal_xact (that
-        * one belongs to the caller of SPI_commit or SPI_abort).
+        * one belongs to the caller of SPI_commit or SPI_rollback).
         */
        while (_SPI_connected >= 0)
        {
index c6c21a73386cc694a52b5a26bb8b7c3db2905164..06f90882c4473b98cff727318d50d87f9245d7df 100644 (file)
@@ -3152,7 +3152,7 @@ check_hashjoinable(RestrictInfo *restrictinfo)
 /*
  * check_memoizable
  *       If the restrictinfo's clause is suitable to be used for a Memoize node,
- *       set the lefthasheqoperator and righthasheqoperator to the hash equality
+ *       set the left_hasheqoperator and right_hasheqoperator to the hash equality
  *       operator that will be needed during caching.
  */
 static void
index 6dce355633249a6beb37a459c86e82da1990b621..0c71ae9ba74788e4ba16634281758f2997637ca8 100644 (file)
@@ -1556,7 +1556,7 @@ FetchTableStates(bool *started_tx)
                 * Does the subscription have tables?
                 *
                 * If there were not-READY relations found then we know it does. But
-                * if table_state_not_ready was empty we still need to check again to
+                * if table_states_not_ready was empty we still need to check again to
                 * see if there are 0 tables.
                 */
                has_subrels = (table_states_not_ready != NIL) ||
index ea91ce355f2bf2d428c3452334e46a97625cb111..fc05e2e293dc0ed5d7993b9d05261c5dae704112 100644 (file)
@@ -2000,7 +2000,7 @@ static inline GlobalVisHorizonKind
 GlobalVisHorizonKindForRel(Relation rel)
 {
        /*
-        * Other relkkinds currently don't contain xids, nor always the necessary
+        * Other relkinds currently don't contain xids, nor always the necessary
         * logical decoding markers.
         */
        Assert(!rel ||
index ae48cdbaa9a76f95995d82f8c929ee36dc5b0ddb..4fb8663cd6b1d9f4d7795e04cd96a543158c75f9 100644 (file)
@@ -544,7 +544,7 @@ GenerationBlockInit(GenerationContext *context, GenerationBlock *block,
 
 /*
  * GenerationBlockIsEmpty
- *             Returns true iif 'block' contains no chunks
+ *             Returns true iff 'block' contains no chunks
  */
 static inline bool
 GenerationBlockIsEmpty(GenerationBlock *block)
index 9ca9835aab6bc5d62a70f97d8fe58b086c7a83fa..95c3970437d0c02c705f2f7e444a83a2acea99a7 100644 (file)
@@ -494,7 +494,7 @@ static void tuplesort_updatemax(Tuplesortstate *state);
  * abbreviations of text or multi-key sorts.  There could be!  Is it worth it?
  */
 
-/* Used if first key's comparator is ssup_datum_unsigned_compare */
+/* Used if first key's comparator is ssup_datum_unsigned_cmp */
 static pg_attribute_always_inline int
 qsort_tuple_unsigned_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
 {
@@ -517,7 +517,7 @@ qsort_tuple_unsigned_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
 }
 
 #if SIZEOF_DATUM >= 8
-/* Used if first key's comparator is ssup_datum_signed_compare */
+/* Used if first key's comparator is ssup_datum_signed_cmp */
 static pg_attribute_always_inline int
 qsort_tuple_signed_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
 {
@@ -541,7 +541,7 @@ qsort_tuple_signed_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
 }
 #endif
 
-/* Used if first key's comparator is ssup_datum_int32_compare */
+/* Used if first key's comparator is ssup_datum_int32_cmp */
 static pg_attribute_always_inline int
 qsort_tuple_int32_compare(SortTuple *a, SortTuple *b, Tuplesortstate *state)
 {
index 7d11ae34781bf3e4cf501c1201ea3440a71e7834..c9ca44d8b763eeecaf85cc2c20a9d92d7d379da2 100644 (file)
@@ -1630,7 +1630,7 @@ ThereAreNoPriorRegisteredSnapshots(void)
 }
 
 /*
- * HaveRegisteredOrActiveSnapshots
+ * HaveRegisteredOrActiveSnapshot
  *             Is there any registered or active snapshot?
  *
  * NB: Unless pushed or active, the cached catalog snapshot will not cause
index 83bf5972fa8bd1c7c4b7c46872bb2cd2c915851c..3bdbfa0bc43ef31a2534a645a4f642368e59f0b0 100644 (file)
@@ -150,7 +150,7 @@ bbstreamer_gzip_writer_content(bbstreamer *streamer,
  * calling gzclose.
  *
  * It makes no difference whether we opened the file or the caller did it,
- * because libz provides no way of avoiding a close on the underling file
+ * because libz provides no way of avoiding a close on the underlying file
  * handle. Notice, however, that bbstreamer_gzip_writer_new() uses dup() to
  * work around this issue, so that the behavior from the caller's viewpoint
  * is the same as for bbstreamer_plain_writer.
index 73a6c964baf9544535d36d659933aa29385a0154..058244cd17171c010ab96a36fe4c7b58888e5921 100644 (file)
@@ -9636,7 +9636,7 @@ getAdditionalACLs(Archive *fout)
                                {
                                        if (dobj->objType == DO_TABLE)
                                        {
-                                               /* For a column initpriv, set the table's ACL flags */
+                                               /* For a column initprivs, set the table's ACL flags */
                                                dobj->components |= DUMP_COMPONENT_ACL;
                                                ((TableInfo *) dobj)->hascolumnACLs = true;
                                        }
index 6badb2fde4b4bf43384f3888d686a38aa9524de1..60fbf9394b98cc761bc2903ffdbea9d40ffbb9f4 100644 (file)
@@ -102,7 +102,7 @@ typedef struct PgStatShared_HashEntry
 } PgStatShared_HashEntry;
 
 /*
- * Common header struct for PgStatShm_Stat*Entry.
+ * Common header struct for PgStatShared_*.
  */
 typedef struct PgStatShared_Common
 {
index aaca6634cbeb59b8c6c7a6bf5f63c089317d6931..475ed1d5b82b4e1bc23ba048d0cf45cb4fbf2e3b 100644 (file)
@@ -372,7 +372,7 @@ ApplySortAbbrevFullComparator(Datum datum1, bool isNull1,
 
 /*
  * Datum comparison functions that we have specialized sort routines for.
- * Datatypes that install these as their comparator or abbrevated comparator
+ * Datatypes that install these as their comparator or abbreviated comparator
  * are eligible for faster sorting.
  */
 extern int     ssup_datum_unsigned_cmp(Datum x, Datum y, SortSupport ssup);
index abaab6a073c8f0f50a44c3a84c93c36f1cfeb38e..402784f40e3e1fa72aba7a64ab69acfc8892f301 100644 (file)
@@ -74,7 +74,7 @@ PQsetTraceFlags(PGconn *conn, int flags)
 /*
  * Print the current time, with microseconds, into a caller-supplied
  * buffer.
- * Cribbed from setup_formatted_log_time, but much simpler.
+ * Cribbed from get_formatted_log_time, but much simpler.
  */
 static void
 pqTraceFormatTimestamp(char *timestr, size_t ts_len)
index a4d66f3057fcd5ded7254ea36c9d2899150baa62..010a97378c9085940cead61c8de7dacaa45da709 100644 (file)
@@ -306,7 +306,7 @@ plpython3_inline_handler(PG_FUNCTION_ARGS)
                /*
                 * Setup error traceback support for ereport().
                 * plpython_inline_error_callback doesn't currently need exec_ctx, but
-                * for consistency with plpython_call_handler we do it the same way.
+                * for consistency with plpython3_call_handler we do it the same way.
                 */
                plerrcontext.callback = plpython_inline_error_callback;
                plerrcontext.arg = exec_ctx;
index f03cd24246d2c747e191de29eb17771860f939a8..275fb3b52572196882f153a5d7a5b7a7c86a378e 100644 (file)
@@ -564,7 +564,7 @@ is($result, qq(), 'inserts into tab4_1 replicated');
 
 
 # now switch the order of publications in the list, try again, the result
-# should be the same (no dependence on order of pulications)
+# should be the same (no dependence on order of publications)
 $node_subscriber2->safe_psql('postgres',
        "ALTER SUBSCRIPTION sub2 SET PUBLICATION pub_all, pub_lower_level");
 
index 1cc871fddbd96bea48c31077e1775df294a40aff..f4af44414b67ed18e7a98d35e6d43d6239bd2d9e 100644 (file)
@@ -264,7 +264,7 @@ sub test_streaming
        is($result, qq(1), 'transaction is prepared on subscriber');
 
        # Insert a different record (now we are outside of the 2PC transaction)
-       # Note: the 2PC transaction still holds row locks so make sure this insert is for a separare primary key
+       # Note: the 2PC transaction still holds row locks so make sure this insert is for a separate primary key
        $node_publisher->safe_psql('postgres',
                "INSERT INTO test_tab VALUES (99999, 'foobar')");
 
index 7797a949c2a430fa1d7ddbd5f4885c31d7f5ffec..7d6fb66985ae24543851a5d315d5bcd585ee6a41 100644 (file)
@@ -13,7 +13,7 @@ my $offset = 0;
 # Test skipping the transaction. This function must be called after the caller
 # has inserted data that conflicts with the subscriber.  The finish LSN of the
 # error transaction that is used to specify to ALTER SUBSCRIPTION ... SKIP is
-# fetched from the server logs. After executing ALTER SUBSCRITPION ... SKIP, we
+# fetched from the server logs. After executing ALTER SUBSCRIPTION ... SKIP, we
 # check if logical replication can continue working by inserting $nonconflict_data
 # on the publisher.
 sub test_skip_lsn
index 69fa8e4ae94eafb79b6ed7d90cc3f6d95c4b060e..0cf71dbc25827e85a183eb8f21760b7f292fd87e 100755 (executable)
@@ -6,7 +6,7 @@
 #      Perl script that tries to add PGDLLIMPORT markings to PostgreSQL
 #      header files.
 #
-# This relies on a few idiosyncracies of the PostgreSQL coding style,
+# This relies on a few idiosyncrasies of the PostgreSQL coding style,
 # such as the fact that we always use "extern" in function
 # declarations, and that we don't use // comments. It's not very
 # smart and may not catch all cases.