pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Fix typos and inconsistencies for HEAD (take 5)
25+ messages / 4 participants
[nested] [flat]

* Fix typos and inconsistencies for HEAD (take 5)
@ 2019-07-07 05:03 Alexander Lakhin <exclusion@gmail.com>
  2019-07-08 04:14 ` Re: Fix typos and inconsistencies for HEAD (take 5) Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-07-07 05:03 UTC (permalink / raw)
  To: pgsql-hackers; +Cc: Michael Paquier <michael@paquier.xyz>

Hello hackers,

Please consider fixing the next cluster of typos and inconsistencies in
the tree:
5.1. datetkntbl -> datetktbl
5.2. datminxmid -> datminmxid
5.3. DatumGetP -> DatumGetPointer
5.4. ECPG_COMPILE, DECPG_COMPILE -> remove (orphaned since 328d235)
5.5. defer_cleanup_age -> vacuum_defer_cleanup_age
5.6. descriptor_index -> remove (orphaned since 991b974)
5.7. DestroyBuilder, InitBuilder, SetDoc -> DestroyOpaque, InitOpaque,
SetDocument
5.8. dictlexize -> thesaurus_lexize
5.9. regression.diffsregression.planregress/inh -> regression.diffs
planregress/diffs.inh
5.10. dllist -> dlist
5.11. DocRepresentaion -> DocRepresentation
5.12. dosplit -> remove (such function is not present since introduction
in 9892ddf)
5.13. DOWN_MEM_FENCE -> _DOWN_MEM_FENCE
5.14. dp_pg_stop_backup -> do_pg_stop_backup
5.15. DropRelFileNodeAllBuffers -> DropRelFileNodesAllBuffers
5.16. dshash_release -> dshash_release_lock
5.17. EACCESS -> remove (not used since introduction in 12c94238)
5.18. ECPGcheck_PQresult -> ecpg_check_PQresult (renamed in 7793c6ec,
referenced code moved in ecpg_execute() in 61bee9f7)
5.19. ecpg_compatlib -> libecpg_compat
5.20. ECPGerrmsg -> remove (not used since introduction in 244d2d67)
5.21. ecpg_free_auto_mem -> remove (not used since introduction in 7793c6ec)
5.22. ecpggetdescp -> remove (not used since introduction in 90326c01)
5.23. endBlk -> numBlks
5.24. endMemb, startMemb, endOff, startOff -> endTruncMemb,
startTruncMemb, endTruncOff, startTruncOff
5.25. EndPlan -> ExecEndPlan
5.26. EndResult -> ExprEndResult
5.27. equivalentOpersAfterPromotion -> remove (irrelevant since
8536c962, but the whole comments is too old to be informational too)
5.28. es_jit_combined_instr -> es_jit_worker_instr (renamed in c03c1449)
5.29. ExclusiveRowLock -> RowExclusiveLock
5.30. exdended -> extended (user-visible, I would fix it in
REL_12_STABLE too)
5.31. ExecBitmapHeapNext -> BitmapHeapNext
5.32. ExecBuildProjectInfo -> ExecBuildProjectionInfo
5.33. ExecDirection -> remove (this variable is not present since PG95-1_01)
5.34. ExecEndRecursiveUnionScan -> ExecEndRecursiveUnion
5.35. ExecGrantStmt -> ExecuteGrantStmt
5.36. ExecInitRecursiveUnionScan -> ExecInitRecursiveUnion
5.37. ExecSeqNext -> SeqNext
5.38. exec_statement_return -> exec_stmt_return
5.39. exec_subplan_get_plan -> remove (not used since 1cc29fe7)
5.40. ExecSubqueryNext -> SubqueryNext
5.41. ExecValuesNext -> ValuesNext
5.42. existing_oid -> existing_relation_id
5.43. exit_fatal -> fatal
5.44. expectedTLIs -> expectedTLEs
5.45. ExprEvalExpr -> ExecEvalExpr
5.46. exprhasexecparam -> remove (orphaned since 6630ccad)
5.47. ExprReadyExpr -> ExecReadyExpr
5.48. EXTENSION_REALLY_RETURN_NULL -> remove (the behaviour changed with
a7124870)

There are some other ancient comments like spotted in 5.27, e.g. for
textcat(), text_substr() in varlena.c...  It seems that they serve more 
historic than informational purposes today.

Best regards,
Alexander

Attachments:

  [text/x-patch] fixes_5.1-10.patch (6.7K, ../../0c991fdf-2670-1997-c027-772a420c4604@gmail.com/2-fixes_5.1-10.patch)
  download | inline diff:
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 44a3b2c03c..763b8cf7fd 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -910,7 +910,7 @@ Datum
 my_fetch(PG_FUNCTION_ARGS)
 {
     GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-    input_data_type *in = DatumGetP(entry->key);
+    input_data_type *in = DatumGetPointer(entry->key);
     fetched_data_type *fetched_data;
     GISTENTRY  *retval;
 
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fad859a812..7f127e2339 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2784,7 +2784,7 @@ ReadMultiXactCounts(uint32 *multixacts, MultiXactOffset *members)
 
 /*
  * Multixact members can be removed once the multixacts that refer to them
- * are older than every datminxmid.  autovacuum_multixact_freeze_max_age and
+ * are older than every datminmxid.  autovacuum_multixact_freeze_max_age and
  * vacuum_multixact_freeze_table_age work together to make sure we never have
  * too many multixacts; we hope that, at least under normal circumstances,
  * this will also be sufficient to keep us from using too many offsets.
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index fd85b9c8f4..073f313337 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -1069,7 +1069,7 @@ rebuild_database_list(Oid newdb)
 		current_time = GetCurrentTimestamp();
 
 		/*
-		 * move the elements from the array into the dllist, setting the
+		 * move the elements from the array into the dlist, setting the
 		 * next_worker while walking the array
 		 */
 		for (i = 0; i < nelems; i++)
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 18a0f62ba6..6c22cbfa29 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1428,8 +1428,8 @@ GetOldestXmin(Relation rel, int flags)
 		result = replication_slot_xmin;
 
 	/*
-	 * After locks have been released and defer_cleanup_age has been applied,
-	 * check whether we need to back up further to make logical decoding
+	 * After locks have been released and vacuum_defer_cleanup_age has been
+	 * applied, check whether we need to back up further to make logical decoding
 	 * possible. We need to do so if we're computing the global limit (rel =
 	 * NULL) or if the passed relation is a catalog relation of some kind.
 	 */
diff --git a/src/backend/utils/misc/tzparser.c b/src/backend/utils/misc/tzparser.c
index cdb9db475d..0b2900a4b6 100644
--- a/src/backend/utils/misc/tzparser.c
+++ b/src/backend/utils/misc/tzparser.c
@@ -53,7 +53,7 @@ validateTzEntry(tzEntry *tzentry)
 	unsigned char *p;
 
 	/*
-	 * Check restrictions imposed by datetkntbl storage format (see
+	 * Check restrictions imposed by datetktbl storage format (see
 	 * datetime.c)
 	 */
 	if (strlen(tzentry->abbrev) > TOKMAXLEN)
diff --git a/src/include/executor/tablefunc.h b/src/include/executor/tablefunc.h
index 926bd57014..e6fd3d4f01 100644
--- a/src/include/executor/tablefunc.h
+++ b/src/include/executor/tablefunc.h
@@ -20,11 +20,11 @@ struct TableFuncScanState;
  * TableFuncRoutine holds function pointers used for generating content of
  * table-producer functions, such as XMLTABLE.
  *
- * InitBuilder initialize table builder private objects.  The output tuple
+ * InitOpaque initialize table builder private objects.  The output tuple
  * descriptor, input functions for the columns, and typioparams are passed
  * from executor state.
  *
- * SetDoc is called to define the input document.  The table builder may
+ * SetDocument is called to define the input document.  The table builder may
  * apply additional transformations not exposed outside the table builder
  * context.
  *
@@ -45,7 +45,7 @@ struct TableFuncScanState;
  * builder context such that each subsequent GetValue call returns the values
  * for the indicated column for the row being processed.
  *
- * DestroyBuilder shall release all resources associated with a table builder
+ * DestroyOpaque shall release all resources associated with a table builder
  * context.  It may be called either because all rows have been consumed, or
  * because an error occurred while processing the table expression.
  */
diff --git a/src/include/tsearch/ts_public.h b/src/include/tsearch/ts_public.h
index 465a3616a6..531058499f 100644
--- a/src/include/tsearch/ts_public.h
+++ b/src/include/tsearch/ts_public.h
@@ -118,7 +118,7 @@ typedef struct
 
 /*
  * Struct for supporting complex dictionaries like thesaurus.
- * 4th argument for dictlexize method is a pointer to this
+ * 4th argument for thesaurus_lexize method is a pointer to this
  */
 typedef struct
 {
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
index 20e3b47874..2ec1023626 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -19,7 +19,6 @@ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
 	-I. -I$(srcdir) \
 	-I$(top_srcdir)/src/interfaces/ecpg/ecpglib \
 	-I$(libpq_srcdir) \
-	-DECPG_COMPILE \
 	$(CPPFLAGS)
 
 override CFLAGS += $(PTHREAD_CFLAGS)
diff --git a/src/interfaces/ecpg/preproc/preproc_extern.h b/src/interfaces/ecpg/preproc/preproc_extern.h
index 552ffc627b..7de5cd5087 100644
--- a/src/interfaces/ecpg/preproc/preproc_extern.h
+++ b/src/interfaces/ecpg/preproc/preproc_extern.h
@@ -30,7 +30,6 @@ extern int	braces_open,
 			struct_level,
 			ecpg_internal_var;
 extern char *current_function;
-extern char *descriptor_index;
 extern char *descriptor_name;
 extern char *connection;
 extern char *input_filename;
diff --git a/src/test/regress/regressplans.sh b/src/test/regress/regressplans.sh
index 678ab0a3f2..31e7876daa 100755
--- a/src/test/regress/regressplans.sh
+++ b/src/test/regress/regressplans.sh
@@ -72,7 +72,7 @@ mv -f regression.out planregress/out.in
 mv -f regression.diffs planregress/diffs.in
 PGOPTIONS="$PGOPTIONS      -fi -fn     -fh" $MAKE runtest
 mv -f regression.out planregress/out.inh
-mv -f regression.diffsregression.planregress/inh
+mv -f regression.diffs planregress/diffs.inh
 PGOPTIONS="$PGOPTIONS      -fi -fn -fm    " $MAKE runtest
 mv -f regression.out planregress/out.inm
 mv -f regression.diffs planregress/diffs.inm
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 6f928234ee..d1d0aed07e 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -309,7 +309,6 @@ sub mkvcbuild
 	$ecpg->AddIncludeDir('src/interfaces/libpq');
 	$ecpg->AddPrefixInclude('src/interfaces/ecpg/preproc');
 	$ecpg->AddFiles('src/interfaces/ecpg/preproc', 'pgc.l', 'preproc.y');
-	$ecpg->AddDefine('ECPG_COMPILE');
 	$ecpg->AddReference($libpgcommon, $libpgport);
 
 	my $pgregress_ecpg =

  [text/x-patch] fixes_5.11-20.patch (5.2K, ../../0c991fdf-2670-1997-c027-772a420c4604@gmail.com/3-fixes_5.11-20.patch)
  download | inline diff:
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index 2be0055c3f..4f49c5981a 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -590,7 +590,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
 			v->spl_nright++;
 		}
 	}
-	*left = *right = FirstOffsetNumber; /* sentinel value, see dosplit() */
+	*left = *right = FirstOffsetNumber; /* sentinel value */
 
 	v->spl_ldatum = PointerGetDatum(datum_l);
 	v->spl_rdatum = PointerGetDatum(datum_r);
diff --git a/src/backend/lib/dshash.c b/src/backend/lib/dshash.c
index 24dd372252..350f8c0a66 100644
--- a/src/backend/lib/dshash.c
+++ b/src/backend/lib/dshash.c
@@ -409,7 +409,7 @@ dshash_find(dshash_table *hash_table, const void *key, bool exclusive)
 	}
 	else
 	{
-		/* The caller will free the lock by calling dshash_release. */
+		/* The caller will free the lock by calling dshash_release_lock. */
 		hash_table->find_locked = true;
 		hash_table->find_exclusively_locked = exclusive;
 		return ENTRY_FROM_ITEM(item);
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index 7a1b38466b..57f17e1418 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -1074,7 +1074,7 @@ sendDir(const char *path, int basepathlen, bool sizeonly, List *tablespaces,
 		 * error in that case. The error handler further up will call
 		 * do_pg_abort_backup() for us. Also check that if the backup was
 		 * started while still in recovery, the server wasn't promoted.
-		 * dp_pg_stop_backup() will check that too, but it's better to stop
+		 * do_pg_stop_backup() will check that too, but it's better to stop
 		 * the backup early than continue to the end and fail there.
 		 */
 		CHECK_FOR_INTERRUPTS();
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 391b6d6e16..f5f6a29222 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -361,7 +361,7 @@ DropRelFileNodeLocalBuffers(RelFileNode rnode, ForkNumber forkNum,
  *		This function removes from the buffer pool all pages of all forks
  *		of the specified relation.
  *
- *		See DropRelFileNodeAllBuffers in bufmgr.c for more notes.
+ *		See DropRelFileNodesAllBuffers in bufmgr.c for more notes.
  */
 void
 DropRelFileNodeAllLocalBuffers(RelFileNode rnode)
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c
index 55a9649879..e28859d8e1 100644
--- a/src/backend/utils/adt/tsrank.c
+++ b/src/backend/utils/adt/tsrank.c
@@ -738,7 +738,7 @@ get_docrep(TSVector txt, QueryRepresentation *qr, int *doclen)
 	doc = (DocRepresentation *) palloc(sizeof(DocRepresentation) * len);
 
 	/*
-	 * Iterate through query to make DocRepresentaion for words and it's
+	 * Iterate through query to make DocRepresentation for words and it's
 	 * entries satisfied by query
 	 */
 	for (i = 0; i < qr->query->size; i++)
diff --git a/src/include/port/atomics/generic-acc.h b/src/include/port/atomics/generic-acc.h
index eec5063cbc..a64c841f4f 100644
--- a/src/include/port/atomics/generic-acc.h
+++ b/src/include/port/atomics/generic-acc.h
@@ -68,7 +68,7 @@ pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr,
 	_Asm_mf();
 	/*
 	 * Notes:
-	 * DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler
+	 * _DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler
 	 */
 	current =  _Asm_cmpxchg(_SZ_W, /* word */
 							_SEM_REL,
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index f4841fb397..da6b0c90a0 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -85,7 +85,6 @@
 #define IPC_NOWAIT	2048
 #define IPC_STAT 4096
 
-#define EACCESS 2048
 #ifndef EIDRM
 #define EIDRM 4096
 #endif
diff --git a/src/interfaces/ecpg/compatlib/exports.txt b/src/interfaces/ecpg/compatlib/exports.txt
index e0cfd7a22d..86e9ca1640 100644
--- a/src/interfaces/ecpg/compatlib/exports.txt
+++ b/src/interfaces/ecpg/compatlib/exports.txt
@@ -1,5 +1,5 @@
 # src/interfaces/ecpg/compatlib/exports.txt
-# Functions to be exported by ecpg_compatlib DLL
+# Functions to be exported by libecpg_compat DLL
 ECPG_informix_get_var   1
 ECPG_informix_set_var   2
 decadd                  3
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 3c0294e98a..4394b420a1 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1899,7 +1899,7 @@ ecpg_process_output(struct statement *stmt, bool clear_result)
 
 			/*
 			 * execution should never reach this code because it is already
-			 * handled in ECPGcheck_PQresult()
+			 * handled in ecpg_check_PQresult()
 			 */
 			ecpg_log("ecpg_process_output on line %d: unknown execution status type\n",
 					 stmt->lineno);
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index f1031d2595..e12d703b4e 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -63,8 +63,6 @@ char	   *ECPGprepared_statement(const char *, const char *, int);
 PGconn	   *ECPGget_PGconn(const char *);
 PGTransactionStatusType ECPGtransactionStatus(const char *);
 
-char	   *ECPGerrmsg(void);
-
  /* print an error message */
 void		sqlprint(void);
 

  [text/x-patch] fixes_5.21-30.patch (5.6K, ../../0c991fdf-2670-1997-c027-772a420c4604@gmail.com/4-fixes_5.21-30.patch)
  download | inline diff:
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 09690b6c76..3428a7c0fa 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -11036,7 +11036,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
       <entry><structfield>kinds</structfield></entry>
       <entry><type>text[]</type></entry>
       <entry></entry>
-      <entry>Types of exdended statistics enabled for this record</entry>
+      <entry>Types of extended statistics enabled for this record</entry>
      </row>
 
      <row>
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fad859a812..645a1aad0a 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -367,8 +367,8 @@ static bool SetOffsetVacuumLimit(bool is_startup);
 static bool find_multixact_start(MultiXactId multi, MultiXactOffset *result);
 static void WriteMZeroPageXlogRec(int pageno, uint8 info);
 static void WriteMTruncateXlogRec(Oid oldestMultiDB,
-								  MultiXactId startOff, MultiXactId endOff,
-								  MultiXactOffset startMemb, MultiXactOffset endMemb);
+							MultiXactId startTruncOff, MultiXactId endTruncOff,
+							MultiXactOffset startTruncMemb, MultiXactOffset endTruncMemb);
 
 
 /*
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index a5cb7bba0f..5ee2a464bb 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -1148,7 +1148,7 @@ ExecAllocTableSlot(List **tupleTable, TupleDesc desc,
  *		This releases any resources (buffer pins, tupdesc refcounts)
  *		held by the tuple table, and optionally releases the memory
  *		occupied by the tuple table data structure.
- *		It is expected that this routine be called by EndPlan().
+ *		It is expected that this routine be called by ExecEndPlan().
  * --------------------------------
  */
 void
diff --git a/src/backend/executor/nodeProjectSet.c b/src/backend/executor/nodeProjectSet.c
index 277d278371..39b48cc680 100644
--- a/src/backend/executor/nodeProjectSet.c
+++ b/src/backend/executor/nodeProjectSet.c
@@ -196,7 +196,7 @@ ExecProjectSRF(ProjectSetState *node, bool continuing)
 	Assert(hassrf);
 
 	/*
-	 * If all the SRFs returned EndResult, we consider that as no row being
+	 * If all the SRFs returned ExprEndResult, we consider that as no row being
 	 * produced.
 	 */
 	if (hasresult)
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 2a44b434a5..7247c802d6 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -992,7 +992,7 @@ func_match_argtypes(int nargs,
  * the solution. In addition to requiring the operator operates on the
  * same type for both operands [as in the code Avi originally
  * commented out], we also require that the operators be equivalent in
- * some sense. (see equivalentOpersAfterPromotion for details.)
+ * some sense.
  * - ay 6/95
  */
 FuncCandidateList
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 2fedbc4c15..a4ac7077af 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -4360,7 +4360,7 @@ CheckTargetForConflictsIn(PREDICATELOCKTARGETTAG *targettag)
 	/*
 	 * If we found one of our own SIREAD locks to remove, remove it now.
 	 *
-	 * At this point our transaction already has an ExclusiveRowLock on the
+	 * At this point our transaction already has an RowExclusiveLock on the
 	 * relation, so we are OK to drop the predicate lock on the tuple, if
 	 * found, without fearing that another write against the tuple will occur
 	 * before the MVCC information makes it to the buffer.
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index dffb57bf11..858bcb6bc9 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -112,7 +112,7 @@ extern TableScanDesc heap_beginscan(Relation relation, Snapshot snapshot,
 									ParallelTableScanDesc parallel_scan,
 									uint32 flags);
 extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
-							   BlockNumber endBlk);
+							   BlockNumber numBlks);
 extern void heapgetpage(TableScanDesc scan, BlockNumber page);
 extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params,
 						bool allow_strat, bool allow_sync, bool allow_pagemode);
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 99b9fa414f..98bdcbcef5 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -593,7 +593,7 @@ typedef struct EState
 	 * and with which options.  es_jit is created on-demand when JITing is
 	 * performed.
 	 *
-	 * es_jit_combined_instr is the combined, on demand allocated,
+	 * es_jit_worker_instr is the combined, on demand allocated,
 	 * instrumentation from all workers. The leader's instrumentation is kept
 	 * separate, and is combined on demand by ExplainPrintJITSummary().
 	 */
diff --git a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
index 6cb7ab1a19..de8241bfc8 100644
--- a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
+++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
@@ -195,11 +195,8 @@ char	   *ecpg_strdup(const char *, int);
 const char *ecpg_type_name(enum ECPGttype);
 int			ecpg_dynamic_type(Oid);
 int			sqlda_dynamic_type(Oid, enum COMPAT_MODE);
-void		ecpg_free_auto_mem(void);
 void		ecpg_clear_auto_mem(void);
 
-struct descriptor *ecpggetdescp(int, char *);
-
 struct descriptor *ecpg_find_desc(int line, const char *name);
 
 struct prepared_statement *ecpg_find_prepared_statement(const char *,

  [text/x-patch] fixes_5.31-40.patch (5.5K, ../../0c991fdf-2670-1997-c027-772a420c4604@gmail.com/5-fixes_5.31-40.patch)
  download | inline diff:
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 2797af35c3..291412e305 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -1641,7 +1641,7 @@ expand_all_col_privileges(Oid table_oid, Form_pg_class classForm,
 
 /*
  *	This processes attributes, but expects to be called from
- *	ExecGrant_Relation, not directly from ExecGrantStmt.
+ *	ExecGrant_Relation, not directly from ExecuteGrantStmt.
  */
 static void
 ExecGrant_Attribute(InternalGrant *istmt, Oid relOid, const char *relname,
diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c
index 67c4be5108..c0e4a5376c 100644
--- a/src/backend/executor/execScan.c
+++ b/src/backend/executor/execScan.c
@@ -98,8 +98,7 @@ ExecScanFetch(ScanState *node,
  *		ExecScan
  *
  *		Scans the relation using the 'access method' indicated and
- *		returns the next qualifying tuple in the direction specified
- *		in the global variable ExecDirection.
+ *		returns the next qualifying tuple.
  *		The access method returns the next tuple and ExecScan() is
  *		responsible for checking the tuple returned against the qual-clause.
  *
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index 758b16dd35..99fd777149 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -28,7 +28,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecBitmapHeapScan			scans a relation using bitmap info
- *		ExecBitmapHeapNext			workhorse for above
+ *		BitmapHeapNext				workhorse for above
  *		ExecInitBitmapHeapScan		creates and initializes state info.
  *		ExecReScanBitmapHeapScan	prepares to rescan the plan.
  *		ExecEndBitmapHeapScan		releases all storage.
diff --git a/src/backend/executor/nodeRecursiveunion.c b/src/backend/executor/nodeRecursiveunion.c
index 9c5eed7def..81deb61c21 100644
--- a/src/backend/executor/nodeRecursiveunion.c
+++ b/src/backend/executor/nodeRecursiveunion.c
@@ -160,7 +160,7 @@ ExecRecursiveUnion(PlanState *pstate)
 }
 
 /* ----------------------------------------------------------------
- *		ExecInitRecursiveUnionScan
+ *		ExecInitRecursiveUnion
  * ----------------------------------------------------------------
  */
 RecursiveUnionState *
@@ -263,7 +263,7 @@ ExecInitRecursiveUnion(RecursiveUnion *node, EState *estate, int eflags)
 }
 
 /* ----------------------------------------------------------------
- *		ExecEndRecursiveUnionScan
+ *		ExecEndRecursiveUnion
  *
  *		frees any storage allocated through C routines.
  * ----------------------------------------------------------------
diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c
index 436b43f8ca..debce4eb15 100644
--- a/src/backend/executor/nodeSeqscan.c
+++ b/src/backend/executor/nodeSeqscan.c
@@ -15,7 +15,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecSeqScan				sequentially scans a relation.
- *		ExecSeqNext				retrieve next tuple in sequential order.
+ *		SeqNext					retrieve next tuple in sequential order.
  *		ExecInitSeqScan			creates and initializes a seqscan node.
  *		ExecEndSeqScan			releases any storage allocated.
  *		ExecReScanSeqScan		rescans the relation
diff --git a/src/backend/executor/nodeSubqueryscan.c b/src/backend/executor/nodeSubqueryscan.c
index de8c006051..00c715d4e2 100644
--- a/src/backend/executor/nodeSubqueryscan.c
+++ b/src/backend/executor/nodeSubqueryscan.c
@@ -19,7 +19,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecSubqueryScan			scans a subquery.
- *		ExecSubqueryNext			retrieve next tuple in sequential order.
+ *		SubqueryNext				retrieve next tuple in sequential order.
  *		ExecInitSubqueryScan		creates and initializes a subqueryscan node.
  *		ExecEndSubqueryScan			releases any storage allocated.
  *		ExecReScanSubqueryScan		rescans the relation
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index d056fd6151..1fb28b4596 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -314,7 +314,7 @@ ExecEvalExprSwitchContext(ExprState *state,
  * ExecProject
  *
  * Projects a tuple based on projection info and stores it in the slot passed
- * to ExecBuildProjectInfo().
+ * to ExecBuildProjectionInfo().
  *
  * Note: the result is always a virtual tuple; therefore it may reference
  * the contents of the exprContext's scan tuples and/or temporary results
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 70f8b8e22b..f7a82f2234 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -94,10 +94,6 @@ typedef struct PlannedStmt
 	int			stmt_len;		/* length in bytes; 0 means "rest of string" */
 } PlannedStmt;
 
-/* macro for fetching the Plan associated with a SubPlan node */
-#define exec_subplan_get_plan(plannedstmt, subplan) \
-	((Plan *) list_nth((plannedstmt)->subplans, (subplan)->plan_id - 1))
-
 
 /* ----------------
  *		Plan node
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 08961e2af9..b8f98ce29b 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3294,7 +3294,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
 	 * reference; in particular, this path is always taken in functions with
 	 * one or more OUT parameters.
 	 *
-	 * Unlike exec_statement_return, there's no special win here for R/W
+	 * Unlike exec_stmt_return, there's no special win here for R/W
 	 * expanded values, since they'll have to get flattened to go into the
 	 * tuplestore.  Indeed, we'd better make them R/O to avoid any risk of the
 	 * casting step changing them in-place.

  [text/x-patch] fixes_5.41-48.patch (5.2K, ../../0c991fdf-2670-1997-c027-772a420c4604@gmail.com/6-fixes_5.41-48.patch)
  download | inline diff:
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 97b911679c..05c6ca81b9 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -504,9 +504,9 @@ RangeVarGetCreationNamespace(const RangeVar *newRelation)
  * permission on the target namespace, this function will instead signal
  * an ERROR.
  *
- * If non-NULL, *existing_oid is set to the OID of any existing relation with
- * the same name which already exists in that namespace, or to InvalidOid if
- * no such relation exists.
+ * If non-NULL, *existing_relation_id is set to the OID of any existing relation
+ * with the same name which already exists in that namespace, or to InvalidOid
+ * if no such relation exists.
  *
  * If lockmode != NoLock, the specified lock mode is acquired on the existing
  * relation, if any, provided that the current user owns the target relation.
diff --git a/src/backend/executor/README b/src/backend/executor/README
index 05f197bc75..18b2ac1865 100644
--- a/src/backend/executor/README
+++ b/src/backend/executor/README
@@ -186,9 +186,9 @@ Expression Evaluation
 
 To allow for different methods of expression evaluation, and for
 better branch/jump target prediction, expressions are evaluated by
-calling ExprState->evalfunc (via ExprEvalExpr() and friends).
+calling ExprState->evalfunc (via ExecEvalExpr() and friends).
 
-ExprReadyExpr() can choose the method of interpretation by setting
+ExecReadyExpr() can choose the method of interpretation by setting
 evalfunc to an appropriate function.  The default execution function,
 ExecInterpExpr, is implemented in execExprInterp.c; see its header
 comment for details.  Special-case evalfuncs are used for certain
diff --git a/src/backend/executor/nodeValuesscan.c b/src/backend/executor/nodeValuesscan.c
index 0069a73588..a7bf4a7636 100644
--- a/src/backend/executor/nodeValuesscan.c
+++ b/src/backend/executor/nodeValuesscan.c
@@ -16,7 +16,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecValuesScan			scans a values list.
- *		ExecValuesNext			retrieve next tuple in sequential order.
+ *		ValuesNext			retrieve next tuple in sequential order.
  *		ExecInitValuesScan		creates and initializes a valuesscan node.
  *		ExecEndValuesScan		releases any storage allocated.
  *		ExecReScanValuesScan	rescans the values list
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 64acc3fa43..58c94e9257 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -1163,9 +1163,6 @@ _mdfd_getseg(SMgrRelation reln, ForkNumber forknum, BlockNumber blkno,
 			 * replaying WAL data that has a write into a high-numbered
 			 * segment of a relation that was later deleted. We want to go
 			 * ahead and create the segments so we can finish out the replay.
-			 * However if the caller has specified
-			 * EXTENSION_REALLY_RETURN_NULL, then extension is not desired
-			 * even in recovery; we won't reach this point in that case.
 			 *
 			 * We have to maintain the invariant that segments before the last
 			 * active segment are of size RELSEG_SIZE; therefore, if
diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c
index 9d33c86a3b..401e0c8883 100644
--- a/src/bin/pg_dump/pg_backup_db.c
+++ b/src/bin/pg_dump/pg_backup_db.c
@@ -378,7 +378,7 @@ notice_processor(void *arg, const char *message)
 	pg_log_generic(PG_LOG_INFO, "%s", message);
 }
 
-/* Like exit_fatal(), but with a complaint about a particular query. */
+/* Like fatal(), but with a complaint about a particular query. */
 static void
 die_on_query_failure(ArchiveHandle *AH, const char *query)
 {
diff --git a/src/include/access/timeline.h b/src/include/access/timeline.h
index a6dc2edb89..e83a73a3f1 100644
--- a/src/include/access/timeline.h
+++ b/src/include/access/timeline.h
@@ -36,7 +36,7 @@ extern void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
 								 XLogRecPtr switchpoint, char *reason);
 extern void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size);
 extern void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end);
-extern bool tliInHistory(TimeLineID tli, List *expectedTLIs);
+extern bool tliInHistory(TimeLineID tli, List *expectedTLEs);
 extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
 extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
 								 TimeLineID *nextTLI);
diff --git a/src/include/partitioning/partprune.h b/src/include/partitioning/partprune.h
index 81318c785a..b3e926865a 100644
--- a/src/include/partitioning/partprune.h
+++ b/src/include/partitioning/partprune.h
@@ -60,10 +60,10 @@ typedef struct PartitionPruneContext
 } PartitionPruneContext;
 
 /*
- * PruneCxtStateIdx() computes the correct index into the stepcmpfuncs[],
- * exprstates[] and exprhasexecparam[] arrays for step step_id and
- * partition key column keyno.  (Note: there is code that assumes the
- * entries for a given step are sequential, so this is not chosen freely.)
+ * PruneCxtStateIdx() computes the correct index into the stepcmpfuncs[]
+ * and exprstates[] arrays for step step_id and partition key column keyno.
+ * (Note: there is code that assumes the entries for a given step are
+ * sequential, so this is not chosen freely.)
  */
 #define PruneCxtStateIdx(partnatts, step_id, keyno) \
 	((partnatts) * (step_id) + (keyno))

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 5)
  2019-07-07 05:03 Fix typos and inconsistencies for HEAD (take 5) Alexander Lakhin <exclusion@gmail.com>
@ 2019-07-08 04:14 ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-07-08 04:14 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Sun, Jul 07, 2019 at 08:03:01AM +0300, Alexander Lakhin wrote:
> 5.8. dictlexize -> thesaurus_lexize

There could be other dictionaries.

> 5.9. regression.diffsregression.planregress/inh -> regression.diffs
> planregress/diffs.inh

I am wondering if we should not just nuke that...  For now I have
included your change as the mistake is obvious, but I am starting a
new thread.  The history around this script does not play in favor of
it:
commit: 2fc80e8e8304913c8dd1090bb2976632c0f4a8c3
author: Bruce Momjian <bruce@momjian.us>
date: Wed, 12 Feb 2014 17:29:19 -0500
Rename 'gmake' to 'make' in docs and recommended commands

This simplifies the docs and makes it easier to cut/paste command
lines.

commit: c77e2e42fb4cf5c90a7562b9df289165ff164df1
author: Tom Lane <tgl@sss.pgh.pa.us>
date: Mon, 18 Dec 2000 02:45:47 +0000
Tweak regressplans.sh to use any already-set PGOPTIONS.

And looking closer it seems that there are other issues linked to
it...

> 5.27. equivalentOpersAfterPromotion -> remove (irrelevant since
> 8536c962, but the whole comments is too old to be informational too)

It seems to me that this could be much more reworked.  So discarded
for now.

> 5.29. ExclusiveRowLock -> RowExclusiveLock

Grammar mistake here.

> 5.31. ExecBitmapHeapNext -> BitmapHeapNext

Well, BitmapHeapRecheck is not listed in the interface routines
either..  

> 5.37. ExecSeqNext -> SeqNext
> 5.40. ExecSubqueryNext -> SubqueryNext
> 5.41. ExecValuesNext -> ValuesNext

Here as well these sets are incomplete.  Instead for those series I'd
like to think that it would be better to do a larger cleanup and just
remove all these in the executor "INTERFACE ROUTINES".  Your proposed
patches don't make things better either, as the interfaces are listed
in alphabetical order.

> 5.39. exec_subplan_get_plan -> remove (not used since 1cc29fe7)

This could be used by extensions.  So let's not remove it.

And committed most of the rest.  Thanks.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190708041405.GA2709@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Fix typos and inconsistencies for HEAD (take 6)
@ 2019-07-14 05:24 Alexander Lakhin <exclusion@gmail.com>
  2019-07-16 04:24 ` Re: Fix typos and inconsistencies for HEAD (take 6) Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-07-14 05:24 UTC (permalink / raw)
  To: pgsql-hackers; +Cc: Michael Paquier <michael@paquier.xyz>

Hello hackers,

Please consider fixing the next batch of typos and inconsistencies in
the tree:
6.1. FADVISE_WILLNEED -> POSIX_FADV_WILLNEED
6.2. failOK -> missing_ok
6.3. failOnerror -> failOnSignal
6.4. fakebits -> remove (irrelevant since introduction in 945543d9)
6.5. FastPathGetLockEntry -> FastPathGetRelationLockEntry
6.6. FAST_PATH_HASH_BUCKETS -> FAST_PATH_STRONG_LOCK_HASH_PARTITIONS
6.7. FastPathTransferLocks -> FastPathTransferRelationLocks
6.8. GenericOptionFlags -> remove (unused since 090173a3)
6.9. fetch_data -> fetched_data
6.10. fildes -> fd
6.11. filedescriptors -> file descriptors
6.12. fillatt -> remove (orphaned since 8609d4ab)
6.13. finalfunction -> finalfn
6.14. flail -> fail
6.15. FlushBuffers -> FlushBuffer & rephrase a comment (incorrectly
updated in 6f5c38dc)
6.16. flush_context -> wb_context
6.17. followon -> follow-on
6.18. force_quotes -> remove (orphaned since e18d900d)
6.19. formatstring -> format-string
6.20. formarray, formfloat -> remove (orphaned since a237dd2b)
6.21. found_row_type -> found_whole_row
6.22. freeScanStack -> remove a comment (irrelevant since 2a636834)
6.23. free_segment_counter -> freed_segment_counter
6.24. FreeSpace Map -> FreeSpaceMap
6.25. user friendly-operand -> user-friendly operand
6.26. frozenids -> frozenxids
6.27. fsm_internal.h -> fsm_internals.h
6.28. fsm_size_to_avail_cat -> fsm_space_avail_to_cat
6.29. full_result -> full_results
6.30. FULL_SIZ -> remove (orphaned since 65b731bd)
6.31. funxtions -> functions
6.32. generate_nonunion_plan, generate_union_plan ->
generate_nonunion_paths, generate_union_paths
6.33. getaddinfo -> getaddrinfo
6.34. get_expr, get_indexdef, get_ruledef, get_viewdef, get_triggerdef,
get_userbyid -> pg_get_*
6.35. GetHashPageStatis -> GetHashPageStats
6.36. GetNumShmemAttachedBgworkers -> remove (orphaned since 6bc8ef0b)
6.37. get_one_range_partition_bound_string -> get_range_partbound_string
6.38. getPartitions -> remove a comment (irrelevant since 44c52881)
6.39. GetRecordedFreePage -> GetRecordedFreeSpace
6.40. get_special_varno -> resolve_special_varno
6.41. gig -> GB
6.42. GinITupIsCompressed -> GinItupIsCompressed
6.43. GinPostingListSegmentMaxSize-bytes -> GinPostingListSegmentMaxSize
bytes
6.44. gistfindCorrectParent -> gistFindCorrectParent
6.45. gistinserthere -> gistinserttuple
6.46. GISTstate -> giststate
6.47. GlobalSerializableXmin, SerializableGlobalXmin -> SxactGlobalXmin
6.48. Greenwish -> Greenwich
6.49. groupClauseVars -> groupClauseCommonVars

As a side note, while looking at dt_common.c (fixing 6.47), I've got a
feeling that the datetktbl is largely outdated and thus mostly unuseful
(e.g. USSR doesn't exist for almost 30 years).

Best regards,
Alexander

Attachments:

  [text/x-patch] fixes_6.1-10.patch (5.7K, ../../10bfd4ac-3e7c-40ab-2b2e-355ed15495e8@gmail.com/2-fixes_6.1-10.patch)
  download | inline diff:
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 763b8cf7fd..c95776eb75 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -921,7 +921,7 @@ my_fetch(PG_FUNCTION_ARGS)
      * Convert 'fetched_data' into the a Datum of the original datatype.
      */
 
-    /* fill *retval from fetch_data. */
+    /* fill *retval from fetched_data. */
     gistentryinit(*retval, PointerGetDatum(converted_datum),
                   entry->rel, entry->page, entry->offset, FALSE);
 
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 47db7a8a88..d78f706ff7 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -155,7 +155,7 @@ static void TransactionIdSetPageStatusInternal(TransactionId xid, int nsubxids,
  * NB: this is a low-level routine and is NOT the preferred entry point
  * for most uses; functions in transam.c are the intended callers.
  *
- * XXX Think about issuing FADVISE_WILLNEED on pages that we will need,
+ * XXX Think about issuing POSIX_FADV_WILLNEED on pages that we will need,
  * but aren't yet in cache, as well as hinting pages not to fall out of
  * cache yet.
  */
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 05c6ca81b9..0aa12e8dde 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -2399,7 +2399,7 @@ TSParserIsVisible(Oid prsId)
 /*
  * get_ts_dict_oid - find a TS dictionary by possibly qualified name
  *
- * If not found, returns InvalidOid if failOK, else throws error
+ * If not found, returns InvalidOid if missing_ok, else throws error
  */
 Oid
 get_ts_dict_oid(List *names, bool missing_ok)
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 6745a2432e..e2bed96b9b 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -216,9 +216,9 @@ static PROCLOCK *FastPathGetRelationLockEntry(LOCALLOCK *locallock);
 
 /*
  * To make the fast-path lock mechanism work, we must have some way of
- * preventing the use of the fast-path when a conflicting lock might be
- * present.  We partition* the locktag space into FAST_PATH_HASH_BUCKETS
- * partitions, and maintain an integer count of the number of "strong" lockers
+ * preventing the use of the fast-path when a conflicting lock might be present.
+ * We partition* the locktag space into FAST_PATH_STRONG_LOCK_HASH_PARTITIONS,
+ * and maintain an integer count of the number of "strong" lockers
  * in each partition.  When any "strong" lockers are present (which is
  * hopefully not very often), the fast-path mechanism can't be used, and we
  * must fall back to the slower method of pushing matching locks directly
@@ -2709,7 +2709,7 @@ FastPathTransferRelationLocks(LockMethod lockMethodTable, const LOCKTAG *locktag
 }
 
 /*
- * FastPathGetLockEntry
+ * FastPathGetRelationLockEntry
  *		Return the PROCLOCK for a lock originally taken via the fast-path,
  *		transferring it to the primary lock table if necessary.
  *
@@ -2896,8 +2896,8 @@ GetLockConflicts(const LOCKTAG *locktag, LOCKMODE lockmode, int *countp)
 			 * the lock, then we needn't examine the individual relation IDs
 			 * at all; none of them can be relevant.
 			 *
-			 * See FastPathTransferLocks() for discussion of why we do this
-			 * test after acquiring the lock.
+			 * See FastPathTransferRelationLocks() for discussion of why we
+			 * do this test after acquiring the lock.
 			 */
 			if (proc->databaseId != locktag->locktag_field1)
 			{
diff --git a/src/backend/utils/adt/inet_cidr_ntop.c b/src/backend/utils/adt/inet_cidr_ntop.c
index 5fdc3ca251..3000b1735d 100644
--- a/src/backend/utils/adt/inet_cidr_ntop.c
+++ b/src/backend/utils/adt/inet_cidr_ntop.c
@@ -146,7 +146,7 @@ emsgsize:
 
 /*
  * static char *
- * inet_cidr_ntop_ipv6(src, bits, fakebits, dst, size)
+ * inet_cidr_ntop_ipv6(src, bits, dst, size)
  *	convert IPv6 network number from network to presentation format.
  *	generates CIDR style result always. Picks the shortest representation
  *	unless the IP is really IPv4.
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 3cc9c3d669..b986a38575 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -323,7 +323,7 @@ extern bool RestoreArchivedFile(char *path, const char *xlogfname,
 								const char *recovername, off_t expectedSize,
 								bool cleanupEnabled);
 extern void ExecuteRecoveryCommand(const char *command, const char *commandName,
-								   bool failOnerror);
+								   bool failOnSignal);
 extern void KeepFileRestoredFromArchive(const char *path, const char *xlogfname);
 extern void XLogArchiveNotify(const char *xlog);
 extern void XLogArchiveNotifySeg(XLogSegNo segno);
diff --git a/src/include/c.h b/src/include/c.h
index 2a082afab1..7b203c12e1 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -1186,7 +1186,7 @@ typedef union PGAlignedXLogBlock
  */
 
 #if defined(HAVE_FDATASYNC) && !HAVE_DECL_FDATASYNC
-extern int	fdatasync(int fildes);
+extern int	fdatasync(int fd);
 #endif
 
 #ifdef HAVE_LONG_LONG_INT
diff --git a/src/include/foreign/foreign.h b/src/include/foreign/foreign.h
index 46759e3596..4de157c19c 100644
--- a/src/include/foreign/foreign.h
+++ b/src/include/foreign/foreign.h
@@ -21,17 +21,6 @@
 	(OidIsValid(userid) ? GetUserNameFromId(userid, false) : "public")
 
 
-/*
- * Generic option types for validation.
- * NB! These are treated as flags, so use only powers of two here.
- */
-typedef enum
-{
-	ServerOpt = 1,				/* options applicable to SERVER */
-	UserMappingOpt = 2,			/* options for USER MAPPING */
-	FdwOpt = 4					/* options for FOREIGN DATA WRAPPER */
-} GenericOptionFlags;
-
 typedef struct ForeignDataWrapper
 {
 	Oid			fdwid;			/* FDW Oid */

  [text/x-patch] fixes_6.11-20.patch (5.7K, ../../10bfd4ac-3e7c-40ab-2b2e-355ed15495e8@gmail.com/3-fixes_6.11-20.patch)
  download | inline diff:
diff --git a/contrib/intarray/_int.h b/contrib/intarray/_int.h
index b689eb7ded..f03fdf9add 100644
--- a/contrib/intarray/_int.h
+++ b/contrib/intarray/_int.h
@@ -85,12 +85,6 @@ typedef struct
 
 #define GETSIGN(x)		( (BITVECP)( (char*)x+GTHDRSIZE ) )
 
-/*
- * types for functions
- */
-typedef ArrayType *(*formarray) (ArrayType *, ArrayType *);
-typedef void (*formfloat) (ArrayType *, float *);
-
 /*
  * useful functions
  */
diff --git a/src/backend/access/nbtree/README b/src/backend/access/nbtree/README
index c5b0a30e4e..3d01b7854d 100644
--- a/src/backend/access/nbtree/README
+++ b/src/backend/access/nbtree/README
@@ -457,7 +457,7 @@ right sibling's left-link --- followed by a second WAL entry for the
 insertion on the parent level (which might itself be a page split, requiring
 an additional insertion above that, etc).
 
-For a root split, the followon WAL entry is a "new root" entry rather than
+For a root split, the follow-on WAL entry is a "new root" entry rather than
 an "insertion" entry, but details are otherwise much the same.
 
 Because splitting involves multiple atomic actions, it's possible that the
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 43627ab8f4..9238fbe98d 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -716,7 +716,7 @@ DefineAttr(char *name, char *type, int attnum, int nullness)
 
 	namestrcpy(&attrtypes[attnum]->attname, name);
 	elog(DEBUG4, "column %s %s", NameStr(attrtypes[attnum]->attname), type);
-	attrtypes[attnum]->attnum = attnum + 1; /* fillatt */
+	attrtypes[attnum]->attnum = attnum + 1;
 
 	typeoid = gettype(type);
 
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 6b8ef40599..cb4ab4b21e 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -882,7 +882,7 @@ process_ordered_aggregate_multi(AggState *aggstate,
  * This function handles only one grouping set (already set in
  * aggstate->current_set).
  *
- * The finalfunction will be run, and the result delivered, in the
+ * The finalfn will be run, and the result delivered, in the
  * output-tuple context; caller's CurrentMemoryContext does not matter.
  *
  * The finalfn uses the state as set in the transno. This also might be
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 7332e6b590..65c53e18fa 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -438,7 +438,7 @@ static void PinBuffer_Locked(BufferDesc *buf);
 static void UnpinBuffer(BufferDesc *buf, bool fixOwner);
 static void BufferSync(int flags);
 static uint32 WaitBufHdrUnlocked(BufferDesc *buf);
-static int	SyncOneBuffer(int buf_id, bool skip_recently_used, WritebackContext *flush_context);
+static int	SyncOneBuffer(int buf_id, bool skip_recently_used, WritebackContext *wb_context);
 static void WaitIO(BufferDesc *buf);
 static bool StartBufferIO(BufferDesc *buf, bool forInput);
 static void TerminateBufferIO(BufferDesc *buf, bool clear_dirty,
@@ -2346,7 +2346,7 @@ BgBufferSync(WritebackContext *wb_context)
  *	BUF_REUSABLE: buffer is available for replacement, ie, it has
  *		pin count 0 and usage count 0.
  *
- * (BUF_WRITTEN could be set in error if FlushBuffers finds the buffer clean
+ * (BUF_WRITTEN could be set if FlushBuffer finds the buffer clean
  * after locking it, but we don't care all that much.)
  *
  * Note: caller must have done ResourceOwnerEnlargeBuffers.
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 7b49802b4e..315c74c745 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -897,7 +897,7 @@ count_usable_fds(int max_to_probe, int *usable_fds, int *already_open)
 
 /*
  * set_max_safe_fds
- *		Determine number of filedescriptors that fd.c is allowed to use
+ *		Determine number of file descriptors that fd.c is allowed to use
  */
 void
 set_max_safe_fds(void)
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 565c3ac439..0e2bfc9f83 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -4820,7 +4820,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader,
  *
  * If a dangerous structure is found, the pivot (the near conflict) is
  * marked for death, because rolling back another transaction might mean
- * that we flail without ever making progress.  This transaction is
+ * that we fail without ever making progress.  This transaction is
  * committing writes, so letting it commit ensures progress.  If we
  * canceled the far conflict, it might immediately fail again on retry.
  */
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index c3c2ea1473..ccf2153fac 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -637,9 +637,6 @@ typedef struct _extensionMemberId
 	ExtensionInfo *ext;			/* owning extension */
 } ExtensionMemberId;
 
-/* global decls */
-extern bool force_quotes;		/* double-quotes for identifiers flag */
-
 /* placeholders for comment starting and ending delimiters */
 extern char g_comment_start[10];
 extern char g_comment_end[10];
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 13058cf7bf..8fc0a467f7 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -811,7 +811,7 @@ rfmtlong(long lng_val, const char *fmt, char *outbuf)
 	/* and fill the temp-string wit '0's up to there. */
 	dotpos = getRightMostDot(fmt);
 
-	/* start to parse the formatstring */
+	/* start to parse the format-string */
 	temp[0] = '\0';
 	k = value.digits - 1;		/* position in the value_string */
 	for (i = fmt_len - 1, j = 0; i >= 0; i--, j++)

  [text/x-patch] fixes_6.21-30.patch (5.5K, ../../10bfd4ac-3e7c-40ab-2b2e-355ed15495e8@gmail.com/4-fixes_6.21-30.patch)
  download | inline diff:
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index 56bf39d145..b576676746 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -368,7 +368,7 @@ queryin(char *buf)
 		state.str = tmp;
 	}
 
-	/* set user friendly-operand view */
+	/* set user-friendly operand view */
 	memcpy((void *) GETOPERAND(query), (void *) state.op, state.sumlen);
 	pfree(state.op);
 
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index 2b3dd1c677..439a91b3e6 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -1013,7 +1013,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
 
 	/*
 	 * As pending list pages can have a high churn rate, it is desirable to
-	 * recycle them immediately to the FreeSpace Map when ordinary backends
+	 * recycle them immediately to the FreeSpaceMap when ordinary backends
 	 * clean the list.
 	 */
 	if (fsm_vac && fill_fsm)
diff --git a/src/backend/access/spgist/spgscan.c b/src/backend/access/spgist/spgscan.c
index 7bc5ec09bf..557dd18d7e 100644
--- a/src/backend/access/spgist/spgscan.c
+++ b/src/backend/access/spgist/spgscan.c
@@ -146,11 +146,6 @@ resetSpGistScanOpaque(SpGistScanOpaque so)
 {
 	MemoryContext oldCtx;
 
-	/*
-	 * clear traversal context before proceeding to the next scan; this must
-	 * not happen before the freeScanStack above, else we get double-free
-	 * crashes.
-	 */
 	MemoryContextReset(so->traversalCxt);
 
 	oldCtx = MemoryContextSwitchTo(so->traversalCxt);
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c
index 6189a06853..93508c2a87 100644
--- a/src/backend/rewrite/rewriteManip.c
+++ b/src/backend/rewrite/rewriteManip.c
@@ -1208,7 +1208,7 @@ replace_rte_variables_mutator(Node *node,
  * a ConvertRowtypeExpr to map back to the rowtype expected by the expression.
  * (Therefore, to_rowtype had better be a child rowtype of the rowtype of the
  * RTE we're changing references to.)  Callers that don't provide to_rowtype
- * should report an error if *found_row_type is true; we don't do that here
+ * should report an error if *found_whole_row is true; we don't do that here
  * because we don't know exactly what wording for the error message would
  * be most appropriate.  The caller will be aware of the context.
  *
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index c17b3f49dd..dcc59f475a 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -417,7 +417,7 @@ fsm_space_cat_to_avail(uint8 cat)
 
 /*
  * Which category does a page need to have, to accommodate x bytes of data?
- * While fsm_size_to_avail_cat() rounds down, this needs to round up.
+ * While fsm_space_avail_to_cat() rounds down, this needs to round up.
  */
 static uint8
 fsm_space_needed_to_cat(Size needed)
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 206576d4bd..b3115e4bea 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -282,8 +282,6 @@ static const char *const numth[] = {"st", "nd", "rd", "th", NULL};
 #define ALL_UPPER		2		/* NAME */
 #define ALL_LOWER		3		/* name */
 
-#define FULL_SIZ		0
-
 #define MAX_MONTH_LEN	9
 #define MAX_MON_LEN		3
 #define MAX_DAY_LEN		9
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
index 900cd8357c..42573846d5 100644
--- a/src/backend/utils/mmgr/dsa.c
+++ b/src/backend/utils/mmgr/dsa.c
@@ -2235,7 +2235,7 @@ check_for_freed_segments(dsa_area *area)
 
 	/*
 	 * Any other process that has freed a segment has incremented
-	 * free_segment_counter while holding an LWLock, and that must precede any
+	 * freed_segment_counter while holding an LWLock, and that must precede any
 	 * backend creating a new segment in the same slot while holding an
 	 * LWLock, and that must precede the creation of any dsa_pointer pointing
 	 * into the new segment which might reach us here, and the caller must
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index ff78929707..d1975aab2b 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -264,7 +264,7 @@ prepare_new_cluster(void)
 {
 	/*
 	 * It would make more sense to freeze after loading the schema, but that
-	 * would cause us to lose the frozenids restored by the load. We use
+	 * would cause us to lose the frozenxids restored by the load. We use
 	 * --analyze so autovacuum doesn't update statistics later
 	 */
 	prep_status("Analyzing all rows in the new cluster");
diff --git a/src/include/storage/fsm_internals.h b/src/include/storage/fsm_internals.h
index 0e27db07f2..0ec5a7966f 100644
--- a/src/include/storage/fsm_internals.h
+++ b/src/include/storage/fsm_internals.h
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * fsm_internal.h
+ * fsm_internals.h
  *	  internal functions for free space map
  *
  *
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index d2a9828dc6..6195c21c59 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -430,7 +430,7 @@ sub command_exit_is
 	# header file). IPC::Run's result function always returns exit code >> 8,
 	# assuming the Unix convention, which will always return 0 on Windows as
 	# long as the process was not terminated by an exception. To work around
-	# that, use $h->full_result on Windows instead.
+	# that, use $h->full_results on Windows instead.
 	my $result =
 	    ($Config{osname} eq "MSWin32")
 	  ? ($h->full_results)[0]

  [text/x-patch] fixes_6.31-40.patch (6.5K, ../../10bfd4ac-3e7c-40ab-2b2e-355ed15495e8@gmail.com/5-fixes_6.31-40.patch)
  download | inline diff:
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index 4f49c5981a..b720366876 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -100,7 +100,7 @@ bool		g_cube_leaf_consistent(NDBOX *key, NDBOX *query, StrategyNumber strategy);
 bool		g_cube_internal_consistent(NDBOX *key, NDBOX *query, StrategyNumber strategy);
 
 /*
-** Auxiliary funxtions
+** Auxiliary functions
 */
 static double distance_1D(double a1, double a2, double b1, double b2);
 static bool cube_is_point_internal(NDBOX *cube);
diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c
index 2c80753726..4bae176e09 100644
--- a/contrib/pgstattuple/pgstatindex.c
+++ b/contrib/pgstattuple/pgstatindex.c
@@ -727,7 +727,7 @@ pgstathashindex(PG_FUNCTION_ARGS)
 }
 
 /* -------------------------------------------------
- * GetHashPageStatis()
+ * GetHashPageStats()
  *
  * Collect statistics of single hash page
  * -------------------------------------------------
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index cd9d49c1f7..fbde68d5b8 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -362,8 +362,8 @@ recurse_set_operations(Node *setOp, PlannerInfo *root,
 		 * fix_upper_expr() to the Result node's tlist. This would fail if the
 		 * Vars generated by generate_setop_tlist() were not exactly equal()
 		 * to the corresponding tlist entries of the subplan. However, since
-		 * the subplan was generated by generate_union_plan() or
-		 * generate_nonunion_plan(), and hence its tlist was generated by
+		 * the subplan was generated by generate_union_paths() or
+		 * generate_nonunion_paths(), and hence its tlist was generated by
 		 * generate_append_tlist(), this will work.  We just tell
 		 * generate_setop_tlist() to use varno 0.
 		 */
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index c17b3f49dd..fc6953c445 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -223,7 +223,7 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 }
 
 /*
- * GetRecordedFreePage - return the amount of free space on a particular page,
+ * GetRecordedFreeSpace - return the amount of free space on a particular page,
  *		according to the FSM.
  */
 Size
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 71adf700fc..bd6eb37ec7 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -474,7 +474,7 @@ static char *flatten_reloptions(Oid relid);
 
 
 /* ----------
- * get_ruledef			- Do it all and return a text
+ * pg_get_ruledef		- Do it all and return a text
  *				  that could be used as a statement
  *				  to recreate the rule
  * ----------
@@ -594,7 +594,7 @@ pg_get_ruledef_worker(Oid ruleoid, int prettyFlags)
 
 
 /* ----------
- * get_viewdef			- Mainly the same thing, but we
+ * pg_get_viewdef		- Mainly the same thing, but we
  *				  only return the SELECT part of a view
  * ----------
  */
@@ -789,7 +789,7 @@ pg_get_viewdef_worker(Oid viewoid, int prettyFlags, int wrapColumn)
 }
 
 /* ----------
- * get_triggerdef			- Get the definition of a trigger
+ * pg_get_triggerdef		- Get the definition of a trigger
  * ----------
  */
 Datum
@@ -1083,7 +1083,7 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
 }
 
 /* ----------
- * get_indexdef			- Get the definition of an index
+ * pg_get_indexdef			- Get the definition of an index
  *
  * In the extended version, there is a colno argument as well as pretty bool.
  *	if colno == 0, we want a complete index definition.
@@ -2342,7 +2342,7 @@ decompile_column_index_array(Datum column_index_array, Oid relId,
 
 
 /* ----------
- * get_expr			- Decompile an expression tree
+ * pg_get_expr			- Decompile an expression tree
  *
  * Input: an expression tree in nodeToString form, and a relation OID
  *
@@ -2440,7 +2440,7 @@ pg_get_expr_worker(text *expr, Oid relid, const char *relname, int prettyFlags)
 
 
 /* ----------
- * get_userbyid			- Get a user name by roleid and
+ * pg_get_userbyid		- Get a user name by roleid and
  *				  fallback to 'unknown (OID=n)'
  * ----------
  */
@@ -6813,8 +6813,8 @@ get_variable(Var *var, int levelsup, bool istoplevel, deparse_context *context)
 
 /*
  * Deparse a Var which references OUTER_VAR, INNER_VAR, or INDEX_VAR.  This
- * routine is actually a callback for get_special_varno, which handles finding
- * the correct TargetEntry.  We get the expression contained in that
+ * routine is actually a callback for resolve_special_varno, which handles
+ * finding the correct TargetEntry.  We get the expression contained in that
  * TargetEntry and just need to deparse it, a job we can throw back on
  * get_rule_expr.
  */
@@ -11256,7 +11256,7 @@ flatten_reloptions(Oid relid)
 }
 
 /*
- * get_one_range_partition_bound_string
+ * get_range_partbound_string
  *		A C string representation of one range partition bound
  */
 char *
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 806fc78f04..bbf44a1820 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -6772,9 +6772,7 @@ getInherits(Archive *fout, int *numInherits)
 
 	/*
 	 * Find all the inheritance information, excluding implicit inheritance
-	 * via partitioning.  We handle that case using getPartitions(), because
-	 * we want more information about partitions than just the parent-child
-	 * relationship.
+	 * via partitioning.
 	 */
 	appendPQExpBufferStr(query, "SELECT inhrelid, inhparent FROM pg_inherits");
 
diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h
index 8ccd2afce5..b692d8be11 100644
--- a/src/include/postmaster/postmaster.h
+++ b/src/include/postmaster/postmaster.h
@@ -52,7 +52,6 @@ extern void InitProcessGlobals(void);
 
 extern int	MaxLivePostmasterChildren(void);
 
-extern int	GetNumShmemAttachedBgworkers(void);
 extern bool PostmasterMarkPIDForWorkerNotify(int);
 
 #ifdef EXEC_BACKEND
diff --git a/src/port/thread.c b/src/port/thread.c
index 47995ad060..046f300d07 100644
--- a/src/port/thread.c
+++ b/src/port/thread.c
@@ -83,7 +83,7 @@ pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
 /*
  * Wrapper around gethostbyname() or gethostbyname_r() to mimic
  * POSIX gethostbyname_r() behaviour, if it is not available or required.
- * This function is called _only_ by our getaddinfo() portability function.
+ * This function is called _only_ by our getaddrinfo() portability function.
  */
 #ifndef HAVE_GETADDRINFO
 int

  [text/x-patch] fixes_6.41-49.patch (5.9K, ../../10bfd4ac-3e7c-40ab-2b2e-355ed15495e8@gmail.com/6-fixes_6.41-49.patch)
  download | inline diff:
diff --git a/src/backend/access/gin/README b/src/backend/access/gin/README
index 30c0867829..838fdc0d63 100644
--- a/src/backend/access/gin/README
+++ b/src/backend/access/gin/README
@@ -163,7 +163,7 @@ algorithms.
 
 * The posting list can be accessed with GinGetPosting(itup)
 
-* If GinITupIsCompressed(itup), the posting list is stored in compressed
+* If GinItupIsCompressed(itup), the posting list is stored in compressed
   format. Otherwise it is just an array of ItemPointers. New tuples are always
   stored in compressed format, uncompressed items can be present if the
   database was migrated from 9.3 or earlier version.
diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c
index 57c3b830d8..ec26016a67 100644
--- a/src/backend/access/gin/gindatapage.c
+++ b/src/backend/access/gin/gindatapage.c
@@ -36,7 +36,7 @@
 #define GinPostingListSegmentMinSize 128
 
 /*
- * At least this many items fit in a GinPostingListSegmentMaxSize-bytes
+ * At least this many items fit in a GinPostingListSegmentMaxSize bytes
  * long segment. This is used when estimating how much space is required
  * for N items, at minimum.
  */
diff --git a/src/backend/access/gist/README b/src/backend/access/gist/README
index 84a4961d0c..8cbca69296 100644
--- a/src/backend/access/gist/README
+++ b/src/backend/access/gist/README
@@ -170,7 +170,7 @@ it splits the page, and constructs the new downlink tuples for the split
 pages. The caller must then call gistplacetopage() on the parent page to
 insert the downlink tuples. The parent page that holds the downlink to
 the child might have migrated as a result of concurrent splits of the
-parent, gistfindCorrectParent() is used to find the parent page.
+parent, gistFindCorrectParent() is used to find the parent page.
 
 Splitting the root page works slightly differently. At root split,
 gistplacetopage() allocates the new child pages and replaces the old root
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 470b121e7d..dfb51f609d 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -821,7 +821,7 @@ gistdoinsert(Relation r, IndexTuple itup, Size freespace,
 			/*
 			 * Leaf page. Insert the new key. We've already updated all the
 			 * parents on the way down, but we might have to split the page if
-			 * it doesn't fit. gistinserthere() will take care of that.
+			 * it doesn't fit. gistinserttuple() will take care of that.
 			 */
 
 			/*
diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c
index d50410d23a..dba6dec2cc 100644
--- a/src/backend/parser/parse_agg.c
+++ b/src/backend/parser/parse_agg.c
@@ -58,7 +58,7 @@ static int	check_agg_arguments(ParseState *pstate,
 static bool check_agg_arguments_walker(Node *node,
 									   check_agg_arguments_context *context);
 static void check_ungrouped_columns(Node *node, ParseState *pstate, Query *qry,
-									List *groupClauses, List *groupClauseVars,
+									List *groupClauses, List *groupClauseCommonVars,
 									bool have_non_var_grouping,
 									List **func_grouped_rels);
 static bool check_ungrouped_columns_walker(Node *node,
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c
index b773a76049..b40e6f3fde 100644
--- a/src/backend/storage/file/buffile.c
+++ b/src/backend/storage/file/buffile.c
@@ -664,7 +664,7 @@ BufFileSeek(BufFile *file, int fileno, off_t offset, int whence)
 
 			/*
 			 * Relative seek considers only the signed offset, ignoring
-			 * fileno. Note that large offsets (> 1 gig) risk overflow in this
+			 * fileno. Note that large offsets (> 1 GB) risk overflow in this
 			 * add, unless we have 64-bit off_t.
 			 */
 			newFile = file->curFile;
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 565c3ac439..7b6aa6c0be 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -3405,7 +3405,7 @@ ReleasePredicateLocks(bool isCommit, bool isReadOnlySafe)
 	 *
 	 * If this value is changing, we don't care that much whether we get the
 	 * old or new value -- it is just used to determine how far
-	 * GlobalSerializableXmin must advance before this transaction can be
+	 * SxactGlobalXmin must advance before this transaction can be
 	 * fully cleaned up.  The worst that could happen is we wait for one more
 	 * transaction to complete before freeing some RAM; correctness of visible
 	 * behavior is not affected.
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index f80694bf9a..9e3958398e 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -400,7 +400,7 @@ extern void freeGISTstate(GISTSTATE *giststate);
 extern void gistdoinsert(Relation r,
 						 IndexTuple itup,
 						 Size freespace,
-						 GISTSTATE *GISTstate,
+						 GISTSTATE *giststate,
 						 Relation heapRel,
 						 bool is_build);
 
diff --git a/src/include/storage/predicate_internals.h b/src/include/storage/predicate_internals.h
index de7a846cf3..a1b981302d 100644
--- a/src/include/storage/predicate_internals.h
+++ b/src/include/storage/predicate_internals.h
@@ -52,7 +52,7 @@ typedef uint64 SerCommitSeqNo;
  *
  * Eligibility for cleanup of committed transactions is generally determined
  * by comparing the transaction's finishedBefore field to
- * SerializableGlobalXmin.
+ * SxactGlobalXmin.
  */
 typedef struct SERIALIZABLEXACT
 {
diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c
index 4c2828db84..e71defaa66 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt_common.c
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -172,7 +172,7 @@ static const datetkn datetktbl[] = {
 	ghst
 #endif
 	{"gilt", TZ, 43200},		/* Gilbert Islands Time */
-	{"gmt", TZ, 0},				/* Greenwish Mean Time */
+	{"gmt", TZ, 0},				/* Greenwich Mean Time */
 	{"gst", TZ, 36000},			/* Guam Std Time, USSR Zone 9 */
 	{"gyt", TZ, -14400},		/* Guyana Time */
 	{"h", UNITS, DTK_HOUR},		/* "hour" */

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 6)
  2019-07-14 05:24 Fix typos and inconsistencies for HEAD (take 6) Alexander Lakhin <exclusion@gmail.com>
@ 2019-07-16 04:24 ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-07-16 04:24 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Sun, Jul 14, 2019 at 08:24:01AM +0300, Alexander Lakhin wrote:
> 6.10. fildes -> fd

Not sure that this one was worth bothering.

And the rest looks correct after review, so applied!  Thanks!

> As a side note, while looking at dt_common.c (fixing 6.47), I've got a
> feeling that the datetktbl is largely outdated and thus mostly unuseful
> (e.g. USSR doesn't exist for almost 30 years).

Perhaps this could be discussed in its own thread?
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190716042457.GA19396@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Fix typos and inconsistencies for HEAD (take 7)
@ 2019-07-21 05:28 Alexander Lakhin <exclusion@gmail.com>
  2019-07-21 16:34 ` Re: Fix typos and inconsistencies for HEAD (take 7) Tom Lane <tgl@sss.pgh.pa.us>
  2019-07-22 01:05 ` Re: Fix typos and inconsistencies for HEAD (take 7) Michael Paquier <michael@paquier.xyz>
  0 siblings, 2 replies; 25+ messages in thread

From: Alexander Lakhin @ 2019-07-21 05:28 UTC (permalink / raw)
  To: pgsql-hackers; +Cc: Michael Paquier <michael@paquier.xyz>

Hello hackers,

Please consider fixing the next pack of typos and inconsistencies in the
tree:
7.1. h04m05s06 -> h04mm05s06 (in fact it's broken since 6af04882, but
h04mm05s06.789 still accepted)
7.2. hasbucketcleanup -> hashbucketcleanup
7.3. _hashm_spare -> hashm_spares
7.4. hashtbl -> hash table
7.5. HAS_RELFILENODES -> XINFO_HAS_RELFILENODES
7.6. HAS_SUBXACT -> XINFO_HAS_SUBXACT
7.7. HAVE_FCVT -> remove (survived after ff4628f3)
7.8. HAVE_FINITE -> remove (orphaned after cac2d912)
7.9. HAVE_STRUCT_SOCKADDR_UN -> remove (not used since introduction in
399a36a7)
7.10. HAVE_SYSCONF -> remove (survived after ff4628f3)
7.11. HAVE_ZLIB -> HAVE_LIBZ
7.12. HEAP_CLEAN -> XLOG_HEAP2_CLEAN
7.13. HEAP_CONTAINS_NEW_TUPLE_DATA -> XLH_UPDATE_CONTAINS_NEW_TUPLE,
XLOG_HEAP_CONTAINS_OLD_TUPLE -> XLH_UPDATE_CONTAINS_OLD_TUPLE,
XLOG_HEAP_CONTAINS_OLD_KEY -> XLH_UPDATE_CONTAINS_OLD_KEY,
XLOG_HEAP_PREFIX_FROM_OLD -> XLH_UPDATE_PREFIX_FROM_OLD,
XLOG_HEAP_SUFFIX_FROM_OLD -> XLH_UPDATE_SUFFIX_FROM_OLD (renamed in
168d5805)
7.14. HEAP_FREEZE -> FREEZE_PAGE (an inconsistency since introduction in
48188e16)
7.15. heapio.c -> hio.c
7.16. heap_newpage -> XLOG_FPI (orphaned since 54685338)
7.17. heaxadecimal -> hexadecimal
7.18. hostlen -> nodelen, host -> node, serv -> service, servlen ->
servicelen
7.19. i386s -> x86_64
7.20. IConst/FConst  -> ICONST/FCONST
7.21. imit -> limit
7.22. IN_ARCHIVE_RECOVERY -> DB_IN_ARCHIVE_RECOVERY
7.23. ind_arraysize, ind_value -> ind_arrsize, ind_pointer
7.24. index_getnext -> index_getnext_slot
7.25. IndexTupleVector -> IndexTuple vector
7.26. innerConsistent -> innerConsistentFn
7.27. in-progres -> in-progress
7.28. inspire with -> inspired by the (sync with 192b0c94)
7.29. internalerrpos -> internalerrposition
7.30. internal_procname -> internal_proname
7.31. interruptOK -> remove (orphaned after d0699571)
7.32. intratransaction -> intra-transaction
7.33. InvalidOffset -> InvalidOffsetNumber
7.34. invtrans -> invtransfn
7.35. isbuiltin -> fmgr_isbuiltin
7.36. iself -> itself
7.37. isnoinherit -> noinherit
7.38. ISO_DATES -> USE_ISO_DATES
7.39. isParentRoot -> remove (orphaned after 218f5158)
7.40. isPrefix -> prefix
7.41. ItemPointerIsMax -> remove (orphaned after e20c70cb)
7.42. itemsin -> items in
7.43. jbVal -> jbval
7.44. json_plperl -> jsonb_plperlu
7.45. jvbBinary -> jbvBinary
7.46. keyAttrs -> attrKind
7.47. keyinfo -> key info
7.48. key_modified -> key_changed
7.49. killitems -> killedItems
7.50. KnownAssignedTransactions -> KnownAssignedTransactionIds

Also, I found e-mail headers in optimizer/plan/README not relevant, so I
propose to remove them.
And another finding is related to the sleep effective resolution. `man 7
time` says "Since kernel 2.6.13, the HZ value is a kernel configuration 
parameter  and  can  be 100, 250 (the default) ...", so the 10
milliseconds is not the most common effective resolution nowadays.
I propose the corresponding patch for pgsleep.c, but we have a similar
statement in doc/.../config.sgml. I think It should be fixed too.

Best regards,
Alexander

Attachments:

  [text/x-patch] fixes_7.1-10.patch (4.5K, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/2-fixes_7.1-10.patch)
  download | inline diff:
diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c
index a07bd27a0e..487103fb79 100644
--- a/src/backend/access/hash/hashovfl.c
+++ b/src/backend/access/hash/hashovfl.c
@@ -793,7 +793,7 @@ _hash_initbitmapbuffer(Buffer buf, uint16 bmsize, bool initpage)
  *	be confused into returning the same tuple more than once or some tuples
  *	not at all by the rearrangement we are performing here.  To prevent
  *	any concurrent scan to cross the squeeze scan we use lock chaining
- *	similar to hasbucketcleanup.  Refer comments atop hashbucketcleanup.
+ *	similar to hashbucketcleanup.  Refer comments atop hashbucketcleanup.
  *
  *	We need to retain a pin on the primary bucket to ensure that no concurrent
  *	split can start.
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 376ee2a63b..defdc9b408 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -509,7 +509,7 @@ _hash_init_metabuffer(Buffer buf, double num_tuples, RegProcedure procid,
 	 * Choose the number of initial bucket pages to match the fill factor
 	 * given the estimated number of tuples.  We round up the result to the
 	 * total number of buckets which has to be allocated before using its
-	 * _hashm_spare element. However always force at least 2 bucket pages. The
+	 * hashm_spares element. However always force at least 2 bucket pages. The
 	 * upper limit is determined by considerations explained in
 	 * _hash_expandtable().
 	 */
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 54ea69f7f1..4d8db1a060 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -1855,7 +1855,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
 
 				/*
 				 * Was this an "ISO time" with embedded field labels? An
-				 * example is "h04m05s06" - thomas 2001-02-04
+				 * example is "h04mm05s06" - thomas 2001-02-04
 				 */
 				if (ptype != 0)
 				{
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index a20726afa0..d714551704 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -283,8 +283,8 @@ typedef struct xl_xact_abort
 
 	/* xl_xact_xinfo follows if XLOG_XACT_HAS_INFO */
 	/* xl_xact_dbinfo follows if XINFO_HAS_DBINFO */
-	/* xl_xact_subxacts follows if HAS_SUBXACT */
-	/* xl_xact_relfilenodes follows if HAS_RELFILENODES */
+	/* xl_xact_subxacts follows if XINFO_HAS_SUBXACT */
+	/* xl_xact_relfilenodes follows if XINFO_HAS_RELFILENODES */
 	/* No invalidation messages needed. */
 	/* xl_xact_twophase follows if XINFO_HAS_TWOPHASE */
 	/* twophase_gid follows if XINFO_HAS_GID. As a null-terminated string. */
diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h
index 3054136130..1a8ca98a8c 100644
--- a/src/include/executor/nodeAgg.h
+++ b/src/include/executor/nodeAgg.h
@@ -300,7 +300,7 @@ typedef struct AggStatePerHashData
 	int			numhashGrpCols; /* number of columns in hash table */
 	int			largestGrpColIdx;	/* largest col required for hashing */
 	AttrNumber *hashGrpColIdxInput; /* hash col indices in input slot */
-	AttrNumber *hashGrpColIdxHash;	/* indices in hashtbl tuples */
+	AttrNumber *hashGrpColIdxHash;	/* indices in hash table tuples */
 	Agg		   *aggnode;		/* original Agg node, for numGroups etc. */
 }			AggStatePerHashData;
 
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 8e35cf0a03..2d903c82b8 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -159,15 +159,9 @@
 /* Define to 1 if you have the <editline/readline.h> header file. */
 /* #undef HAVE_EDITLINE_READLINE_H */
 
-/* Define to 1 if you have the `fcvt' function. */
-#define HAVE_FCVT 1
-
 /* Define to 1 if you have the `fdatasync' function. */
 /* #undef HAVE_FDATASYNC */
 
-/* Define to 1 if you have finite(). */
-#define HAVE_FINITE 1
-
 /* Define to 1 if you have the `fpclass' function. */
 /* #undef HAVE_FPCLASS */
 
@@ -469,9 +463,6 @@
 /* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */
 /* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */
 
-/* Define to 1 if the system has the type `struct sockaddr_un'. */
-/* #undef HAVE_STRUCT_SOCKADDR_UN */
-
 /* Define to 1 if `tm_zone' is member of `struct tm'. */
 /* #undef HAVE_STRUCT_TM_TM_ZONE */
 
@@ -481,9 +472,6 @@
 /* Define to 1 if you have the `sync_file_range' function. */
 /* #undef HAVE_SYNC_FILE_RANGE */
 
-/* Define to 1 if you have the `sysconf' function. */
-/* #undef HAVE_SYSCONF */
-
 /* Define to 1 if you have the syslog interface. */
 /* #undef HAVE_SYSLOG */
 

  [text/x-patch] fixes_7.11-20.patch (6.5K, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/3-fixes_7.11-20.patch)
  download | inline diff:
diff --git a/contrib/pgcrypto/pgp-compress.c b/contrib/pgcrypto/pgp-compress.c
index eaeb221877..2adaf2c875 100644
--- a/contrib/pgcrypto/pgp-compress.c
+++ b/contrib/pgcrypto/pgp-compress.c
@@ -311,7 +311,7 @@ pgp_decompress_filter(PullFilter **res, PGP_Context *ctx, PullFilter *src)
 {
 	return pullf_create(res, &decompress_filter, ctx, src);
 }
-#else							/* !HAVE_ZLIB */
+#else							/* !HAVE_LIBZ */
 
 int
 pgp_compress_filter(PushFilter **res, PGP_Context *ctx, PushFilter *dst)
diff --git a/doc/src/sgml/problems.sgml b/doc/src/sgml/problems.sgml
index 02ed975ec2..cf43262872 100644
--- a/doc/src/sgml/problems.sgml
+++ b/doc/src/sgml/problems.sgml
@@ -252,7 +252,7 @@
       C library, processor, memory information, and so on. In most
       cases it is sufficient to report the vendor and version, but do
       not assume everyone knows what exactly <quote>Debian</quote>
-      contains or that everyone runs on i386s. If you have
+      contains or that everyone runs on x86_64. If you have
       installation problems then information about the toolchain on
       your machine (compiler, <application>make</application>, and so
       on) is also necessary.
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 5773021499..42647b0526 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -69,7 +69,7 @@
  * currently executing.
  *
  * Fillfactor can be set because it applies only to subsequent changes made to
- * data blocks, as documented in heapio.c
+ * data blocks, as documented in hio.c
  *
  * n_distinct options can be set at ShareUpdateExclusiveLock because they
  * are only used during ANALYZE, which uses a ShareUpdateExclusiveLock,
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index 0efe3ce999..a0d22173ce 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -256,7 +256,7 @@ heap_page_prune(Relation relation, Buffer buffer, TransactionId OldestXmin,
 		MarkBufferDirty(buffer);
 
 		/*
-		 * Emit a WAL HEAP_CLEAN record showing what we did
+		 * Emit a WAL XLOG_HEAP2_CLEAN record showing what we did
 		 */
 		if (RelationNeedsWAL(relation))
 		{
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index d78f706ff7..34c74d96f8 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -891,7 +891,7 @@ ExtendCLOG(TransactionId newestXact)
  * Remove all CLOG segments before the one holding the passed transaction ID
  *
  * Before removing any CLOG data, we must flush XLOG to disk, to ensure
- * that any recently-emitted HEAP_FREEZE records have reached disk; otherwise
+ * that any recently-emitted FREEZE_PAGE records have reached disk; otherwise
  * a crash and restart might leave us with some unfrozen tuples referencing
  * removed CLOG data.  We choose to emit a special TRUNCATE XLOG record too.
  * Replaying the deletion from XLOG is not critical, since the files could
diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c
index bb67e01499..778d186f5b 100644
--- a/src/backend/utils/adt/oid.c
+++ b/src/backend/utils/adt/oid.c
@@ -308,7 +308,7 @@ oidvectorsend(PG_FUNCTION_ARGS)
 }
 
 /*
- *		oidparse				- get OID from IConst/FConst node
+ *		oidparse				- get OID from ICONST/FCONST node
  */
 Oid
 oidparse(Node *node)
diff --git a/src/common/md5.c b/src/common/md5.c
index 24b96eb314..55eaeed828 100644
--- a/src/common/md5.c
+++ b/src/common/md5.c
@@ -277,7 +277,7 @@ bytesToHex(uint8 b[16], char *s)
  *
  *	OUTPUT		  hexsum  the MD5 sum as a '\0'-terminated string of
  *						  hexadecimal digits.  an MD5 sum is 16 bytes long.
- *						  each byte is represented by two heaxadecimal
+ *						  each byte is represented by two hexadecimal
  *						  characters.  you thus need to provide an array
  *						  of 33 characters, including the trailing '\0'.
  *
diff --git a/src/include/access/ginxlog.h b/src/include/access/ginxlog.h
index 2c5d743cac..7ef3bcf765 100644
--- a/src/include/access/ginxlog.h
+++ b/src/include/access/ginxlog.h
@@ -127,7 +127,7 @@ typedef struct ginxlogSplit
 
 /*
  * Vacuum simply WAL-logs the whole page, when anything is modified. This
- * is functionally identical to heap_newpage records, but is kept separate for
+ * is functionally identical to XLOG_FPI records, but is kept separate for
  * debugging purposes. (When inspecting the WAL stream, it's easier to see
  * what's going on when GIN vacuum records are marked as such, not as heap
  * records.) This is currently only used for entry tree leaf pages.
diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h
index f6cdca83ea..9629db9df4 100644
--- a/src/include/access/heapam_xlog.h
+++ b/src/include/access/heapam_xlog.h
@@ -195,14 +195,14 @@ typedef struct xl_multi_insert_tuple
  *
  * Backup blk 0: new page
  *
- * If XLOG_HEAP_PREFIX_FROM_OLD or XLOG_HEAP_SUFFIX_FROM_OLD flags are set,
+ * If XLH_UPDATE_PREFIX_FROM_OLD or XLH_UPDATE_SUFFIX_FROM_OLD flags are set,
  * the prefix and/or suffix come first, as one or two uint16s.
  *
  * After that, xl_heap_header and new tuple data follow.  The new tuple
  * data doesn't include the prefix and suffix, which are copied from the
  * old tuple on replay.
  *
- * If HEAP_CONTAINS_NEW_TUPLE_DATA flag is given, the tuple data is
+ * If XLH_UPDATE_CONTAINS_NEW_TUPLE flag is given, the tuple data is
  * included even if a full-page image was taken.
  *
  * Backup blk 1: old page, if different. (no data, just a reference to the blk)
@@ -217,8 +217,8 @@ typedef struct xl_heap_update
 	OffsetNumber new_offnum;	/* new tuple's offset */
 
 	/*
-	 * If XLOG_HEAP_CONTAINS_OLD_TUPLE or XLOG_HEAP_CONTAINS_OLD_KEY flags are
-	 * set, a xl_heap_header struct and tuple data for the old tuple follows.
+	 * If XLH_UPDATE_CONTAINS_OLD_TUPLE or XLH_UPDATE_CONTAINS_OLD_KEY flags
+	 * are set, xl_heap_header and tuple data for the old tuple follow.
 	 */
 } xl_heap_update;
 
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c
index 7f53afbea2..536c5f686e 100644
--- a/src/port/getaddrinfo.c
+++ b/src/port/getaddrinfo.c
@@ -49,8 +49,8 @@ typedef void (__stdcall * freeaddrinfo_ptr_t) (struct addrinfo *ai);
 
 typedef int (__stdcall * getnameinfo_ptr_t) (const struct sockaddr *sa,
 											 int salen,
-											 char *host, int hostlen,
-											 char *serv, int servlen,
+											 char *node, int nodelen,
+											 char *service, int servicelen,
 											 int flags);
 
 /* static pointers to the native routines, so we only do the lookup once. */

  [text/x-patch] fixes_7.21-30.patch (5.8K, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/4-fixes_7.21-30.patch)
  download | inline diff:
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 49df05653b..7d1b219bbc 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -120,7 +120,7 @@ gistjoinvector(IndexTuple *itvec, int *len, IndexTuple *additvec, int addlen)
 }
 
 /*
- * make plain IndexTupleVector
+ * make plain IndexTuple vector
  */
 
 IndexTupleData *
diff --git a/src/backend/access/index/genam.c b/src/backend/access/index/genam.c
index 42aaa5bad6..2599b5d342 100644
--- a/src/backend/access/index/genam.c
+++ b/src/backend/access/index/genam.c
@@ -557,8 +557,8 @@ systable_endscan(SysScanDesc sysscan)
  * we could do a heapscan and sort, but the uses are in places that
  * probably don't need to still work with corrupted catalog indexes.)
  * For the moment, therefore, these functions are merely the thinnest of
- * wrappers around index_beginscan/index_getnext.  The main reason for their
- * existence is to centralize possible future support of lossy operators
+ * wrappers around index_beginscan/index_getnext_slot.  The main reason for
+ * their existence is to centralize possible future support of lossy operators
  * in catalog scans.
  */
 SysScanDesc
diff --git a/src/backend/access/spgist/spgscan.c b/src/backend/access/spgist/spgscan.c
index 557dd18d7e..1cf28ecf2f 100644
--- a/src/backend/access/spgist/spgscan.c
+++ b/src/backend/access/spgist/spgscan.c
@@ -643,7 +643,7 @@ spgInnerTest(SpGistScanOpaque so, SpGistSearchItem *item,
 				continue;
 
 			/*
-			 * Use infinity distances if innerConsistent() failed to return
+			 * Use infinity distances if innerConsistentFn() failed to return
 			 * them or if is a NULL item (their distances are really unused).
 			 */
 			distances = out.distances ? out.distances[i] : so->infDistances;
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b6c9353cbd..da3d250986 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -9158,7 +9158,7 @@ CreateRestartPoint(int flags)
 
 	/*
 	 * Update pg_control, using current time.  Check that it still shows
-	 * IN_ARCHIVE_RECOVERY state and an older checkpoint, else do nothing;
+	 * DB_IN_ARCHIVE_RECOVERY state and an older checkpoint, else do nothing;
 	 * this is a quick hack to make sure nothing really bad happens if somehow
 	 * we get here after the end-of-recovery checkpoint.
 	 */
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index 60c5615799..0339b98041 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -544,7 +544,7 @@ extern int	pg_mbstrlen_with_len(const char *mbstr, int len);
 extern int	pg_mbcliplen(const char *mbstr, int len, int limit);
 extern int	pg_encoding_mbcliplen(int encoding, const char *mbstr,
 								  int len, int limit);
-extern int	pg_mbcharcliplen(const char *mbstr, int len, int imit);
+extern int	pg_mbcharcliplen(const char *mbstr, int len, int limit);
 extern int	pg_encoding_max_length(int encoding);
 extern int	pg_database_encoding_max_length(void);
 extern mbcharacter_incrementer pg_database_encoding_character_incrementer(void);
diff --git a/src/include/utils/formatting.h b/src/include/utils/formatting.h
index 5b275dc985..741c5f4809 100644
--- a/src/include/utils/formatting.h
+++ b/src/include/utils/formatting.h
@@ -7,7 +7,7 @@
  *	 Portions Copyright (c) 1999-2019, PostgreSQL Global Development Group
  *
  *	 The PostgreSQL routines for a DateTime/int/float/numeric formatting,
- *	 inspire with Oracle TO_CHAR() / TO_DATE() / TO_NUMBER() routines.
+ *	 inspired by the Oracle TO_CHAR() / TO_DATE() / TO_NUMBER() routines.
  *
  *	 Karel Zak
  *
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 4394b420a1..4e2016c7ae 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -2073,9 +2073,9 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
 	 * offset - offset between ith and (i+1)th entry in an array, normally
 	 * that means sizeof(type)
 	 * ind_type - type of indicator variable
-	 * ind_value - pointer to indicator variable
+	 * ind_pointer - pointer to indicator variable
 	 * ind_varcharsize - empty
-	 * ind_arraysize - arraysize of indicator array
+	 * ind_arrsize - arraysize of indicator array
 	 * ind_offset - indicator offset
 	 *------
 	 */
diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y
index dea95f4230..a82930e81d 100644
--- a/src/pl/plpgsql/src/pl_gram.y
+++ b/src/pl/plpgsql/src/pl_gram.y
@@ -3691,7 +3691,7 @@ plpgsql_sql_error_callback(void *arg)
 			internalerrposition(myerrpos + errpos - cbarg->leaderlen - 1);
 	}
 
-	/* In any case, flush errposition --- we want internalerrpos only */
+	/* In any case, flush errposition --- we want internalerrposition only */
 	errposition(0);
 }
 
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index eecd2032d8..b318854d6c 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -1634,7 +1634,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid,
 
 		/************************************************************
 		 * prefix procedure body with
-		 * upvar #0 <internal_procname> GD
+		 * upvar #0 <internal_proname> GD
 		 * and with appropriate setting of arguments
 		 ************************************************************/
 		Tcl_DStringAppend(&proc_internal_body, "upvar #0 ", -1);
diff --git a/src/test/recovery/t/011_crash_recovery.pl b/src/test/recovery/t/011_crash_recovery.pl
index 5dc52412ca..526a3481fb 100644
--- a/src/test/recovery/t/011_crash_recovery.pl
+++ b/src/test/recovery/t/011_crash_recovery.pl
@@ -51,7 +51,7 @@ my $xid = $stdout;
 chomp($xid);
 
 is($node->safe_psql('postgres', qq[SELECT txid_status('$xid');]),
-	'in progress', 'own xid is in-progres');
+	'in progress', 'own xid is in-progress');
 
 # Crash and restart the postmaster
 $node->stop('immediate');

  [text/x-patch] fixes_7.31-40.patch (5.8K, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/5-fixes_7.31-40.patch)
  download | inline diff:
diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c
index dc46f2460e..d4f8044b3a 100644
--- a/src/backend/access/gin/ginvacuum.c
+++ b/src/backend/access/gin/ginvacuum.c
@@ -127,7 +127,7 @@ typedef struct DataPageDeleteStack
  */
 static void
 ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkno,
-			  BlockNumber parentBlkno, OffsetNumber myoff, bool isParentRoot)
+			  BlockNumber parentBlkno, OffsetNumber myoff)
 {
 	Buffer		dBuffer;
 	Buffer		lBuffer;
@@ -301,7 +301,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot,
 		if (me->leftBlkno != InvalidBlockNumber && !GinPageRightMost(page))
 		{
 			Assert(!isRoot);
-			ginDeletePage(gvs, blkno, me->leftBlkno, me->parent->blkno, myoff, me->parent->isRoot);
+			ginDeletePage(gvs, blkno, me->leftBlkno, me->parent->blkno, myoff);
 			meDelete = true;
 		}
 	}
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index ee878d70a9..2d9a8e9d54 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -775,7 +775,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
 											  NULL,
 											  true, /* islocal */
 											  0,	/* inhcount */
-											  true, /* isnoinherit */
+											  true, /* noinherit */
 											  isInternal);	/* is_internal */
 	}
 
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index cb4ab4b21e..2342ca3018 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -2988,8 +2988,8 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
 		numTransArgs = pertrans->numTransInputs + 1;
 
 		/*
-		 * Set up infrastructure for calling the transfn.  Note that invtrans
-		 * is not needed here.
+		 * Set up infrastructure for calling the transfn.  Note that
+		 * invtransfn is not needed here.
 		 */
 		build_aggregate_transfn_expr(inputTypes,
 									 numArguments,
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 74f8d89bcb..b8eb83b2e0 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -2369,7 +2369,7 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
 			/*
 			 * The last canSetTag query sets the status values returned to the
 			 * caller.  Be careful to free any tuptables not returned, to
-			 * avoid intratransaction memory leak.
+			 * avoid intra-transaction memory leak.
 			 */
 			if (canSetTag)
 			{
diff --git a/src/backend/port/win32_sema.c b/src/backend/port/win32_sema.c
index f08fbd1690..013c122451 100644
--- a/src/backend/port/win32_sema.c
+++ b/src/backend/port/win32_sema.c
@@ -127,7 +127,6 @@ PGSemaphoreReset(PGSemaphore sema)
  * PGSemaphoreLock
  *
  * Lock a semaphore (decrement count), blocking if count would be < 0.
- * Serve the interrupt if interruptOK is true.
  */
 void
 PGSemaphoreLock(PGSemaphore sema)
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index 4f7bafd142..696a7fdf91 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -1152,7 +1152,7 @@ tsvector_concat(PG_FUNCTION_ARGS)
 /*
  * Compare two strings by tsvector rules.
  *
- * if isPrefix = true then it returns zero value iff b has prefix a
+ * if prefix = true then it returns zero value iff b has prefix a
  */
 int32
 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 9b640ccd40..99c34516bd 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -217,7 +217,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt,
 
 			/*
 			 * For an ordinary builtin function, we should never get here
-			 * because the isbuiltin() search above will have succeeded.
+			 * because the fmgr_isbuiltin() search above will have succeeded.
 			 * However, if the user has done a CREATE FUNCTION to create an
 			 * alias for a builtin function, we can end up here.  In that case
 			 * we have to look up the function by name.  The name of the
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index ef9fc15ac3..6690d78137 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1093,7 +1093,7 @@ AtEOXact_Snapshot(bool isCommit, bool resetXmin)
 		 * prevent a warning below.
 		 *
 		 * As with the FirstXactSnapshot, we don't need to free resources of
-		 * the snapshot iself as it will go away with the memory context.
+		 * the snapshot itself as it will go away with the memory context.
 		 */
 		foreach(lc, exportedSnapshots)
 		{
diff --git a/src/include/access/spgist_private.h b/src/include/access/spgist_private.h
index 4a38938732..e0d1178f24 100644
--- a/src/include/access/spgist_private.h
+++ b/src/include/access/spgist_private.h
@@ -328,7 +328,7 @@ typedef struct SpGistLeafTupleData
 {
 	unsigned int tupstate:2,	/* LIVE/REDIRECT/DEAD/PLACEHOLDER */
 				size:30;		/* large enough for any palloc'able value */
-	OffsetNumber nextOffset;	/* next tuple in chain, or InvalidOffset */
+	OffsetNumber nextOffset;	/* next tuple in chain, or InvalidOffsetNumber */
 	ItemPointerData heapPtr;	/* TID of represented heap tuple */
 	/* leaf datum follows */
 } SpGistLeafTupleData;
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index efd9f3aa71..a66a7a16af 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -275,8 +275,8 @@ PGTYPEStimestamp_to_asc(timestamp tstamp)
 			   *tm = &tt;
 	char		buf[MAXDATELEN + 1];
 	fsec_t		fsec;
-	int			DateStyle = 1;	/* this defaults to ISO_DATES, shall we make
-								 * it an option? */
+	int			DateStyle = 1;	/* this defaults to USE_ISO_DATES,
+						 * shall we make it an option? */
 
 	if (TIMESTAMP_NOT_FINITE(tstamp))
 		EncodeSpecialTimestamp(tstamp, buf);

  [text/x-patch] fixes_7.41-50.patch (5.8K, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/6-fixes_7.41-50.patch)
  download | inline diff:
diff --git a/contrib/jsonb_plperl/jsonb_plperlu--1.0.sql b/contrib/jsonb_plperl/jsonb_plperlu--1.0.sql
index 5a5e475ad3..3c6f4bd665 100644
--- a/contrib/jsonb_plperl/jsonb_plperlu--1.0.sql
+++ b/contrib/jsonb_plperl/jsonb_plperlu--1.0.sql
@@ -1,4 +1,4 @@
-/* contrib/json_plperl/jsonb_plperl--1.0.sql */
+/* contrib/jsonb_plperlu/jsonb_plperl--1.0.sql */
 
 -- complain if script is sourced in psql, rather than via CREATE EXTENSION
 \echo Use "CREATE EXTENSION jsonb_plperlu" to load this file. \quit
diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c
index 57c3b830d8..21de8ed714 100644
--- a/src/backend/access/gin/gindatapage.c
+++ b/src/backend/access/gin/gindatapage.c
@@ -92,7 +92,7 @@ typedef struct
 
 	/*
 	 * The following fields represent the items in this segment. If 'items' is
-	 * not NULL, it contains a palloc'd array of the itemsin this segment. If
+	 * not NULL, it contains a palloc'd array of the items in this segment. If
 	 * 'seg' is not NULL, it contains the items in an already-compressed
 	 * format. It can point to an on-disk page (!modified), or a palloc'd
 	 * segment in memory. If both are set, they must represent the same items.
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 8108fbb7d8..c141076142 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -663,8 +663,8 @@ gistgettuple(IndexScanDesc scan, ScanDirection dir)
 			}
 
 			/*
-			 * Check the last returned tuple and add it to killitems if
-			 * necessary
+			 * Check the last returned tuple and add it to killedItems
+			 * if necessary
 			 */
 			if (scan->kill_prior_tuple
 				&& so->curPageData > 0
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index d768b9b061..94309949fa 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -102,7 +102,7 @@ static void MultiXactIdWait(MultiXactId multi, MultiXactStatus status, uint16 in
 static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status,
 									   uint16 infomask, Relation rel, int *remaining);
 static XLogRecPtr log_heap_new_cid(Relation relation, HeapTuple tup);
-static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_modified,
+static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_changed,
 										bool *copy);
 
 
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 7d8907b2b4..d7ef942973 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -2835,7 +2835,7 @@ satisfies_hash_partition(PG_FUNCTION_ARGS)
 		PartitionKey key;
 		int			j;
 
-		/* Open parent relation and fetch partition keyinfo */
+		/* Open parent relation and fetch partition key info */
 		parent = try_relation_open(parentId, AccessShareLock);
 		if (parent == NULL)
 			PG_RETURN_NULL();
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index ea02973dc7..50f18f81c6 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -3130,7 +3130,7 @@ DisplayXidCache(void)
 
 
 /* ----------------------------------------------
- *		KnownAssignedTransactions sub-module
+ *	KnownAssignedTransactionIds sub-module
  * ----------------------------------------------
  */
 
diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c
index 7969f6f584..ac04c4a57b 100644
--- a/src/backend/utils/adt/jsonb_util.c
+++ b/src/backend/utils/adt/jsonb_util.c
@@ -510,7 +510,7 @@ fillJsonbValue(JsonbContainer *container, int index,
  * "raw scalar" pseudo array to append it - the actual scalar should be passed
  * next and it will be added as the only member of the array.
  *
- * Values of type jvbBinary, which are rolled up arrays and objects,
+ * Values of type jbvBinary, which are rolled up arrays and objects,
  * are unpacked before being added to the result.
  */
 JsonbValue *
diff --git a/src/include/access/ginblock.h b/src/include/access/ginblock.h
index 5fd397c136..e7d49b152e 100644
--- a/src/include/access/ginblock.h
+++ b/src/include/access/ginblock.h
@@ -171,9 +171,6 @@ typedef struct GinMetaPageData
 	 GinItemPointerGetBlockNumber(p) == (BlockNumber)0)
 #define ItemPointerSetMax(p)  \
 	ItemPointerSet((p), InvalidBlockNumber, (OffsetNumber)0xffff)
-#define ItemPointerIsMax(p)  \
-	(GinItemPointerGetOffsetNumber(p) == (OffsetNumber)0xffff && \
-	 GinItemPointerGetBlockNumber(p) == InvalidBlockNumber)
 #define ItemPointerSetLossyPage(p, b)  \
 	ItemPointerSet((p), (b), (OffsetNumber)0xffff)
 #define ItemPointerIsLossyPage(p)  \
diff --git a/src/include/utils/jsonb.h b/src/include/utils/jsonb.h
index 2fe7d32fec..ac52b75f51 100644
--- a/src/include/utils/jsonb.h
+++ b/src/include/utils/jsonb.h
@@ -367,7 +367,7 @@ extern JsonbValue *findJsonbValueFromContainer(JsonbContainer *sheader,
 extern JsonbValue *getIthJsonbValueFromContainer(JsonbContainer *sheader,
 												 uint32 i);
 extern JsonbValue *pushJsonbValue(JsonbParseState **pstate,
-								  JsonbIteratorToken seq, JsonbValue *jbVal);
+								  JsonbIteratorToken seq, JsonbValue *jbval);
 extern JsonbIterator *JsonbIteratorInit(JsonbContainer *container);
 extern JsonbIteratorToken JsonbIteratorNext(JsonbIterator **it, JsonbValue *val,
 											bool skipNested);
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h
index d9c10ffcba..2f2ace35b0 100644
--- a/src/include/utils/relcache.h
+++ b/src/include/utils/relcache.h
@@ -59,7 +59,7 @@ typedef enum IndexAttrBitmapKind
 } IndexAttrBitmapKind;
 
 extern Bitmapset *RelationGetIndexAttrBitmap(Relation relation,
-											 IndexAttrBitmapKind keyAttrs);
+											 IndexAttrBitmapKind attrKind);
 
 extern void RelationGetExclusionInfo(Relation indexRelation,
 									 Oid **operators,

  [text/x-patch] pgsleep.patch (684B, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/7-pgsleep.patch)
  download | inline diff:
diff --git a/src/port/pgsleep.c b/src/port/pgsleep.c
index 84e1c3049a..8e76bf9fa7 100644
--- a/src/port/pgsleep.c
+++ b/src/port/pgsleep.c
@@ -28,8 +28,8 @@
  * pg_usleep --- delay the specified number of microseconds.
  *
  * NOTE: although the delay is specified in microseconds, the effective
- * resolution is only 1/HZ, or 10 milliseconds, on most Unixen.  Expect
- * the requested delay to be rounded up to the next resolution boundary.
+ * resolution is only 1/HZ, or up to several milliseconds, on most Unixen.
+ * Expect the requested delay to be rounded up to the next resolution boundary.
  *
  * On machines where "long" is 32 bits, the maximum delay is ~2000 seconds.
  *

  [text/x-patch] plan-README.patch (2.4K, ../../dff75442-2468-f74f-568c-6006e141062f@gmail.com/8-plan-README.patch)
  download | inline diff:
diff --git a/src/backend/optimizer/plan/README b/src/backend/optimizer/plan/README
index 013c0f9ea2..9ec77a15cb 100644
--- a/src/backend/optimizer/plan/README
+++ b/src/backend/optimizer/plan/README
@@ -3,36 +3,6 @@ src/backend/optimizer/plan/README
 Subselects
 ==========
 
-Vadim B. Mikheev
-
-
-From owner-pgsql-hackers@hub.org Fri Feb 13 09:01:19 1998
-Received: from renoir.op.net (root@renoir.op.net [209.152.193.4])
-	by candle.pha.pa.us (8.8.5/8.8.5) with ESMTP id JAA11576
-	for <maillist@candle.pha.pa.us>; Fri, 13 Feb 1998 09:01:17 -0500 (EST)
-Received: from hub.org (hub.org [209.47.148.200]) by renoir.op.net (o1/$Revision: 1.14 $) with ESMTP id IAA09761 for <maillist@candle.pha.pa.us>; Fri, 13 Feb 1998 08:41:22 -0500 (EST)
-Received: from localhost (majordom@localhost) by hub.org (8.8.8/8.7.5) with SMTP id IAA08135; Fri, 13 Feb 1998 08:40:17 -0500 (EST)
-Received: by hub.org (TLB v0.10a (1.23 tibbs 1997/01/09 00:29:32)); Fri, 13 Feb 1998 08:38:42 -0500 (EST)
-Received: (from majordom@localhost) by hub.org (8.8.8/8.7.5) id IAA06646 for pgsql-hackers-outgoing; Fri, 13 Feb 1998 08:38:35 -0500 (EST)
-Received: from dune.krasnet.ru (dune.krasnet.ru [193.125.44.86]) by hub.org (8.8.8/8.7.5) with ESMTP id IAA04568 for <hackers@postgreSQL.org>; Fri, 13 Feb 1998 08:37:16 -0500 (EST)
-Received: from sable.krasnoyarsk.su (dune.krasnet.ru [193.125.44.86])
-	by dune.krasnet.ru (8.8.7/8.8.7) with ESMTP id UAA13717
-	for <hackers@postgreSQL.org>; Fri, 13 Feb 1998 20:51:03 +0700 (KRS)
-	(envelope-from vadim@sable.krasnoyarsk.su)
-Message-ID: <34E44FBA.D64E7997@sable.krasnoyarsk.su>
-Date: Fri, 13 Feb 1998 20:50:50 +0700
-From: "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
-Organization: ITTS (Krasnoyarsk)
-X-Mailer: Mozilla 4.04 [en] (X11; I; FreeBSD 2.2.5-RELEASE i386)
-MIME-Version: 1.0
-To: PostgreSQL Developers List <hackers@postgreSQL.org>
-Subject: [HACKERS] Subselects are in CVS...
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-Sender: owner-pgsql-hackers@hub.org
-Precedence: bulk
-Status: OR
-
 This is some implementation notes and opened issues...
 
 First, implementation uses new type of parameters - PARAM_EXEC - to deal
@@ -155,4 +125,5 @@ Using temp table  -> 32 sec
 SubSelect         -> 17 sec (2M of memory)
 Using temp table  -> 32 sec (12M of memory: -S 8192)
 
-Vadim
+Vadim B. Mikheev
+(see https://www.postgresql.org/message-id/34E44FBA.D64E7997@sable.krasnoyarsk.su)

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 7)
  2019-07-21 05:28 Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
@ 2019-07-21 16:34 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 25+ messages in thread

From: Tom Lane @ 2019-07-21 16:34 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>

Alexander Lakhin <exclusion@gmail.com> writes:
> Also, I found e-mail headers in optimizer/plan/README not relevant, so I
> propose to remove them.

FWIW, I think they're highly relevant, because they put a date on
that text.  I've not gone through that README lately, but I wouldn't
be surprised if it's largely obsolete --- it hasn't been maintained
in any meaningful way since Vadim wrote it.  Without the headers, a
reader would have no warning of that.

What really ought to happen, likely, is for somebody to extract
whatever is still useful there into a new(?) section in the parent
directory's README.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 7)
  2019-07-21 05:28 Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
@ 2019-07-22 01:05 ` Michael Paquier <michael@paquier.xyz>
  2019-07-22 04:14   ` Re: Fix typos and inconsistencies for HEAD (take 7) Tom Lane <tgl@sss.pgh.pa.us>
  2019-07-22 04:31   ` Re: Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
  1 sibling, 2 replies; 25+ messages in thread

From: Michael Paquier @ 2019-07-22 01:05 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Sun, Jul 21, 2019 at 08:28:53AM +0300, Alexander Lakhin wrote:
> Please consider fixing the next pack of typos and inconsistencies in the
> tree:

Thanks, all those things look fine.  I have noticed one mistake.

> 7.44. json_plperl -> jsonb_plperlu

The path was incorrect here.

> Also, I found e-mail headers in optimizer/plan/README not relevant, so I
> propose to remove them.

Not sure about that part.

> And another finding is related to the sleep effective resolution. `man 7
> time` says "Since kernel 2.6.13, the HZ value is a kernel configuration 
> parameter  and  can  be 100, 250 (the default) ...", so the 10
> milliseconds is not the most common effective resolution nowadays.
> I propose the corresponding patch for pgsleep.c, but we have a similar
> statement in doc/.../config.sgml. I think It should be fixed too.

Fixing both places sounds adapted to me.  An alternative we could use
here is just to say something like that:
The effective resolution is only 1/HZ, which can be configured with
kernel parameter (see man 7 time), and is 4 milliseconds by
default.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190722010543.GB1757@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 7)
  2019-07-21 05:28 Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
  2019-07-22 01:05 ` Re: Fix typos and inconsistencies for HEAD (take 7) Michael Paquier <michael@paquier.xyz>
@ 2019-07-22 04:14   ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-07-22 05:00     ` Re: Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
  1 sibling, 1 reply; 25+ messages in thread

From: Tom Lane @ 2019-07-22 04:14 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Alexander Lakhin <exclusion@gmail.com>; pgsql-hackers

Michael Paquier <michael@paquier.xyz> writes:
> On Sun, Jul 21, 2019 at 08:28:53AM +0300, Alexander Lakhin wrote:
>> And another finding is related to the sleep effective resolution. `man 7
>> time` says "Since kernel 2.6.13, the HZ value is a kernel configuration 
>> parameter  and  can  be 100, 250 (the default) ...", so the 10
>> milliseconds is not the most common effective resolution nowadays.
>> I propose the corresponding patch for pgsleep.c, but we have a similar
>> statement in doc/.../config.sgml. I think It should be fixed too.

> Fixing both places sounds adapted to me.  An alternative we could use
> here is just to say something like that:
> The effective resolution is only 1/HZ, which can be configured with
> kernel parameter (see man 7 time), and is 4 milliseconds by
> default.

Whatever we say here is going to be a lie on some platforms.

Probably best just to say that the sleep resolution is platform-dependent
and leave it at that.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 7)
  2019-07-21 05:28 Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
  2019-07-22 01:05 ` Re: Fix typos and inconsistencies for HEAD (take 7) Michael Paquier <michael@paquier.xyz>
  2019-07-22 04:14   ` Re: Fix typos and inconsistencies for HEAD (take 7) Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-07-22 05:00     ` Alexander Lakhin <exclusion@gmail.com>
  0 siblings, 0 replies; 25+ messages in thread

From: Alexander Lakhin @ 2019-07-22 05:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers

Hello Tom,
22.07.2019 7:14, Tom Lane wrote:
>> Fixing both places sounds adapted to me.  An alternative we could use
>> here is just to say something like that:
>> The effective resolution is only 1/HZ, which can be configured with
>> kernel parameter (see man 7 time), and is 4 milliseconds by
>> default.
> Whatever we say here is going to be a lie on some platforms.
>
> Probably best just to say that the sleep resolution is platform-dependent
> and leave it at that.
I think, we can say "on many systems"/ "on most Unixen", and it would
not be a lie.
In my opinion, while a generic reference to platform-dependency is OK
for developer' documentation, it makes the following passage in
config.sgml vague (we don't give user a hint, what "the effective
resolution" can be - several seconds/milliseconds/nanoseconds?):
/The default value is 200 milliseconds (<literal>200ms</literal>). Note
that on many systems, the//
//effective resolution of sleep delays is 10 milliseconds; setting//
//<varname>bgwriter_delay</varname> to a value that is not a multiple of
10//
//might have the same results as setting it to the next higher multiple
of 10. /
->
/The default value is 200 milliseconds (<literal>200ms</literal>). Note
that the//
//effective resolution of sleep delays is paltform-dependent. setting//
//<varname>bgwriter_delay</varname> to a value that is not a multiple of
the effective resolution,/
/might have the same results as setting it to the next higher multiple./

Best regards,
Alexander

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 7)
  2019-07-21 05:28 Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
  2019-07-22 01:05 ` Re: Fix typos and inconsistencies for HEAD (take 7) Michael Paquier <michael@paquier.xyz>
@ 2019-07-22 04:31   ` Alexander Lakhin <exclusion@gmail.com>
  1 sibling, 0 replies; 25+ messages in thread

From: Alexander Lakhin @ 2019-07-22 04:31 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers

Hello Michael,
22.07.2019 4:05, Michael Paquier wrote:
>> Also, I found e-mail headers in optimizer/plan/README not relevant, so I
>> propose to remove them.
> Not sure about that part.
I agree that the proposed fix is not complete, but just raises the
demand for a subsequent fix.
If you don't mind, I would return to such questionable and aside items
after finishing with the unicums en masse.

Best regards.
Alexander





^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Fix typos and inconsistencies for HEAD (take 8)
@ 2019-07-28 04:44 Alexander Lakhin <exclusion@gmail.com>
  2019-07-29 03:39 ` Re: Fix typos and inconsistencies for HEAD (take 8) Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-07-28 04:44 UTC (permalink / raw)
  To: pgsql-hackers; michael@paquier.xyz

Hello hackers,

Please consider fixing the next set of typos and inconsistencies in the
tree:
8.1. LABORT -> LIKE_ABORT
8.2. LagTrackerWriter -> LagTrackerWrite
8.3. lag_with_offset_and_default, * ->
window_lag_with_offset_and_default, window_* (in windowfuncs.c)
8.4. language-name -> language_name
8.5. lastOverflowedXID -> lastOverflowedXid
8.6. last_processed -> last_processing
8.7. last-query -> last_query
8.8. lastsysoid -> datlastsysoid
8.9. lastUsedPage -> lastUsedPages
8.10. lbv -> lbsv
8.11. leafSegment -> leafSegmentInfo
8.12. LibraryName/SymbolName -> remove (orphaned after f9143d10)
8.13. licence -> license
8.14. LINE_ALLOC -> remove (orphaned since 12ee6ec7)
8.15. local_ip_addr, local_port_addr -> remove and update a comment
(orphaned since b4cea00a)
8.16. local_passwd.c -> update a comment (see
http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/passwd/local_passwd.c.diff?r1=1.19&r2=1.20
)
8.17. localTransactionid -> localTransactionId
8.18. LocalTransactionID -> localTransactionId
8.19. LOCKDEF_H_ -> LOCKDEFS_H_
8.20. LOCK_H -> LOCK_H_
8.21. lockid -> lock
8.22. LOGICAL_PROTO_VERSION_NUM, PGLOGICAL_PROTO_MIN_VERSION_NUM ->
LOGICALREP_PROTO_VERSION_NUM, LOGICALREP_PROTO_MIN_VERSION_NUM
8.23. LOGICALREP_PROTO_H -> LOGICAL_PROTO_H
8.24. LogicalRewriteHeapCheckpoint -> CheckPointLogicalRewriteHeap
8.25. log_snap_interval_ms -> LOG_SNAPSHOT_INTERVAL_MS
8.26. from LVT -> form LVT
8.27. lwlockMode -> lwWaitMode
8.28. LWLockWait -> LWLockWaitForVar
8.29. MacroAssert -> AssertMacro
8.30. maintainer-check -> remove (orphaned after 5dd41f35)
8.31. manip.c -> remove (not present since PG95-1_01)
8.32. markleftchild -> markfollowright
8.33. mask_page_lsn -> mask_page_lsn_and_checksum
8.34. mdfd_seg_fds -> md_seg_fds
8.35. md_update -> px_md_update
8.36. meg -> 1 MB
8.37. MIGRATOR_API_VERSION -> remove (orphaned after 6f56b41a)
8.38. min_apply_delay -> recovery_min_apply_delay
8.39. min_multi -> cutoff_multi
8.40. minwg -> mingw
8.41. missingok -> missing_ok
8.42. mksafefunc/mkunsafefunc -> mkfunc (orphaned after 1f474d29)
8.43. MSG000001.bin -> MSG00001.bin
8.44. MSPACE -> MSSPACE
8.45. mtransfunc -> mtransfn
8.46. MULTI_QUERY -> PORTAL_MULTI_QUERY
8.47. MultixactId -> MultiXactId
8.48. MVDistinctItem -> MVNDistinctItem

In passing, I found a legacy script, FAQ2txt, that should be deleted as
unusable.

Best regards,
Alexander

Attachments:

  [text/x-patch] fixes_8.1-10.patch (8.8K, ../../b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com/2-fixes_8.1-10.patch)
  download | inline diff:
diff --git a/doc/src/sgml/xplang.sgml b/doc/src/sgml/xplang.sgml
index d215ce82d0..60e0430751 100644
--- a/doc/src/sgml/xplang.sgml
+++ b/doc/src/sgml/xplang.sgml
@@ -137,7 +137,7 @@ CREATE FUNCTION <replaceable>validator_function_name</replaceable>(oid)
      <para>
       Finally, the PL must be declared with the command
 <synopsis>
-CREATE <optional>TRUSTED</optional> LANGUAGE <replaceable>language-name</replaceable>
+CREATE <optional>TRUSTED</optional> LANGUAGE <replaceable>language_name</replaceable>
     HANDLER <replaceable>handler_function_name</replaceable>
     <optional>INLINE <replaceable>inline_function_name</replaceable></optional>
     <optional>VALIDATOR <replaceable>validator_function_name</replaceable></optional> ;
diff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.c
index 2b1662a267..478d4c0d61 100644
--- a/src/backend/access/spgist/spgvacuum.c
+++ b/src/backend/access/spgist/spgvacuum.c
@@ -842,7 +842,7 @@ spgvacuumscan(spgBulkDeleteState *bds)
 		}
 	}
 
-	/* Propagate local lastUsedPage cache to metablock */
+	/* Propagate local lastUsedPages cache to metablock */
 	SpGistUpdateMetaPage(index);
 
 	/*
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index e7a59b0a92..e172dad07f 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2259,7 +2259,7 @@ WalSndLoop(WalSndSendDataCallback send_data)
 				WL_SOCKET_READABLE;
 
 			/*
-			 * Use fresh timestamp, not last_processed, to reduce the chance
+			 * Use fresh timestamp, not last_processing, to reduce the chance
 			 * of reaching wal_sender_timeout before sending a keepalive.
 			 */
 			sleeptime = WalSndComputeSleeptime(GetCurrentTimestamp());
@@ -2666,7 +2666,7 @@ XLogSendPhysical(void)
 	 * very close to together here so that we'll get a later position if it is
 	 * still moving.
 	 *
-	 * Because LagTrackerWriter ignores samples when the LSN hasn't advanced,
+	 * Because LagTrackerWrite ignores samples when the LSN hasn't advanced,
 	 * this gives us a cheap approximation for the WAL flush time for this
 	 * LSN.
 	 *
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index ae6780011b..fadab62950 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -3169,7 +3169,7 @@ DisplayXidCache(void)
  *
  * When we throw away subXIDs from KnownAssignedXids, we need to keep track of
  * that, similarly to tracking overflow of a PGPROC's subxids array.  We do
- * that by remembering the lastOverflowedXID, ie the last thrown-away subXID.
+ * that by remembering the lastOverflowedXid, ie the last thrown-away subXID.
  * As long as that is within the range of interesting XIDs, we have to assume
  * that subXIDs are missing from snapshots.  (Note that subXID overflow occurs
  * on primary when 65th subXID arrives, whereas on standby it occurs when 64th
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 8fcdf82922..ec8fbb9a7d 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -139,7 +139,7 @@ static void array_insert_slice(ArrayType *destArray, ArrayType *origArray,
 							   int *st, int *endp,
 							   int typlen, bool typbyval, char typalign);
 static int	array_cmp(FunctionCallInfo fcinfo);
-static ArrayType *create_array_envelope(int ndims, int *dimv, int *lbv, int nbytes,
+static ArrayType *create_array_envelope(int ndims, int *dimv, int *lbsv, int nbytes,
 										Oid elmtype, int dataoffset);
 static ArrayType *array_fill_internal(ArrayType *dims, ArrayType *lbs,
 									  Datum value, bool isnull, Oid elmtype,
diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c
index 9055a93813..5b322559aa 100644
--- a/src/backend/utils/adt/like_match.c
+++ b/src/backend/utils/adt/like_match.c
@@ -27,7 +27,8 @@
 /*
  *	Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
  *	Rich $alz is now <rsalz@bbn.com>.
- *	Special thanks to Lars Mathiesen <thorinn@diku.dk> for the LABORT code.
+ *	Special thanks to Lars Mathiesen <thorinn@diku.dk> for the
+ *	LIKE_ABORT code.
  *
  *	This code was shamelessly stolen from the "pql" code by myself and
  *	slightly modified :)
diff --git a/src/backend/utils/adt/windowfuncs.c b/src/backend/utils/adt/windowfuncs.c
index aa177df017..506e59afa1 100644
--- a/src/backend/utils/adt/windowfuncs.c
+++ b/src/backend/utils/adt/windowfuncs.c
@@ -75,7 +75,7 @@ rank_up(WindowObject winobj)
 
 
 /*
- * row_number
+ * window_row_number
  * just increment up from 1 until current partition finishes.
  */
 Datum
@@ -90,7 +90,7 @@ window_row_number(PG_FUNCTION_ARGS)
 
 
 /*
- * rank
+ * window_rank
  * Rank changes when key columns change.
  * The new rank number is the current row number.
  */
@@ -111,7 +111,7 @@ window_rank(PG_FUNCTION_ARGS)
 }
 
 /*
- * dense_rank
+ * window_dense_rank
  * Rank increases by 1 when key columns change.
  */
 Datum
@@ -131,7 +131,7 @@ window_dense_rank(PG_FUNCTION_ARGS)
 }
 
 /*
- * percent_rank
+ * window_percent_rank
  * return fraction between 0 and 1 inclusive,
  * which is described as (RK - 1) / (NR - 1), where RK is the current row's
  * rank and NR is the total number of rows, per spec.
@@ -160,7 +160,7 @@ window_percent_rank(PG_FUNCTION_ARGS)
 }
 
 /*
- * cume_dist
+ * window_cume_dist
  * return fraction between 0 and 1 inclusive,
  * which is described as NP / NR, where NP is the number of rows preceding or
  * peers to the current row, and NR is the total number of rows, per spec.
@@ -203,7 +203,7 @@ window_cume_dist(PG_FUNCTION_ARGS)
 }
 
 /*
- * ntile
+ * window_ntile
  * compute an exact numeric value with scale 0 (zero),
  * ranging from 1 (one) to n, per spec.
  */
@@ -329,7 +329,7 @@ leadlag_common(FunctionCallInfo fcinfo,
 }
 
 /*
- * lag
+ * window_lag
  * returns the value of VE evaluated on a row that is 1
  * row before the current row within a partition,
  * per spec.
@@ -341,7 +341,7 @@ window_lag(PG_FUNCTION_ARGS)
 }
 
 /*
- * lag_with_offset
+ * window_lag_with_offset
  * returns the value of VE evaluated on a row that is OFFSET
  * rows before the current row within a partition,
  * per spec.
@@ -353,8 +353,8 @@ window_lag_with_offset(PG_FUNCTION_ARGS)
 }
 
 /*
- * lag_with_offset_and_default
- * same as lag_with_offset but accepts default value
+ * window_lag_with_offset_and_default
+ * same as window_lag_with_offset but accepts default value
  * as its third argument.
  */
 Datum
@@ -364,7 +364,7 @@ window_lag_with_offset_and_default(PG_FUNCTION_ARGS)
 }
 
 /*
- * lead
+ * window_lead
  * returns the value of VE evaluated on a row that is 1
  * row after the current row within a partition,
  * per spec.
@@ -376,7 +376,7 @@ window_lead(PG_FUNCTION_ARGS)
 }
 
 /*
- * lead_with_offset
+ * window_lead_with_offset
  * returns the value of VE evaluated on a row that is OFFSET
  * number of rows after the current row within a partition,
  * per spec.
@@ -388,8 +388,8 @@ window_lead_with_offset(PG_FUNCTION_ARGS)
 }
 
 /*
- * lead_with_offset_and_default
- * same as lead_with_offset but accepts default value
+ * window_lead_with_offset_and_default
+ * same as window_lead_with_offset but accepts default value
  * as its third argument.
  */
 Datum
@@ -399,7 +399,7 @@ window_lead_with_offset_and_default(PG_FUNCTION_ARGS)
 }
 
 /*
- * first_value
+ * window_first_value
  * return the value of VE evaluated on the first row of the
  * window frame, per spec.
  */
@@ -420,7 +420,7 @@ window_first_value(PG_FUNCTION_ARGS)
 }
 
 /*
- * last_value
+ * window_last_value
  * return the value of VE evaluated on the last row of the
  * window frame, per spec.
  */
@@ -441,7 +441,7 @@ window_last_value(PG_FUNCTION_ARGS)
 }
 
 /*
- * nth_value
+ * window_nth_value
  * return the value of VE evaluated on the n-th row from the first
  * row of the window frame, per spec.
  */
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 04d77ad700..09eabfbe5a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2024,7 +2024,7 @@ make_template0(FILE *cmdfd)
 		"CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;\n\n",
 
 		/*
-		 * We use the OID of template0 to determine lastsysoid
+		 * We use the OID of template0 to determine datlastsysoid
 		 */
 		"UPDATE pg_database SET datlastsysoid = "
 		"    (SELECT oid FROM pg_database "
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 3a8cddf4ff..48d4ebdd96 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -2250,7 +2250,7 @@ PQsendDescribe(PGconn *conn, char desc_type, const char *desc_target)
 	/* remember we are doing a Describe */
 	conn->queryclass = PGQUERY_DESCRIBE;
 
-	/* reset last-query string (not relevant now) */
+	/* reset last_query string (not relevant now) */
 	if (conn->last_query)
 	{
 		free(conn->last_query);

  [text/x-patch] fixes_8.11-20.patch (5.4K, ../../b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com/3-fixes_8.11-20.patch)
  download | inline diff:
diff --git a/contrib/pgcrypto/px-crypt.h b/contrib/pgcrypto/px-crypt.h
index 08001a81f5..4efcad40dd 100644
--- a/contrib/pgcrypto/px-crypt.h
+++ b/contrib/pgcrypto/px-crypt.h
@@ -39,7 +39,7 @@
 #define PX_MAX_SALT_LEN		128
 
 /* default rounds for xdes salt */
-/* NetBSD bin/passwd/local_passwd.c has (29 * 25)*/
+/* NetBSD bin/passwd/local_passwd.c had 29 * 25 (in rev. 1.19) */
 #define PX_XDES_ROUNDS		(29 * 25)
 
 /* default for blowfish salt */
diff --git a/doc/src/sgml/custom-scan.sgml b/doc/src/sgml/custom-scan.sgml
index ab9b055d9a..b8963a28eb 100644
--- a/doc/src/sgml/custom-scan.sgml
+++ b/doc/src/sgml/custom-scan.sgml
@@ -83,10 +83,7 @@ typedef struct CustomPath
     by <literal>nodeToString</literal>, so that debugging routines that attempt to
     print the custom path will work as designed.  <structfield>methods</structfield> must
     point to a (usually statically allocated) object implementing the required
-    custom path methods, of which there is currently only one.  The
-    <structfield>LibraryName</structfield> and <structfield>SymbolName</structfield> fields must also
-    be initialized so that the dynamic loader can resolve them to locate the
-    method table.
+    custom path methods, of which there is currently only one.
   </para>
 
   <para>
diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c
index 21de8ed714..e8c34d6b1f 100644
--- a/src/backend/access/gin/gindatapage.c
+++ b/src/backend/access/gin/gindatapage.c
@@ -1371,7 +1371,7 @@ disassembleLeaf(Page page)
 	if (GinPageIsCompressed(page))
 	{
 		/*
-		 * Create a leafSegment entry for each segment.
+		 * Create a leafSegmentInfo entry for each segment.
 		 */
 		seg = GinDataLeafPageGetPostingList(page);
 		segbegin = (Pointer) seg;
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index d7930c077d..1bbaeeebf4 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -1988,7 +1988,7 @@ StartTransaction(void)
 
 	/*
 	 * Advertise it in the proc array.  We assume assignment of
-	 * LocalTransactionID is atomic, and the backendId should be set already.
+	 * localTransactionId is atomic, and the backendId should be set already.
 	 */
 	Assert(MyProc->backendId == vxid.backendId);
 	MyProc->lxid = vxid.localTransactionId;
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 9358219aa6..e2cd5b9f60 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1796,14 +1796,9 @@ interpret_ident_response(const char *ident_response,
 
 
 /*
- *	Talk to the ident server on host "remote_ip_addr" and find out who
- *	owns the tcp connection from his port "remote_port" to port
- *	"local_port_addr" on host "local_ip_addr".  Return the user name the
- *	ident server gives as "*ident_user".
- *
- *	IP addresses and port numbers are in network byte order.
- *
- *	But iff we're unable to get the information from ident, return false.
+ *	Talk to the ident server on port->raddr and find out who
+ *	owns the tcp connection to port->laddr.
+ *	It the username successfully retrieved, check the usermap.
  *
  *	XXX: Using WaitLatchOrSocket() and doing a CHECK_FOR_INTERRUPTS() if the
  *	latch was set would improve the responsiveness to timeouts/cancellations.
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index 25b7e314af..01ddffec40 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -99,7 +99,7 @@ InitRecoveryTransactionEnvironment(void)
 	 * Lock a virtual transaction id for Startup process.
 	 *
 	 * We need to do GetNextLocalTransactionId() because
-	 * SharedInvalBackendInit() leaves localTransactionid invalid and the lock
+	 * SharedInvalBackendInit() leaves localTransactionId invalid and the lock
 	 * manager doesn't like that at all.
 	 *
 	 * Note that we don't need to run XactLockTableInsert() because nobody
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index 390ea0a939..ff17804723 100644
--- a/src/bin/pg_controldata/pg_controldata.c
+++ b/src/bin/pg_controldata/pg_controldata.c
@@ -4,7 +4,7 @@
  * reads the data from $PGDATA/global/pg_control
  *
  * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
- * licence: BSD
+ * license: BSD
  *
  * src/bin/pg_controldata/pg_controldata.c
  */
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index ca6a9efd9c..7516b5b881 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -19,7 +19,6 @@
 #define USER_NAME_SIZE		128
 
 #define MAX_STRING			1024
-#define LINE_ALLOC			4096
 #define QUERY_ALLOC			8192
 
 #define MIGRATOR_API_VERSION	1
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index 986bb6433a..6efb7a9648 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -594,4 +594,4 @@ extern void VirtualXactLockTableInsert(VirtualTransactionId vxid);
 extern void VirtualXactLockTableCleanup(void);
 extern bool VirtualXactLock(VirtualTransactionId vxid, bool wait);
 
-#endif							/* LOCK_H */
+#endif							/* LOCK_H_ */
diff --git a/src/include/storage/lockdefs.h b/src/include/storage/lockdefs.h
index 3c2c47dc6a..bda08edcfd 100644
--- a/src/include/storage/lockdefs.h
+++ b/src/include/storage/lockdefs.h
@@ -56,4 +56,4 @@ typedef struct xl_standby_lock
 	Oid			relOid;			/* OID of table */
 } xl_standby_lock;
 
-#endif							/* LOCKDEF_H_ */
+#endif							/* LOCKDEFS_H_ */

  [text/x-patch] fixes_8.21-30.patch (7.1K, ../../b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com/4-fixes_8.21-30.patch)
  download | inline diff:
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 321af38b0c..dc3f207e1c 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -23,7 +23,7 @@ standard_targets = all install installdirs uninstall distprep clean distclean ma
 # these targets should recurse even into subdirectories not being built:
 standard_always_targets = distprep clean distclean maintainer-clean
 
-.PHONY: $(standard_targets) install-strip html man installcheck-parallel maintainer-check
+.PHONY: $(standard_targets) install-strip html man installcheck-parallel
 
 # make `all' the default target
 all:
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 72a448ad31..4d4264fef3 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -787,7 +787,7 @@ raw_heap_insert(RewriteState state, HeapTuple tup)
  * Instead we simply write the mapping files out to disk, *before* the
  * XLogInsert() is performed. That guarantees that either the XLogInsert() is
  * inserted after the checkpoint's redo pointer or that the checkpoint (via
- * LogicalRewriteHeapCheckpoint()) has flushed the (partial) mapping file to
+ * CheckPointLogicalRewriteHeap()) has flushed the (partial) mapping file to
  * disk. That leaves the tail end that has not yet been flushed open to
  * corruption, which is solved by including the current offset in the
  * xl_heap_rewrite_mapping records and truncating the mapping file to it
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index da3d250986..b20daa66d5 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1796,14 +1796,14 @@ WaitXLogInsertionsToFinish(XLogRecPtr upto)
 		do
 		{
 			/*
-			 * See if this insertion is in progress. LWLockWait will wait for
-			 * the lock to be released, or for the 'value' to be set by a
-			 * LWLockUpdateVar call.  When a lock is initially acquired, its
-			 * value is 0 (InvalidXLogRecPtr), which means that we don't know
-			 * where it's inserting yet.  We will have to wait for it.  If
-			 * it's a small insertion, the record will most likely fit on the
-			 * same page and the inserter will release the lock without ever
-			 * calling LWLockUpdateVar.  But if it has to sleep, it will
+			 * See if this insertion is in progress.  LWLockWaitForVar will
+			 * wait for the lock to be released, or for the 'value' to be set
+			 * by a LWLockUpdateVar call.  When a lock is initially acquired,
+			 * its value is 0 (InvalidXLogRecPtr), which means that we don't
+			 * know where it's inserting yet.  We will have to wait for it.
+			 * If it's a small insertion, the record will most likely fit on
+			 * the same page and the inserter will release the lock without
+			 * ever calling LWLockUpdateVar.  But if it has to sleep, it will
 			 * advertise the insertion point with LWLockUpdateVar before
 			 * sleeping.
 			 */
diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c
index e6b6c549de..8ec16a3fb8 100644
--- a/src/backend/postmaster/bgwriter.c
+++ b/src/backend/postmaster/bgwriter.c
@@ -291,10 +291,10 @@ BackgroundWriterMain(void)
 		 * significantly bigger than BgWriterDelay, so we don't complicate the
 		 * overall timeout handling but just assume we're going to get called
 		 * often enough even if hibernation mode is active. It's not that
-		 * important that log_snap_interval_ms is met strictly. To make sure
-		 * we're not waking the disk up unnecessarily on an idle system we
-		 * check whether there has been any WAL inserted since the last time
-		 * we've logged a running xacts.
+		 * important that LOG_SNAPSHOT_INTERVAL_MS is met strictly. To make
+		 * sure we're not waking the disk up unnecessarily on an idle system
+		 * we check whether there has been any WAL inserted since the last
+		 * time we've logged a running xacts.
 		 *
 		 * We do this logging in the bgwriter as it is the only process that
 		 * is run regularly and returns to its mainloop all the time. E.g.
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index bc1aa88322..c77d47c01c 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -232,7 +232,7 @@ LOG_LWDEBUG(const char *where, LWLock *lock, const char *msg)
 
 static void init_lwlock_stats(void);
 static void print_lwlock_stats(int code, Datum arg);
-static lwlock_stats * get_lwlock_stats_entry(LWLock *lockid);
+static lwlock_stats * get_lwlock_stats_entry(LWLock *lock);
 
 static void
 init_lwlock_stats(void)
diff --git a/src/common/unicode_norm.c b/src/common/unicode_norm.c
index 6281f2222f..89c5533212 100644
--- a/src/common/unicode_norm.c
+++ b/src/common/unicode_norm.c
@@ -178,7 +178,7 @@ recompose_code(uint32 start, uint32 code, uint32 *result)
 			 ((start - SBASE) % TCOUNT) == 0 &&
 			 code >= TBASE && code < (TBASE + TCOUNT))
 	{
-		/* make syllable of from LVT */
+		/* make syllable of form LVT */
 		uint32		tindex = code - TBASE;
 
 		*result = start + tindex;
diff --git a/src/include/replication/logicalproto.h b/src/include/replication/logicalproto.h
index 9c0000cc59..3fc430af01 100644
--- a/src/include/replication/logicalproto.h
+++ b/src/include/replication/logicalproto.h
@@ -19,8 +19,8 @@
 /*
  * Protocol capabilities
  *
- * LOGICAL_PROTO_VERSION_NUM is our native protocol and the greatest version
- * we can support. PGLOGICAL_PROTO_MIN_VERSION_NUM is the oldest version we
+ * LOGICALREP_PROTO_VERSION_NUM is our native protocol and the greatest version
+ * we can support. LOGICALREP_PROTO_MIN_VERSION_NUM is the oldest version we
  * have backwards compatibility for. The client requests protocol version at
  * connect time.
  */
@@ -106,4 +106,4 @@ extern LogicalRepRelation *logicalrep_read_rel(StringInfo in);
 extern void logicalrep_write_typ(StringInfo out, Oid typoid);
 extern void logicalrep_read_typ(StringInfo out, LogicalRepTyp *ltyp);
 
-#endif							/* LOGICALREP_PROTO_H */
+#endif							/* LOGICAL_PROTO_H */
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 34b68ad0e0..4ef6d8ddd4 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -306,7 +306,7 @@ typedef PageHeaderData *PageHeader;
  * This is intended to catch use of the pointer before page initialization.
  * It is implemented as a function due to the limitations of the MSVC
  * compiler, which choked on doing all these tests within another macro.  We
- * return true so that MacroAssert() can be used while still getting the
+ * return true so that AssertMacro() can be used while still getting the
  * specifics from the macro failure within this function.
  */
 static inline bool
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index 08e0dc8144..f627dfedc5 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -133,7 +133,7 @@ typedef enum LWLockMode
 {
 	LW_EXCLUSIVE,
 	LW_SHARED,
-	LW_WAIT_UNTIL_FREE			/* A special mode used in PGPROC->lwlockMode,
+	LW_WAIT_UNTIL_FREE			/* A special mode used in PGPROC->lwWaitMode,
 								 * when waiting for lock to become free. Not
 								 * to be used as LWLockAcquire argument */
 } LWLockMode;

  [text/x-patch] fixes_8.31-40.patch (5.4K, ../../b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com/5-fixes_8.31-40.patch)
  download | inline diff:
diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c
index 7d8951cda4..eed0f6ad2d 100644
--- a/contrib/pgcrypto/pgp-decrypt.c
+++ b/contrib/pgcrypto/pgp-decrypt.c
@@ -355,7 +355,7 @@ mdc_finish(PGP_Context *ctx, PullFilter *src, int len)
 	if (len != 20)
 		return PXE_PGP_CORRUPT_DATA;
 
-	/* mdc_read should not call md_update */
+	/* mdc_read should not call px_md_update */
 	ctx->in_mdc_pkt = 1;
 
 	/* read data */
diff --git a/src/backend/access/common/bufmask.c b/src/backend/access/common/bufmask.c
index ee1c6f234a..bcd9bd007b 100644
--- a/src/backend/access/common/bufmask.c
+++ b/src/backend/access/common/bufmask.c
@@ -20,7 +20,7 @@
 #include "access/bufmask.h"
 
 /*
- * mask_page_lsn
+ * mask_page_lsn_and_checksum
  *
  * In consistency checks, the LSN of the two pages compared will likely be
  * different because of concurrent operations when the WAL is generated and
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 4d4264fef3..a17508a82f 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -237,7 +237,7 @@ static void logical_end_heap_rewrite(RewriteState state);
  * new_heap		new, locked heap relation to insert tuples to
  * oldest_xmin	xid used by the caller to determine which tuples are dead
  * freeze_xid	xid before which tuples will be frozen
- * min_multi	multixact before which multis will be removed
+ * cutoff_multi	multixact before which multis will be removed
  * use_wal		should the inserts to the new heap be WAL-logged?
  *
  * Returns an opaque RewriteState, allocated in current memory context,
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b20daa66d5..27341ae026 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6024,7 +6024,10 @@ recoveryApplyDelay(XLogReaderState *record)
 		TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime,
 							&secs, &microsecs);
 
-		/* NB: We're ignoring waits below min_apply_delay's resolution. */
+		/*
+		 * NB: We're ignoring waits below recovery_min_apply_delay's
+		 * resolution.
+		 */
 		if (secs <= 0 && microsecs / 1000 <= 0)
 			break;
 
diff --git a/src/backend/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c
index 17f54410a0..d733aa4826 100644
--- a/src/backend/commands/operatorcmds.c
+++ b/src/backend/commands/operatorcmds.c
@@ -27,9 +27,6 @@
  *		"create operator":
  *				operators
  *
- *		Most of the parse-tree manipulation routines are defined in
- *		commands/manip.c.
- *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 52136ad558..07f3c93d3f 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -731,7 +731,7 @@ mdwrite(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
  *	mdnblocks() -- Get the number of blocks stored in a relation.
  *
  *		Important side effect: all active segments of the relation are opened
- *		and added to the mdfd_seg_fds array.  If this routine has not been
+ *		and added to the md_seg_fds array.  If this routine has not been
  *		called, then only segments up to the last one actually touched
  *		are present in the array.
  */
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index 6e4a343439..6b63d6f85d 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -915,7 +915,7 @@ AllocSetAlloc(MemoryContext context, Size size)
 
 		/*
 		 * We could be asking for pretty big blocks here, so cope if malloc
-		 * fails.  But give up if there's less than a meg or so available...
+		 * fails.  But give up if there's less than 1 MB or so available...
 		 */
 		while (block == NULL && blksize > 1024 * 1024)
 		{
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 3a9a65d31d..068b65a2af 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -1725,7 +1725,7 @@ pgwin32_doRunAsService(void)
 /*
  * Mingw headers are incomplete, and so are the libraries. So we have to load
  * a whole lot of API functions dynamically. Since we have to do this anyway,
- * also load the couple of functions that *do* exist in minwg headers but not
+ * also load the couple of functions that *do* exist in mingw headers but not
  * on NT4. That way, we don't break on NT4.
  */
 typedef BOOL (WINAPI * __CreateRestrictedToken) (HANDLE, DWORD, DWORD, PSID_AND_ATTRIBUTES, DWORD, PLUID_AND_ATTRIBUTES, DWORD, PSID_AND_ATTRIBUTES, PHANDLE);
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 7516b5b881..57c4ed6913 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -21,8 +21,6 @@
 #define MAX_STRING			1024
 #define QUERY_ALLOC			8192
 
-#define MIGRATOR_API_VERSION	1
-
 #define MESSAGE_WIDTH		60
 
 #define GET_MAJOR_VERSION(v)	((v) / 100)
diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h
index 0488d01c9b..acebe6c93b 100644
--- a/src/include/access/gist_private.h
+++ b/src/include/access/gist_private.h
@@ -417,7 +417,7 @@ extern bool gistplacetopage(Relation rel, Size freespace, GISTSTATE *giststate,
 							OffsetNumber oldoffnum, BlockNumber *newblkno,
 							Buffer leftchildbuf,
 							List **splitinfo,
-							bool markleftchild,
+							bool markfollowright,
 							Relation heapRel,
 							bool is_build);
 

  [text/x-patch] fixes_8.41-48.patch (5.2K, ../../b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com/6-fixes_8.41-48.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml
index ca0e9db8b1..644657dd5e 100644
--- a/doc/src/sgml/ref/create_aggregate.sgml
+++ b/doc/src/sgml/ref/create_aggregate.sgml
@@ -211,7 +211,7 @@ CREATE [ OR REPLACE ] AGGREGATE <replaceable class="parameter">name</replaceable
    as described in <xref linkend="xaggr-moving-aggregates"/>.  This requires
    specifying the <literal>MSFUNC</literal>, <literal>MINVFUNC</literal>,
    and <literal>MSTYPE</literal> parameters, and optionally
-   the <literal>MSPACE</literal>, <literal>MFINALFUNC</literal>,
+   the <literal>MSSPACE</literal>, <literal>MFINALFUNC</literal>,
    <literal>MFINALFUNC_EXTRA</literal>, <literal>MFINALFUNC_MODIFY</literal>,
    and <literal>MINITCOND</literal> parameters.  Except for <literal>MINVFUNC</literal>,
    these parameters work like the corresponding simple-aggregate parameters
diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c
index 7cab039ded..201242e796 100644
--- a/src/backend/catalog/pg_aggregate.c
+++ b/src/backend/catalog/pg_aggregate.c
@@ -733,7 +733,7 @@ AggregateCreate(const char *aggName,
 	 * Create dependencies for the aggregate (above and beyond those already
 	 * made by ProcedureCreate).  Note: we don't need an explicit dependency
 	 * on aggTransType since we depend on it indirectly through transfn.
-	 * Likewise for aggmTransType using the mtransfunc, if it exists.
+	 * Likewise for aggmTransType using the mtransfn, if it exists.
 	 *
 	 * If we're replacing an existing definition, ProcedureCreate deleted all
 	 * our existing dependencies, so we have to do the same things here either
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index fc1e1564a6..95881a8550 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -1854,7 +1854,7 @@ get_db_info(const char *name, LOCKMODE lockmode,
 				/* limit of frozen XIDs */
 				if (dbFrozenXidP)
 					*dbFrozenXidP = dbform->datfrozenxid;
-				/* minimum MultixactId */
+				/* minimum MultiXactId */
 				if (dbMinMultiP)
 					*dbMinMultiP = dbform->datminmxid;
 				/* default tablespace for this database */
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index 1ed2838ad4..d3b8afa35c 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -1023,9 +1023,10 @@ FillPortalStore(Portal portal, bool isTopLevel)
 
 			/*
 			 * Run the portal to completion just as for the default
-			 * MULTI_QUERY case, but send the primary query's output to the
-			 * tuplestore.  Auxiliary query outputs are discarded.  Set the
-			 * portal's holdSnapshot to the snapshot used (or a copy of it).
+			 * PORTAL_MULTI_QUERY case, but send the primary query's output
+			 * to the tuplestore.  Auxiliary query outputs are discarded.
+			 * Set the portal's holdSnapshot to the snapshot used
+			 * (or a copy of it).
 			 */
 			PortalRunMulti(portal, isTopLevel, true,
 						   treceiver, None_Receiver, completionTag);
diff --git a/src/bin/pgevent/README b/src/bin/pgevent/README
index 3d0329ec33..10ec8d2d62 100644
--- a/src/bin/pgevent/README
+++ b/src/bin/pgevent/README
@@ -3,7 +3,7 @@ src/bin/pgevent/README
 pgevent
 =======
 
-MSG000001.bin is a binary file, result of Microsoft MC compiler. MC compiler
+MSG00001.bin is a binary file, result of Microsoft MC compiler. MC compiler
 can be downloaded for free with MS Core SDK but it is not included with MSYS
 tools and I didn't find an alternative way to compile MC file.
 
diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h
index 28bf21153d..154c8157ee 100644
--- a/src/include/commands/dbcommands.h
+++ b/src/include/commands/dbcommands.h
@@ -26,7 +26,7 @@ extern Oid	AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTop
 extern Oid	AlterDatabaseSet(AlterDatabaseSetStmt *stmt);
 extern ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId);
 
-extern Oid	get_database_oid(const char *dbname, bool missingok);
+extern Oid	get_database_oid(const char *dbname, bool missing_ok);
 extern char *get_database_name(Oid dbid);
 
 extern void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype);
diff --git a/src/include/statistics/statistics.h b/src/include/statistics/statistics.h
index cb7bc630e9..3b7da3be60 100644
--- a/src/include/statistics/statistics.h
+++ b/src/include/statistics/statistics.h
@@ -22,7 +22,7 @@
 #define STATS_NDISTINCT_MAGIC		0xA352BFA4	/* struct identifier */
 #define STATS_NDISTINCT_TYPE_BASIC	1	/* struct version */
 
-/* MVDistinctItem represents a single combination of columns */
+/* MVNDistinctItem represents a single combination of columns */
 typedef struct MVNDistinctItem
 {
 	double		ndistinct;		/* ndistinct value for this combination */
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 2db13d3030..c480999c51 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -2091,7 +2091,7 @@ plperlu_validator(PG_FUNCTION_ARGS)
 
 
 /*
- * Uses mksafefunc/mkunsafefunc to create a subroutine whose text is
+ * Uses mkfunc to create a subroutine whose text is
  * supplied in s, and returns a reference to it
  */
 static void

  [text/x-patch] delete_FAQ2txt.patch (323B, ../../b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com/7-delete_FAQ2txt.patch)
  download | inline diff:
diff --git a/src/tools/FAQ2txt b/src/tools/FAQ2txt
deleted file mode 100755
index ab61d4d5f8..0000000000
--- a/src/tools/FAQ2txt
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# src/tools/FAQ2txt:
-
-# Converts doc/src/FAQ/FAQ.html to text file doc/FAQ
-
-lynx -force_html -dont_wrap_pre -dump -hiddenlinks=ignore -nolist "$@"

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 8)
  2019-07-28 04:44 Fix typos and inconsistencies for HEAD (take 8) Alexander Lakhin <exclusion@gmail.com>
@ 2019-07-29 03:39 ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-07-29 03:39 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Sun, Jul 28, 2019 at 07:44:44AM +0300, Alexander Lakhin wrote:
> 8.3. lag_with_offset_and_default, * ->
> window_lag_with_offset_and_default, window_* (in windowfuncs.c)

The intention here is to refer to the SQL-visible names.

> In passing, I found a legacy script, FAQ2txt, that should be deleted as
> unusable.

Right.  This got forgotten with the cleanup from f3f45c87 and
bf4497cc.

Applied.  Thanks, as usual.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190729033904.GH6959@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Fix typos and inconsistencies for HEAD (take 9)
@ 2019-08-04 21:33 Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 03:15 ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-08-04 21:33 UTC (permalink / raw)
  To: pgsql-hackers; Michael Paquier <michael@paquier.xyz>

Hello hackers,

Please consider fixing the next truss of typos and inconsistencies in
the tree:

9.1. NAMESPACE_SQLXML -> remove (not used since the introduction in
355e05ab)
9.2. NBXLOG_H -> NBTXLOG_H
9.3. NEWPAGE -> XLOG_FPI (orphaned since 54685338)
9.4. newXlogId, newXlogSeg -> newXlogSegNo (orphaned since dfda6eba)
9.5. nextblno -> nextblkno
9.6. noCatalogs -> arg
9.7. nodeWindowFunc.c -> nodeWindowAgg.c
9.8. NOINHERITS -> NOINHERIT
9.9. NO_RESPONSE -> PQPING_NO_RESPONSE
9.10. Normalizationdata.txt- > NormalizationTest.txt
9.11. NOT_AVAIL -> LOCKACQUIRE_NOT_AVAIL
9.12. not_point -> is_point (a contradiction with the check and a
comment, appeared in 4c1383ef)
9.13. nptrs, ptrs -> nipd, ipd
9.14. nbuffers, nrdatas -> max_block_id, ndatas
9.15. nrow -> nrows
9.16. nsubxcnt -> subxcnt
9.17. ntzones, zp -> zonecount, zpfirst
9.18. nvmblocks -> vm_nblocks
9.19. objAddress -> objAddr
9.20. ObjectWithArg -> ObjectWithArgs
9.21. objOid, relOid -> objectId, classId, subId
9.22. ObjType -> ObjectType
9.23. OffsetNumberMask -> remove (not used since PG95-1_01)
9.24. oid_in_function -> remove (orphaned since 578b2297)
9.25. oidzero, oidge -> remove (not used since the introduction in 8dc42a3a)
9.26. oidle -> remove (orphaned since 9f0ae0c8)
9.27. oideq -> remove (orphaned since 005a1217)
9.28. OldestMemberMXactID -> OldestMemberMXactId
9.29. oldestXidDb -> oldestXactDb
9.30. oldest-Xmin -> oldestXmin
9.31. old_key_tup -> old_key_tuple
9.32. on_dsm_callback -> on_dsm_detach callback
9.33. ONE_PAGE -> TBM_ONE_PAGE
9.34. opt_boolean -> opt_boolean_or_string (renamed in 5c84fe46)
9.35. OptimizableStmt -> PreparableStmt (orphaned since aa83bc04)
9.36. optType -> remove (not used since the introduction in 500b62b0)
9.37. organizationUnitName -> organizationalUnitName (see
https://github.com/openssl/openssl/issues/1843)
9.38. origTupDesc -> origTupdesc
9.39. outputvariables -> output variables
9.40. ovflpgs -> ovflpages
9.41. OWNER_TO -> OWNER TO
9.42. PackedPostingList -> GinPostingList (an inconsistency since 36a35c55)
9.43. PageClearPrunable -> remove (not used since 6f10eb21)
9.44. pageLSN -> curPageLSN
9.45. paramListInfo -> ParamListInfo
9.46. PARSER_FUNC_H -> PARSE_FUNC_H
9.47. parse_hba -> parse_hba_line (renamed in 98723810)
9.48. parse_json -> pg_parse_json
9.49. pathkeys_contain_in -> pathkeys_contained_in
9.50. pattern1 -> pattern
9.51. patters -> patterns
9.52. PerAggData -> WindowStatePerAggData
9.53. PerFuncData -> WindowStatePerFuncData
9.54. pgaddtup -> this function
9.55. pg_atomic_test_and_set_flag -> pg_atomic_test_set_flag
9.56. pg_binary_read_file -> pg_read_binary_file
9.57. pgcommonfiles -> remove (orphaned since a7301839)
9.58. pgcontrolvalue, xlrecvalue -> oldvalue, newvalue
9.59. pg_dlsym -> dlsym (orphaned since 842cb9fa)
9.60. pg_encconv_tbl -> pg_enc2name_tbl (orphaned since eb335a03)
9.61. PGgetline -> PQgetline
9.62. pghackers -> pgsql-hackers
9.63. _pg_keysequal -> remove (not used since d26e1eba)
9.64. pg_language_metadata -> pg_largeobject_metadata
9.65. pgp_armor -> pg_armor
9.66. PGresTuple -> PGresult tuple
9.67. pgstat_recv_resetshared -> pgstat_recv_resetsharedcounter
9.68. pgtypes_date_months_short -> months (abbreviations)
9.69. PgXact -> MyPgXact
9.70. PlaceholderVars -> PlaceHolderVars
9.71. placeToPage -> beginPlaceToPage
9.72. PLpgSQL_dynfors -> PLpgSQL_stmt_dynfors
9.73. plpgsql_init -> _PG_init (orphaned since b09bfcaa)
9.74. PLy_munge_source -> PLy_procedure_munge_source
9.75. Point-in-Time -> Point-In-Time
9.76. PO_FILES, ALL_PO_FILES -> remove (orphaned since 4e1c7207, 5dd41f35)
9.77. pop_size -> pool_size
9.78. posid -> ip_posid, blkid -> ip_blkid
9.79. pq_close, pq_comm_reset -> socket_close, socket_comm_reset
(renamed in 2bd9e412)
9.80. pqcomprim.c -> pqformat.c (orphaned since 95cc41b)
9.81. PQescapeByte()a -> PQescapeBytea()
9.82. PQSetenv -> pqSetenv
9.83. PreCommit_CheckForSerializableConflicts ->
PreCommit_CheckForSerializationFailure
9.84. PREFER -> remove (not used since the introduction in 7bcc6d98)
9.85. prepared_transactions -> prepared-transactions
9.86. pressurel -> pressure
9.87. prettyprint -> pretty-print
9.88. PRETTY_SCHEMA -> remove (not used since the introduction in 3d2aed66)
9.89. printAttName, terseOutput, width -> PrintAttNames, TerseOutput,
colWidth
9.90. priorWALFileName -> remove (not used since the introduction in
51be14e9)
9.91. PROC_H -> _PROC_H_
9.92. ProcLWLockTranche -> remove (orphaned since 3761fe3c and
non-informational)
9.93. PUTBYTE -> remove (not used since the introduction in 0c0dde61)
9.94. px_hmac_block_size, px_hmac_reset -> remove (not used since the
introduction in df24cb73)
9.95. PX_MAX_NAMELEN -> remove (not used since 3cc86612)

Also, please fix my typo (from the previous set), that was somehow
silted through a double check.

Best regards,
Alexander

Attachments:

  [text/x-patch] fix_for_fix_8.15.patch (633B, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/2-fix_for_fix_8.15.patch)
  download | inline diff:
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5fb1f1b7d7..3713dd2884 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1797,7 +1797,7 @@ interpret_ident_response(const char *ident_response,
 /*
  *	Talk to the ident server on "remote_addr" and find out who
  *	owns the tcp connection to "local_addr"
- *	It the username successfully retrieved, check the usermap.
+ *	If the username successfully retrieved, check the usermap.
  *
  *	XXX: Using WaitLatchOrSocket() and doing a CHECK_FOR_INTERRUPTS() if the
  *	latch was set would improve the responsiveness to timeouts/cancellations.

  [text/x-patch] fixes_9.1-10.patch (5.9K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/3-fixes_9.1-10.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml
index 0ef6eb9a9c..9ab0d6af04 100644
--- a/doc/src/sgml/ref/set_role.sgml
+++ b/doc/src/sgml/ref/set_role.sgml
@@ -70,7 +70,7 @@ RESET ROLE
    effectively drops all the privileges assigned directly to the session user
    and to the other roles it is a member of, leaving only the privileges
    available to the named role.  On the other hand, if the session user role
-   has the <literal>NOINHERITS</literal> attribute, <command>SET ROLE</command> drops the
+   has the <literal>NOINHERIT</literal> attribute, <command>SET ROLE</command> drops the
    privileges assigned directly to the session user and instead acquires the
    privileges available to the named role.
   </para>
diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c
index d7b7098110..86e7210acb 100644
--- a/src/backend/access/hash/hash_xlog.c
+++ b/src/backend/access/hash/hash_xlog.c
@@ -706,7 +706,7 @@ hash_xlog_squeeze_page(XLogReaderState *record)
 
 		/*
 		 * if the page on which are adding tuples is a page previous to freed
-		 * overflow page, then update its nextblno.
+		 * overflow page, then update its nextblkno.
 		 */
 		if (xldata->is_prev_bucket_same_wrt)
 		{
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index d0b9013caf..b30cf9e989 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -657,7 +657,7 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
 	/* XLOG stuff */
 	if (wstate->btws_use_wal)
 	{
-		/* We use the heap NEWPAGE record type for this */
+		/* We use the XLOG_FPI record type for this */
 		log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
 	}
 
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 5e629d29ea..f5b477be2b 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -227,7 +227,6 @@ const TableFuncRoutine XmlTableRoutine =
 /* from SQL/XML:2008 section 4.9 */
 #define NAMESPACE_XSD "http://www.w3.org/2001/XMLSchema"
 #define NAMESPACE_XSI "http://www.w3.org/2001/XMLSchema-instance"
-#define NAMESPACE_SQLXML "http://standards.iso.org/iso/9075/2003/sqlxml"
 
 
 #ifdef USE_LIBXML
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index 9d9c33d78c..74063ebf2f 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -934,8 +934,8 @@ RewriteControlFile(void)
  *
  * On entry, ControlFile.checkPointCopy.redo and ControlFile.xlog_seg_size
  * are assumed valid (note that we allow the old xlog seg size to differ
- * from what we're using).  On exit, newXlogId and newXlogSeg are set to
- * suitable values for the beginning of replacement WAL (in our seg size).
+ * from what we're using).  On exit, newXlogSegNo is set to suitable
+ * value for the beginning of replacement WAL (in our seg size).
  */
 static void
 FindEndOfXLOG(void)
diff --git a/src/common/unicode/norm_test.c b/src/common/unicode/norm_test.c
index 421dd4e68e..fee58a184a 100644
--- a/src/common/unicode/norm_test.c
+++ b/src/common/unicode/norm_test.c
@@ -66,7 +66,7 @@ main(int argc, char **argv)
 
 		if (pg_wcscmp(test->output, result) != 0)
 		{
-			printf("FAILURE (Normalizationdata.txt line %d):\n", test->linenum);
+			printf("FAILURE (NormalizationTest.txt line %d):\n", test->linenum);
 			printf("input:\t%s\n", print_wchar_str(test->input));
 			printf("expected:\t%s\n", print_wchar_str(test->output));
 			printf("got\t%s\n", print_wchar_str(result));
diff --git a/src/include/access/nbtxlog.h b/src/include/access/nbtxlog.h
index 9beccc86ea..afa614da25 100644
--- a/src/include/access/nbtxlog.h
+++ b/src/include/access/nbtxlog.h
@@ -259,4 +259,4 @@ extern void btree_desc(StringInfo buf, XLogReaderState *record);
 extern const char *btree_identify(uint8 info);
 extern void btree_mask(char *pagedata, BlockNumber blkno);
 
-#endif							/* NBXLOG_H */
+#endif							/* NBTXLOG_H */
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index ac2bfaff1e..9c25a805f2 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.h
@@ -87,7 +87,7 @@ extern void RangeVarCallbackOwnsTable(const RangeVar *relation,
 									  Oid relId, Oid oldRelId, void *arg);
 
 extern void RangeVarCallbackOwnsRelation(const RangeVar *relation,
-										 Oid relId, Oid oldRelId, void *noCatalogs);
+										 Oid relId, Oid oldRelId, void *arg);
 extern bool PartConstraintImpliedByRelConstraint(Relation scanrel,
 												 List *partConstraint);
 
diff --git a/src/include/executor/execExpr.h b/src/include/executor/execExpr.h
index 8e7f7c3d13..d21dbead0a 100644
--- a/src/include/executor/execExpr.h
+++ b/src/include/executor/execExpr.h
@@ -576,7 +576,7 @@ typedef struct ExprEvalStep
 		/* for EEOP_WINDOW_FUNC */
 		struct
 		{
-			/* out-of-line state, modified by nodeWindowFunc.c */
+			/* out-of-line state, modified by nodeWindowAgg.c */
 			WindowFuncExprState *wfstate;
 		}			window_func;
 
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index a329ebbf93..d262b57021 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -3732,8 +3732,8 @@ internal_ping(PGconn *conn)
 	 * PQPING_NO_RESPONSE.  This result could be somewhat misleading for a
 	 * pre-7.4 server, since it won't send back a SQLSTATE, but those are long
 	 * out of support.  Another corner case where the server could return a
-	 * failure without a SQLSTATE is fork failure, but NO_RESPONSE isn't
-	 * totally unreasonable for that anyway.  We expect that every other
+	 * failure without a SQLSTATE is fork failure, but PQPING_NO_RESPONSE
+	 * isn't totally unreasonable for that anyway.  We expect that every other
 	 * failure case in a modern server will produce a report with a SQLSTATE.
 	 *
 	 * NOTE: whenever we get around to making libpq generate SQLSTATEs for

  [text/x-patch] fixes_9.11-20.patch (6.5K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/4-fixes_9.11-20.patch)
  download | inline diff:
diff --git a/contrib/earthdistance/earthdistance--1.1.sql b/contrib/earthdistance/earthdistance--1.1.sql
index 9136a54a7b..543338aff3 100644
--- a/contrib/earthdistance/earthdistance--1.1.sql
+++ b/contrib/earthdistance/earthdistance--1.1.sql
@@ -28,7 +28,7 @@ AS 'SELECT ''6378168''::float8';
 -- centered about the origin with the radius of the earth.
 
 CREATE DOMAIN earth AS cube
-  CONSTRAINT not_point check(cube_is_point(value))
+  CONSTRAINT is_point check(cube_is_point(value))
   CONSTRAINT not_3d check(cube_dim(value) <= 3)
   CONSTRAINT on_surface check(abs(cube_distance(value, '(0)'::cube) /
   earth() - 1) < '10e-7'::float8);
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 033aeb2556..06a205877d 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -2794,7 +2794,7 @@ estimate_path_cost_size(PlannerInfo *root,
 
 			/*
 			 * Back into an estimate of the number of retrieved rows.  Just in
-			 * case this is nuts, clamp to at most nrow.
+			 * case this is nuts, clamp to at most nrows.
 			 */
 			retrieved_rows = clamp_row_est(rows / fpinfo->local_conds_sel);
 			retrieved_rows = Min(retrieved_rows, nrows);
diff --git a/src/backend/access/heap/visibilitymap.c b/src/backend/access/heap/visibilitymap.c
index 64dfe06b26..a08922b079 100644
--- a/src/backend/access/heap/visibilitymap.c
+++ b/src/backend/access/heap/visibilitymap.c
@@ -124,7 +124,7 @@
 
 /* prototypes for internal routines */
 static Buffer vm_readbuf(Relation rel, BlockNumber blkno, bool extend);
-static void vm_extend(Relation rel, BlockNumber nvmblocks);
+static void vm_extend(Relation rel, BlockNumber vm_nblocks);
 
 
 /*
diff --git a/src/backend/access/transam/README b/src/backend/access/transam/README
index ad4083eb6b..b5a2cb2de8 100644
--- a/src/backend/access/transam/README
+++ b/src/backend/access/transam/README
@@ -530,7 +530,7 @@ void XLogResetInsertion(void)
     construction workspace.  This is only needed if you have already called
     XLogBeginInsert(), but decide to not insert the record after all.
 
-void XLogEnsureRecordSpace(int max_block_id, int nrdatas)
+void XLogEnsureRecordSpace(int max_block_id, int ndatas)
 
     Normally, the WAL record construction buffers have the following limits:
 
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index 0e1015962d..20abbb3b55 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -134,7 +134,7 @@ LookupOperName(ParseState *pstate, List *opername, Oid oprleft, Oid oprright,
 /*
  * LookupOperWithArgs
  *		Like LookupOperName, but the argument types are specified by
- *		a ObjectWithArg node.
+ *		a ObjectWithArgs node.
  */
 Oid
 LookupOperWithArgs(ObjectWithArgs *oper, bool noError)
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index e8ffa0492f..5fa3d7323e 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -1381,7 +1381,7 @@ ReorderBufferCopySnap(ReorderBuffer *rb, Snapshot orig_snap,
 	snap->subxip[i++] = txn->xid;
 
 	/*
-	 * nsubxcnt isn't decreased when subtransactions abort, so count manually.
+	 * subxcnt isn't decreased when subtransactions abort, so count manually.
 	 * Since it's an upper boundary it is safe to use it for the allocation
 	 * above.
 	 */
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 1b7053cb1c..98bb6921a3 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -995,9 +995,9 @@ LockAcquireExtended(const LOCKTAG *locktag,
 		Assert(status == STATUS_FOUND);
 
 		/*
-		 * We can't acquire the lock immediately.  If caller specified no
-		 * blocking, remove useless table entries and return NOT_AVAIL without
-		 * waiting.
+		 * We can't acquire the lock immediately.  If caller specified
+		 * no blocking, remove useless table entries and return
+		 * LOCKACQUIRE_NOT_AVAIL without waiting.
 		 */
 		if (dontWait)
 		{
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h
index afb3e15721..cd83f5fe8f 100644
--- a/src/include/access/gin_private.h
+++ b/src/include/access/gin_private.h
@@ -443,7 +443,7 @@ extern void ginInsertCleanup(GinState *ginstate, bool full_clean,
 
 /* ginpostinglist.c */
 
-extern GinPostingList *ginCompressPostingList(const ItemPointer ptrs, int nptrs,
+extern GinPostingList *ginCompressPostingList(const ItemPointer ipd, int nipd,
 											  int maxsize, int *nwritten);
 extern int	ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int totalsize, TIDBitmap *tbm);
 
diff --git a/src/include/access/xloginsert.h b/src/include/access/xloginsert.h
index df24089ea4..eeb0412b66 100644
--- a/src/include/access/xloginsert.h
+++ b/src/include/access/xloginsert.h
@@ -42,7 +42,7 @@
 extern void XLogBeginInsert(void);
 extern void XLogSetRecordFlags(uint8 flags);
 extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info);
-extern void XLogEnsureRecordSpace(int nbuffers, int ndatas);
+extern void XLogEnsureRecordSpace(int max_block_id, int ndatas);
 extern void XLogRegisterData(char *data, int len);
 extern void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags);
 extern void XLogRegisterBlock(uint8 block_id, RelFileNode *rnode,
diff --git a/src/include/commands/extension.h b/src/include/commands/extension.h
index c724430aec..02fc17d7c0 100644
--- a/src/include/commands/extension.h
+++ b/src/include/commands/extension.h
@@ -43,7 +43,7 @@ extern ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner,
 extern ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt);
 
 extern ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt,
-													ObjectAddress *objAddress);
+													ObjectAddress *objAddr);
 
 extern Oid	get_extension_oid(const char *extname, bool missing_ok);
 extern char *get_extension_name(Oid ext_oid);
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index c27fb456d0..7a5a313c5f 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -146,7 +146,7 @@ static char lowerit(char);
 static void mkdirs(char const *, bool);
 static void newabbr(const char *abbr);
 static zic_t oadd(zic_t t1, zic_t t2);
-static void outzone(const struct zone *zp, ptrdiff_t ntzones);
+static void outzone(const struct zone *zpfirst, ptrdiff_t zonecount);
 static zic_t rpytime(const struct rule *rp, zic_t wantedy);
 static void rulesub(struct rule *rp,
 					const char *loyearp, const char *hiyearp,

  [text/x-patch] fixes_9.21-30.patch (4.4K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/5-fixes_9.21-30.patch)
  download | inline diff:
diff --git a/contrib/sepgsql/sepgsql.h b/contrib/sepgsql/sepgsql.h
index 7197e3cdf0..4787934650 100644
--- a/contrib/sepgsql/sepgsql.h
+++ b/contrib/sepgsql/sepgsql.h
@@ -271,7 +271,7 @@ extern void sepgsql_avc_init(void);
  */
 extern char *sepgsql_get_client_label(void);
 extern void sepgsql_init_client_label(void);
-extern char *sepgsql_get_label(Oid relOid, Oid objOid, int32 subId);
+extern char *sepgsql_get_label(Oid classId, Oid objectId, int32 subId);
 
 extern void sepgsql_object_relabel(const ObjectAddress *object,
 								   const char *seclabel);
diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c
index 34c74d96f8..595c860aaa 100644
--- a/src/backend/access/transam/clog.c
+++ b/src/backend/access/transam/clog.c
@@ -92,7 +92,7 @@ static int	ZeroCLOGPage(int pageno, bool writeXlog);
 static bool CLOGPagePrecedes(int page1, int page2);
 static void WriteZeroPageXlogRec(int pageno);
 static void WriteTruncateXlogRec(int pageno, TransactionId oldestXact,
-								 Oid oldestXidDb);
+								 Oid oldestXactDb);
 static void TransactionIdSetPageStatus(TransactionId xid, int nsubxids,
 									   TransactionId *subxids, XidStatus status,
 									   XLogRecPtr lsn, int pageno,
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index 2e169dd3f9..7b2448e05b 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -282,7 +282,7 @@ typedef struct MultiXactStateData
 } MultiXactStateData;
 
 /*
- * Last element of OldestMemberMXactID and OldestVisibleMXactId arrays.
+ * Last element of OldestMemberMXactId and OldestVisibleMXactId arrays.
  * Valid elements are (1..MaxOldestSlot); element 0 is never used.
  */
 #define MaxOldestSlot	(MaxBackends + max_prepared_xacts)
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index caf48cefa9..ce8a4e927d 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -530,7 +530,7 @@ static const ObjectPropertyType ObjectProperty[] =
 
 /*
  * This struct maps the string object types as returned by
- * getObjectTypeDescription into ObjType enum values.  Note that some enum
+ * getObjectTypeDescription into ObjectType enum values.  Note that some enum
  * values can be obtained by different names, and that some string object types
  * do not have corresponding values in the output enum.  The user of this map
  * must be careful to test for invalid values being returned.
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 4f04d122c3..3aeef30b28 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -176,7 +176,6 @@ typedef struct CopyStateData
 	 * Working state for COPY FROM
 	 */
 	AttrNumber	num_defaults;
-	FmgrInfo	oid_in_function;
 	FmgrInfo   *in_functions;	/* array of input functions for each attrs */
 	Oid		   *typioparams;	/* array of element types for in_functions */
 	int		   *defmap;			/* array of default att numbers */
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index e7b379dfda..046bb04732 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -847,7 +847,7 @@ get_all_vacuum_rels(int options)
 }
 
 /*
- * vacuum_set_xid_limits() -- compute oldest-Xmin and freeze cutoff points
+ * vacuum_set_xid_limits() -- compute oldestXmin and freeze cutoff points
  *
  * The output parameters are:
  * - oldestXmin is the cutoff value used to distinguish whether tuples are
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index ccf2153fac..dfba58ac58 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -18,10 +18,6 @@
 
 
 #define oidcmp(x,y) ( ((x) < (y) ? -1 : ((x) > (y)) ?  1 : 0) )
-#define oideq(x,y) ( (x) == (y) )
-#define oidle(x,y) ( (x) <= (y) )
-#define oidge(x,y) ( (x) >= (y) )
-#define oidzero(x) ( (x) == 0 )
 
 /*
  * The data structures used to store system catalog information.  Every
diff --git a/src/include/storage/off.h b/src/include/storage/off.h
index 82655d1466..02e663f6ed 100644
--- a/src/include/storage/off.h
+++ b/src/include/storage/off.h
@@ -26,7 +26,6 @@ typedef uint16 OffsetNumber;
 #define InvalidOffsetNumber		((OffsetNumber) 0)
 #define FirstOffsetNumber		((OffsetNumber) 1)
 #define MaxOffsetNumber			((OffsetNumber) (BLCKSZ / sizeof(ItemIdData)))
-#define OffsetNumberMask		(0xffff)	/* valid uint16 bits */
 
 /* ----------------
  *		support macros

  [text/x-patch] fixes_9.31-40.patch (5.4K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/6-fixes_9.31-40.patch)
  download | inline diff:
diff --git a/doc/src/sgml/sslinfo.sgml b/doc/src/sgml/sslinfo.sgml
index 0fde0fc10e..78ff83d642 100644
--- a/doc/src/sgml/sslinfo.sgml
+++ b/doc/src/sgml/sslinfo.sgml
@@ -185,7 +185,7 @@ countryName (alias C)
 localityName (alias L)
 stateOrProvinceName (alias ST)
 organizationName (alias O)
-organizationUnitName (alias OU)
+organizationalUnitName (alias OU)
 title
 description
 initials
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 94309949fa..e33f019939 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -74,7 +74,7 @@ static HeapTuple heap_prepare_insert(Relation relation, HeapTuple tup,
 									 TransactionId xid, CommandId cid, int options);
 static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf,
 								  Buffer newbuf, HeapTuple oldtup,
-								  HeapTuple newtup, HeapTuple old_key_tup,
+								  HeapTuple newtup, HeapTuple old_key_tuple,
 								  bool all_visible_cleared, bool new_all_visible_cleared);
 static Bitmapset *HeapDetermineModifiedColumns(Relation relation,
 											   Bitmapset *interesting_cols,
diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c
index b6c618aa00..9c93e415f1 100644
--- a/src/backend/commands/define.c
+++ b/src/backend/commands/define.c
@@ -139,7 +139,7 @@ defGetBoolean(DefElem *def)
 
 				/*
 				 * The set of strings accepted here should match up with the
-				 * grammar's opt_boolean production.
+				 * grammar's opt_boolean_or_string production.
 				 */
 				if (pg_strcasecmp(sval, "true") == 0)
 					return true;
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index c12b613763..7e0a041fab 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -143,7 +143,7 @@ PrepareQuery(PrepareStmt *stmt, const char *queryString,
 	}
 
 	/*
-	 * grammar only allows OptimizableStmt, so this check should be redundant
+	 * grammar only allows PreparableStmt, so this check should be redundant
 	 */
 	switch (query->commandType)
 	{
diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c
index bf53459996..23905a9c35 100644
--- a/src/backend/nodes/tidbitmap.c
+++ b/src/backend/nodes/tidbitmap.c
@@ -1021,7 +1021,7 @@ tbm_iterate(TBMIterator *iterator)
 		PagetableEntry *page;
 		int			ntuples;
 
-		/* In ONE_PAGE state, we don't allocate an spages[] array */
+		/* In TBM_ONE_PAGE state, we don't allocate an spages[] array */
 		if (tbm->status == TBM_ONE_PAGE)
 			page = &tbm->entry1;
 		else
diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c
index 4c245d1f85..551515960d 100644
--- a/src/backend/storage/ipc/shm_mq.c
+++ b/src/backend/storage/ipc/shm_mq.c
@@ -1251,7 +1251,7 @@ shm_mq_inc_bytes_written(shm_mq *mq, Size n)
 						pg_atomic_read_u64(&mq->mq_bytes_written) + n);
 }
 
-/* Shim for on_dsm_callback. */
+/* Shim for on_dsm_detach callback. */
 static void
 shm_mq_detach_callback(dsm_segment *seg, Datum arg)
 {
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index f9b1ae6809..40a6b3745c 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -54,8 +54,6 @@
 
 static void usage(const char *progname);
 
-typedef struct option optType;
-
 int
 main(int argc, char **argv)
 {
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h
index afb3e15721..9345052bff 100644
--- a/src/include/access/gin_private.h
+++ b/src/include/access/gin_private.h
@@ -54,7 +54,7 @@ typedef struct GinState
 	bool		oneCol;			/* true if single-column index */
 
 	/*
-	 * origTupDesc is the nominal tuple descriptor of the index, ie, the i'th
+	 * origTupdesc is the nominal tuple descriptor of the index, ie, the i'th
 	 * attribute shows the key type (not the input data type!) of the i'th
 	 * index column.  In a single-column index this describes the actual leaf
 	 * index tuples.  In a multi-column index, the actual leaf tuples contain
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index 107c3d01ae..f16eebeee2 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -252,8 +252,8 @@ typedef struct HashMetaPageData
 	uint32		hashm_maxbucket;	/* ID of maximum bucket in use */
 	uint32		hashm_highmask; /* mask to modulo into entire table */
 	uint32		hashm_lowmask;	/* mask to modulo into lower half of table */
-	uint32		hashm_ovflpoint;	/* splitpoint from which ovflpgs being
-									 * allocated */
+	uint32		hashm_ovflpoint;	/* splitpoint from which ovflpage
+								* being allocated */
 	uint32		hashm_firstfree;	/* lowest-number free ovflpage (bit#) */
 	uint32		hashm_nmaps;	/* number of bitmap pages */
 	RegProcedure hashm_procid;	/* hash function id from pg_proc */
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 4e2016c7ae..de5c43a460 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -2062,8 +2062,9 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
 	/*------
 	 * create a list of variables
 	 *
-	 * The variables are listed with input variables preceding outputvariables
-	 * The end of each group is marked by an end marker. per variable we list:
+	 * The variables are listed with input variables preceding output
+	 * variables.  The end of each group is marked by an end marker.
+	 * Per variable we list:
 	 *
 	 * type - as defined in ecpgtype.h
 	 * value - where to store the data

  [text/x-patch] fixes_9.41-50.patch (5.3K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/7-fixes_9.41-50.patch)
  download | inline diff:
diff --git a/src/backend/access/gin/README b/src/backend/access/gin/README
index 838fdc0d63..76c12ae2f6 100644
--- a/src/backend/access/gin/README
+++ b/src/backend/access/gin/README
@@ -270,7 +270,7 @@ is stored in the higher bits. That requires 43 bits in total, which
 conveniently fits in at most 6 bytes.
 
 A compressed posting list is passed around and stored on disk in a
-PackedPostingList struct. The first item in the list is stored uncompressed
+GinPostingList struct. The first item in the list is stored uncompressed
 as a regular ItemPointerData, followed by the length of the list in bytes,
 followed by the packed items.
 
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 4e0c500a22..1d3b022b34 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -74,7 +74,7 @@ gistkillitems(IndexScanDesc scan)
 
 	/*
 	 * Mark all killedItems as dead. We need no additional recheck, because,
-	 * if page was modified, pageLSN must have changed.
+	 * if page was modified, curPageLSN must have changed.
 	 */
 	for (i = 0; i < so->numKilled; i++)
 	{
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index f5d56138ee..cf4387e40f 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -144,7 +144,7 @@ EstimateParamListSpace(ParamListInfo paramLI)
 }
 
 /*
- * Serialize a paramListInfo structure into caller-provided storage.
+ * Serialize a ParamListInfo structure into caller-provided storage.
  *
  * We write the number of parameters first, as a 4-byte integer, and then
  * write details for each parameter in turn.  The details for each parameter
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 8f51f59f8a..dacd757c24 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -4242,7 +4242,7 @@ consider_groupingsets_paths(PlannerInfo *root,
 		 * 2) If there are no empty sets and only unsortable sets, then the
 		 * rollups list will be empty (and thus l_start == NULL), and
 		 * group_pathkeys will be NIL; we must ensure that the vacuously-true
-		 * pathkeys_contain_in test doesn't cause us to crash.
+		 * pathkeys_contained_in test doesn't cause us to crash.
 		 */
 		if (l_start != NULL &&
 			pathkeys_contained_in(root->group_pathkeys, path->pathkeys))
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 09eabfbe5a..9c303e9cc4 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1295,7 +1295,7 @@ setup_config(void)
 		err = WSAStartup(MAKEWORD(2, 2), &wsaData);
 #endif
 
-		/* for best results, this code should match parse_hba() */
+		/* for best results, this code should match parse_hba_line() */
 		hints.ai_flags = AI_NUMERICHOST;
 		hints.ai_family = AF_UNSPEC;
 		hints.ai_socktype = 0;
diff --git a/src/bin/psql/describe.h b/src/bin/psql/describe.h
index 17736c3782..b50c7d209c 100644
--- a/src/bin/psql/describe.h
+++ b/src/bin/psql/describe.h
@@ -31,7 +31,7 @@ extern bool describeOperators(const char *pattern, bool verbose, bool showSystem
 extern bool describeRoles(const char *pattern, bool verbose, bool showSystem);
 
 /* \drds */
-extern bool listDbRoleSettings(const char *pattern1, const char *pattern2);
+extern bool listDbRoleSettings(const char *pattern, const char *pattern2);
 
 /* \z (or \dp) */
 extern bool permissionsList(const char *pattern);
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 3f7001fb69..d40800709b 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1686,7 +1686,7 @@ psql_completion(const char *text, int start, int end)
 
 	/* ALTER LANGUAGE <name> */
 	else if (Matches("ALTER", "LANGUAGE", MatchAny))
-		COMPLETE_WITH("OWNER_TO", "RENAME TO");
+		COMPLETE_WITH("OWNER TO", "RENAME TO");
 
 	/* ALTER LARGE OBJECT <oid> */
 	else if (Matches("ALTER", "LARGE", "OBJECT", MatchAny))
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h
index d1ec2d97f2..5a3b287eaf 100644
--- a/src/include/parser/parse_func.h
+++ b/src/include/parser/parse_func.h
@@ -11,8 +11,8 @@
  *
  *-------------------------------------------------------------------------
  */
-#ifndef PARSER_FUNC_H
-#define PARSER_FUNC_H
+#ifndef PARSE_FUNC_H
+#define PARSE_FUNC_H
 
 #include "catalog/namespace.h"
 #include "parser/parse_node.h"
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 4ef6d8ddd4..f18d703c7a 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -402,8 +402,6 @@ do { \
 		TransactionIdPrecedes(xid, ((PageHeader) (page))->pd_prune_xid)) \
 		((PageHeader) (page))->pd_prune_xid = (xid); \
 } while (0)
-#define PageClearPrunable(page) \
-	(((PageHeader) (page))->pd_prune_xid = InvalidTransactionId)
 
 
 /* ----------------------------------------------------------------
diff --git a/src/include/utils/jsonapi.h b/src/include/utils/jsonapi.h
index 5f4d479a7b..1c56acca55 100644
--- a/src/include/utils/jsonapi.h
+++ b/src/include/utils/jsonapi.h
@@ -94,7 +94,7 @@ typedef struct JsonSemAction
 } JsonSemAction;
 
 /*
- * parse_json will parse the string in the lex calling the
+ * pg_parse_json will parse the string in the lex calling the
  * action functions in sem at the appropriate points. It is
  * up to them to keep what state they need	in semstate. If they
  * need access to the state of the lexer, then its pointer

  [text/x-patch] fixes_9.51-60.patch (5.1K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/8-fixes_9.51-60.patch)
  download | inline diff:
diff --git a/contrib/test_decoding/test_decoding.c b/contrib/test_decoding/test_decoding.c
index a0ded67b9a..6c33c4bded 100644
--- a/contrib/test_decoding/test_decoding.c
+++ b/contrib/test_decoding/test_decoding.c
@@ -24,7 +24,7 @@
 
 PG_MODULE_MAGIC;
 
-/* These must be available to pg_dlsym() */
+/* These must be available to dlsym() */
 extern void _PG_init(void);
 extern void _PG_output_plugin_init(OutputPluginCallbacks *cb);
 
diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c
index 5321762d5e..89876d2ccd 100644
--- a/src/backend/access/hash/hashinsert.c
+++ b/src/backend/access/hash/hashinsert.c
@@ -257,8 +257,8 @@ restart_insert:
  *	_hash_pgaddtup() -- add a tuple to a particular page in the index.
  *
  * This routine adds the tuple to the page as requested; it does not write out
- * the page.  It is an error to call pgaddtup() without pin and write lock on
- * the target buffer.
+ * the page.  It is an error to call this function without pin and write lock
+ * on the target buffer.
  *
  * Returns the offset number at which the tuple was inserted.  This function
  * is responsible for preserving the condition that tuples in a hash index
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index def00cd7c5..ac441a19b8 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -93,7 +93,7 @@ typedef struct WindowStatePerFuncData
 	bool		resulttypeByVal;
 
 	bool		plain_agg;		/* is it just a plain aggregate function? */
-	int			aggno;			/* if so, index of its PerAggData */
+	int			aggno;		/* if so, index of its WindowStatePerAggData */
 
 	WindowObject winobj;		/* object used in window function API */
 }			WindowStatePerFuncData;
@@ -142,7 +142,7 @@ typedef struct WindowStatePerAggData
 				resulttypeByVal,
 				transtypeByVal;
 
-	int			wfuncno;		/* index of associated PerFuncData */
+	int			wfuncno;	/* index of associated WindowStatePerFuncData */
 
 	/* Context holding transition value and possibly other subsidiary data */
 	MemoryContext aggcontext;	/* may be private, or winstate->aggcontext */
diff --git a/src/backend/utils/adt/genfile.c b/src/backend/utils/adt/genfile.c
index f526106530..5d4f26a490 100644
--- a/src/backend/utils/adt/genfile.c
+++ b/src/backend/utils/adt/genfile.c
@@ -325,7 +325,7 @@ pg_read_binary_file(PG_FUNCTION_ARGS)
 
 /*
  * Wrapper functions for the 1 and 3 argument variants of pg_read_file_v2()
- * and pg_binary_read_file().
+ * and pg_read_binary_file().
  *
  * These are necessary to pass the sanity check in opr_sanity, which checks
  * that all built-in functions that share the implementing C function take
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index e23669fb4f..bd8d200982 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -40,7 +40,7 @@
  *
  *	For each block, we maintain pointer to the first free chunk - this is quite
  *	cheap and allows us to skip all the preceding used chunks, eliminating
- *	a significant number of lookups in many common usage patters. In the worst
+ *	a significant number of lookups in many common usage patterns. In the worst
  *	case this performs as if the pointer was not maintained.
  *
  *	We cache the freelist index for the blocks with the fewest free chunks
diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h
index e22bfbf3e6..1433aa3ff7 100644
--- a/src/include/access/commit_ts.h
+++ b/src/include/access/commit_ts.h
@@ -35,7 +35,7 @@ extern Size CommitTsShmemSize(void);
 extern void CommitTsShmemInit(void);
 extern void BootStrapCommitTs(void);
 extern void StartupCommitTs(void);
-extern void CommitTsParameterChange(bool xlrecvalue, bool pgcontrolvalue);
+extern void CommitTsParameterChange(bool newvalue, bool oldvalue);
 extern void CompleteCommitTsInitialization(void);
 extern void ShutdownCommitTs(void);
 extern void CheckPointCommitTs(void);
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index 0339b98041..3e3e6c470e 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -289,7 +289,7 @@ typedef enum pg_enc
 #define PG_ENCODING_BE_LAST PG_KOI8U
 
 /*
- * Please use these tests before access to pg_encconv_tbl[]
+ * Please use these tests before access to pg_enc2name_tbl[]
  * or to other places...
  */
 #define PG_VALID_BE_ENCODING(_enc) \
diff --git a/src/include/port/atomics.h b/src/include/port/atomics.h
index f93009eff5..fab66f8e98 100644
--- a/src/include/port/atomics.h
+++ b/src/include/port/atomics.h
@@ -178,7 +178,7 @@ pg_atomic_init_flag(volatile pg_atomic_flag *ptr)
 }
 
 /*
- * pg_atomic_test_and_set_flag - TAS()
+ * pg_atomic_test_set_flag - TAS()
  *
  * Returns true if the flag has successfully been set, false otherwise.
  *
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm
index 0d3554659b..7d16a36868 100644
--- a/src/tools/msvc/Project.pm
+++ b/src/tools/msvc/Project.pm
@@ -230,7 +230,7 @@ sub AddDir
 				if ($filter eq "LIBOBJS")
 				{
 					no warnings qw(once);
-					if (grep(/$p/, @main::pgportfiles, @main::pgcommonfiles)
+					if (grep(/$p/, @main::pgportfiles)
 						== 1)
 					{
 						$p =~ s/\.c/\.o/;

  [text/x-patch] fixes_9.61-70.patch (6.1K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/9-fixes_9.61-70.patch)
  download | inline diff:
diff --git a/contrib/pgcrypto/pgp-pgsql.c b/contrib/pgcrypto/pgp-pgsql.c
index 0984e01a14..3feadf7b70 100644
--- a/contrib/pgcrypto/pgp-pgsql.c
+++ b/contrib/pgcrypto/pgp-pgsql.c
@@ -761,7 +761,7 @@ pgp_pub_decrypt_text(PG_FUNCTION_ARGS)
  */
 
 /*
- * Helper function for pgp_armor. Converts arrays of keys and values into
+ * Helper function for pg_armor. Converts arrays of keys and values into
  * plain C arrays, and checks that they don't contain invalid characters.
  */
 static int
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index ef2e97afd1..e7295abda2 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -5509,7 +5509,7 @@ int PQendcopy(PGconn *conn);
        It should either be issued when the  last  string  has  been sent
        to  the  server using <xref linkend="libpq-PQputline"/> or when the
        last string has been  received  from  the  server using
-       <function>PGgetline</function>.  It must be issued or the server
+       <function>PQgetline</function>.  It must be issued or the server
        will get <quote>out of sync</quote> with  the client.   Upon return
        from this function, the server is ready to receive the next SQL
        command.  The return value is 0  on  successful  completion,
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 291412e305..88ce37c08d 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -4114,7 +4114,7 @@ pg_largeobject_aclmask_snapshot(Oid lobj_oid, Oid roleid,
 		return mask;
 
 	/*
-	 * Get the largeobject's ACL from pg_language_metadata
+	 * Get the largeobject's ACL from pg_largeobject_metadata
 	 */
 	pg_lo_meta = table_open(LargeObjectMetadataRelationId,
 							AccessShareLock);
diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql
index 9c21ac7c62..c42e76ea89 100644
--- a/src/backend/catalog/information_schema.sql
+++ b/src/backend/catalog/information_schema.sql
@@ -48,10 +48,6 @@ CREATE FUNCTION _pg_expandarray(IN anyarray, OUT x anyelement, OUT n int)
                                         pg_catalog.array_upper($1,1),
                                         1) as g(s)';
 
-CREATE FUNCTION _pg_keysequal(smallint[], smallint[]) RETURNS boolean
-    LANGUAGE sql IMMUTABLE PARALLEL SAFE  -- intentionally not STRICT, to allow inlining
-    AS 'select $1 operator(pg_catalog.<@) $2 and $2 operator(pg_catalog.<@) $1';
-
 /* Given an index's OID and an underlying-table column number, return the
  * column's position in the index (NULL if not there) */
 CREATE FUNCTION _pg_index_position(oid, smallint) RETURNS int
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 8f51f59f8a..2cde93e9ad 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -5177,7 +5177,7 @@ make_group_input_target(PlannerInfo *root, PathTarget *final_target)
  * a regular aggregation node would, plus any aggregates used in HAVING;
  * except that the Aggref nodes should be marked as partial aggregates.
  *
- * In addition, we'd better emit any Vars and PlaceholderVars that are
+ * In addition, we'd better emit any Vars and PlaceHolderVars that are
  * used outside of Aggrefs in the aggregation tlist and HAVING.  (Presumably,
  * these would be Vars that are grouped by or used in grouping expressions.)
  *
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index b4f2b28b51..2bb14cdd02 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -6122,7 +6122,7 @@ pgstat_recv_resetcounter(PgStat_MsgResetcounter *msg, int len)
 }
 
 /* ----------
- * pgstat_recv_resetshared() -
+ * pgstat_recv_resetsharedcounter() -
  *
  *	Reset some shared statistics of the cluster.
  * ----------
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 40fe6ed3d3..47b0517596 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1171,7 +1171,7 @@ AtEOXact_Snapshot(bool isCommit, bool resetXmin)
 
 	/*
 	 * During normal commit processing, we call ProcArrayEndTransaction() to
-	 * reset the PgXact->xmin. That call happens prior to the call to
+	 * reset the MyPgXact->xmin. That call happens prior to the call to
 	 * AtEOXact_Snapshot(), so we need not touch xmin here at all.
 	 */
 	if (resetXmin)
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 507b082acb..80def7d401 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -25,8 +25,8 @@
  *
  * The rule for developers is: if you commit a change that requires
  * an initdb, you should update the catalog version number (as well as
- * notifying the pghackers mailing list, which has been the informal
- * practice for a long time).
+ * notifying the pgsql-hackers mailing list, which has been the
+ * informal practice for a long time).
  *
  * The catalog version number is placed here since modifying files in
  * include/catalog is the most common kind of initdb-forcing change.
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
index 53fcd2157f..9ee460b9a1 100644
--- a/src/interfaces/ecpg/pgtypeslib/datetime.c
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -623,7 +623,7 @@ PGTYPESdate_defmt_asc(date * d, const char *fmt, const char *str)
 
 			/*
 			 * evil[tm] hack: if we read the pgtypes_date_months and haven't
-			 * found a match, reset list to point to pgtypes_date_months_short
+			 * found a match, reset list to point to months (abbreviations)
 			 * and reset the counter variable i
 			 */
 			if (list == pgtypes_date_months)
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index fcf2bc2cab..0fe3e53539 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -169,7 +169,7 @@ struct pg_result
 	int			ntups;
 	int			numAttributes;
 	PGresAttDesc *attDescs;
-	PGresAttValue **tuples;		/* each PGresTuple is an array of
+	PGresAttValue **tuples;		/* each PGresult tuple is an array of
 								 * PGresAttValue's */
 	int			tupArrSize;		/* allocated size of tuples array */
 	int			numParameters;

  [text/x-patch] fixes_9.71-80.patch (5.2K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/10-fixes_9.71-80.patch)
  download | inline diff:
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 47dacee17c..dcfcbae9d9 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -456,7 +456,7 @@ tar -cf backup.tar /usr/local/pgsql/data
  </sect1>
 
  <sect1 id="continuous-archiving">
-  <title>Continuous Archiving and Point-in-Time Recovery (PITR)</title>
+  <title>Continuous Archiving and Point-In-Time Recovery (PITR)</title>
 
   <indexterm zone="backup">
    <primary>continuous archiving</primary>
diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c
index 11a8ed7bbc..4c29261256 100644
--- a/src/backend/access/gin/ginbtree.c
+++ b/src/backend/access/gin/ginbtree.c
@@ -650,7 +650,7 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
 	}
 	else
 	{
-		elog(ERROR, "invalid return code from GIN placeToPage method: %d", rc);
+		elog(ERROR, "invalid return code from GIN beginPlaceToPage method: %d", rc);
 		result = false;			/* keep compiler quiet */
 	}
 
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 384887e70d..d8d863dda2 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -44,8 +44,8 @@
  *		StreamClose			- Close a client/backend connection
  *		TouchSocketFiles	- Protect socket files against /tmp cleaners
  *		pq_init			- initialize libpq at backend startup
- *		pq_comm_reset	- reset libpq during error recovery
- *		pq_close		- shutdown libpq at backend exit
+ *		socket_comm_reset	- reset libpq during error recovery
+ *		socket_close		- shutdown libpq at backend exit
  *
  * low-level I/O:
  *		pq_getbytes		- get a known number of bytes from connection
diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c
index f8b75e6091..0a6bacc2f2 100644
--- a/src/backend/optimizer/geqo/geqo_selection.c
+++ b/src/backend/optimizer/geqo/geqo_selection.c
@@ -91,7 +91,7 @@ geqo_selection(PlannerInfo *root, Chromosome *momma, Chromosome *daddy,
 static int
 linear_rand(PlannerInfo *root, int pool_size, double bias)
 {
-	double		index;			/* index between 0 and pop_size */
+	double		index;			/* index between 0 and pool_size */
 	double		max = (double) pool_size;
 
 	/*
diff --git a/src/include/storage/itemptr.h b/src/include/storage/itemptr.h
index 7eb274adac..d73eed585e 100644
--- a/src/include/storage/itemptr.h
+++ b/src/include/storage/itemptr.h
@@ -22,8 +22,8 @@
  *
  * This is a pointer to an item within a disk page of a known file
  * (for example, a cross-link from an index to its parent table).
- * blkid tells us which block, posid tells us which entry in the linp
- * (ItemIdData) array we want.
+ * ip_blkid tells us which block, ip_posid tells us which entry in
+ * the linp (ItemIdData) array we want.
  *
  * Note: because there is an item pointer in each tuple header and index
  * tuple header on disk, it's very important not to waste space with
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 2d44845ccb..18fec4a173 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -7,7 +7,7 @@
  *		 miscellaneous useful functions
  *
  * The communication routines here are analogous to the ones in
- * backend/libpq/pqcomm.c and backend/libpq/pqcomprim.c, but operate
+ * backend/libpq/pqcomm.c and backend/libpq/pqformat.c, but operate
  * in the considerably different environment of the frontend libpq.
  * In particular, we work with a bare nonblock-mode socket, rather than
  * a stdio stream, so that we can avoid unwanted blocking of the application.
diff --git a/src/nls-global.mk b/src/nls-global.mk
index 5bb77b40eb..f06c91341c 100644
--- a/src/nls-global.mk
+++ b/src/nls-global.mk
@@ -35,8 +35,6 @@ else
 LANGUAGES = $(AVAIL_LANGUAGES)
 endif
 
-PO_FILES = $(addprefix po/, $(addsuffix .po, $(LANGUAGES)))
-ALL_PO_FILES = $(addprefix po/, $(addsuffix .po, $(AVAIL_LANGUAGES)))
 MO_FILES = $(addprefix po/, $(addsuffix .mo, $(LANGUAGES)))
 
 ifdef XGETTEXT
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index 30c7e967df..30246c5329 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -2452,7 +2452,7 @@ delete_function(PLpgSQL_function *func)
 		plpgsql_free_function_memory(func);
 }
 
-/* exported so we can call it from plpgsql_init() */
+/* exported so we can call it from _PG_init() */
 void
 plpgsql_HashTableInit(void)
 {
diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h
index a5a5ef9de7..8b32075df0 100644
--- a/src/pl/plpgsql/src/plpgsql.h
+++ b/src/pl/plpgsql/src/plpgsql.h
@@ -685,7 +685,7 @@ typedef struct PLpgSQL_stmt_fori
 /*
  * PLpgSQL_stmt_forq represents a FOR statement running over a SQL query.
  * It is the common supertype of PLpgSQL_stmt_fors, PLpgSQL_stmt_forc
- * and PLpgSQL_dynfors.
+ * and PLpgSQL_stmt_dynfors.
  */
 typedef struct PLpgSQL_stmt_forq
 {
diff --git a/src/pl/plpython/plpy_procedure.c b/src/pl/plpython/plpy_procedure.c
index 50b07cad82..6e08c03fcd 100644
--- a/src/pl/plpython/plpy_procedure.c
+++ b/src/pl/plpython/plpy_procedure.c
@@ -471,7 +471,7 @@ PLy_procedure_munge_source(const char *name, const char *src)
 	*mp = '\0';
 
 	if (mp > (mrc + mlen))
-		elog(FATAL, "buffer overrun in PLy_munge_source");
+		elog(FATAL, "buffer overrun in PLy_procedure_munge_source");
 
 	return mrc;
 }

  [text/x-patch] fixes_9.81-90.patch (5.6K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/11-fixes_9.81-90.patch)
  download | inline diff:
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index 23f706b21d..031b1b5cd5 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -58,7 +58,6 @@ char	   *triggerPath;		/* where to find the trigger file? */
 char	   *xlogFilePath;		/* where we are going to restore to */
 char	   *nextWALFileName;	/* the file we need to get from archive */
 char	   *restartWALFileName; /* the file from which we can restart restore */
-char	   *priorWALFileName;	/* the file we need to get from archive */
 char		WALFilePath[MAXPGPATH * 2]; /* the file path including archive */
 char		restoreCommand[MAXPGPATH];	/* run this to restore */
 char		exclusiveCleanupFileName[MAXFNAMELEN];	/* the file we need to get
diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c
index 8765af71d4..91078dcd80 100644
--- a/src/backend/regex/regcomp.c
+++ b/src/backend/regex/regcomp.c
@@ -288,7 +288,6 @@ struct vars
 #define NWBDRY	'W'				/* non-word-boundary constraint */
 #define SBEGIN	'A'				/* beginning of string (even if not BOL) */
 #define SEND	'Z'				/* end of string (even if not EOL) */
-#define PREFER	'P'				/* length preference */
 
 /* is an arc colored, and hence on a color chain? */
 #define COLORED(a) \
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 2d709420c3..85a629f4fc 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -364,7 +364,7 @@ static SERIALIZABLEXACT *OldCommittedSxact;
  * These configuration variables are used to set the predicate lock table size
  * and to control promotion of predicate locks to coarser granularity in an
  * attempt to degrade performance (mostly as false positive serialization
- * failure) gracefully in the face of memory pressurel
+ * failure) gracefully in the face of memory pressure.
  */
 int			max_predicate_locks_per_xact;	/* set by guc.c */
 int			max_predicate_locks_per_relation;	/* set by guc.c */
@@ -4809,7 +4809,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader,
 }
 
 /*
- * PreCommit_CheckForSerializableConflicts
+ * PreCommit_CheckForSerializationFailure
  *		Check for dangerous structures in a serializable transaction
  *		at commit.
  *
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 0c58f1f109..3af8bce206 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -98,7 +98,6 @@
 /* macros to test if pretty action needed */
 #define PRETTY_PAREN(context)	((context)->prettyFlags & PRETTYFLAG_PAREN)
 #define PRETTY_INDENT(context)	((context)->prettyFlags & PRETTYFLAG_INDENT)
-#define PRETTY_SCHEMA(context)	((context)->prettyFlags & PRETTYFLAG_SCHEMA)
 
 
 /* ----------
@@ -115,7 +114,7 @@ typedef struct
 	List	   *windowTList;	/* targetlist for resolving WINDOW clause */
 	int			prettyFlags;	/* enabling of pretty-print functions */
 	int			wrapColumn;		/* max line length, or -1 for no limit */
-	int			indentLevel;	/* current indent level for prettyprint */
+	int			indentLevel;	/* current indent level for pretty-print */
 	bool		varprefix;		/* true to print prefixes on Vars */
 	ParseExprKind special_exprkind; /* set only for exprkinds needing special
 									 * handling */
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 48d4ebdd96..b3c59a0992 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -3291,7 +3291,7 @@ PQflush(PGconn *conn)
  *		PQfreemem - safely frees memory allocated
  *
  * Needed mostly by Win32, unless multithreaded DLL (/MD in VC6)
- * Used for freeing memory from PQescapeByte()a/PQunescapeBytea()
+ * Used for freeing memory from PQescapeBytea()/PQunescapeBytea()
  */
 void
 PQfreemem(void *ptr)
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 26198fc1de..039824196c 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -565,10 +565,10 @@ extern void PQdisplayTuples(const PGresult *res,
 
 extern void PQprintTuples(const PGresult *res,
 						  FILE *fout,	/* output stream */
-						  int printAttName, /* print attribute names */
-						  int terseOutput,	/* delimiter bars */
-						  int width);	/* width of column, if 0, use variable
-										 * width */
+						  int PrintAttNames, /* print attribute names */
+						  int TerseOutput,	/* delimiter bars */
+						  int colWidth);	/* width of column, if 0,
+									* use variable width */
 
 
 /* === in fe-lobj.c === */
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index fcf2bc2cab..a0b142b501 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -232,7 +232,8 @@ typedef enum
 	PGQUERY_DESCRIBE			/* Describe Statement or Portal */
 } PGQueryClass;
 
-/* PGSetenvStatusType defines the state of the PQSetenv state machine */
+/* PGSetenvStatusType defines the state of the pqSetenv state machine */
+
 /* (this is used only for 2.0-protocol connections) */
 typedef enum
 {
diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile
index c3c8280ea2..dc22e5ca9d 100644
--- a/src/test/isolation/Makefile
+++ b/src/test/isolation/Makefile
@@ -55,7 +55,7 @@ installcheck: all
 check: all
 	$(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule
 
-# Versions of the check tests that include the prepared_transactions test
+# Versions of the check tests that include the prepared-transactions test
 # It only makes sense to run these if set up to use prepared transactions,
 # via TEMP_CONFIG for the check case, or via the postgresql.conf for the
 # installcheck case.

  [text/x-patch] fixes_9.91-95.patch (2.2K, ../../7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com/12-fixes_9.91-95.patch)
  download | inline diff:
diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h
index cef9c4b456..1f0a93b1d6 100644
--- a/contrib/pgcrypto/px.h
+++ b/contrib/pgcrypto/px.h
@@ -50,9 +50,6 @@ void	   *px_realloc(void *p, size_t s);
 void		px_free(void *p);
 #endif
 
-/* max len of 'type' parms */
-#define PX_MAX_NAMELEN		128
-
 /* max salt returned */
 #define PX_MAX_SALT_LEN		128
 
@@ -210,8 +207,6 @@ void		px_debug(const char *fmt,...) pg_attribute_printf(1, 2);
 #define px_md_free(md)			(md)->free(md)
 
 #define px_hmac_result_size(hmac)	(hmac)->result_size(hmac)
-#define px_hmac_block_size(hmac)	(hmac)->block_size(hmac)
-#define px_hmac_reset(hmac)		(hmac)->reset(hmac)
 #define px_hmac_init(hmac, key, klen)	(hmac)->init(hmac, key, klen)
 #define px_hmac_update(hmac, data, dlen) (hmac)->update(hmac, data, dlen)
 #define px_hmac_finish(hmac, buf)	(hmac)->finish(hmac, buf)
diff --git a/contrib/pgcrypto/sha1.c b/contrib/pgcrypto/sha1.c
index fb6a57d917..64671ac64d 100644
--- a/contrib/pgcrypto/sha1.c
+++ b/contrib/pgcrypto/sha1.c
@@ -59,16 +59,6 @@ static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
 #define BCOUNT	(ctxt->c.b64[0] / 8)
 #define W(n)	(ctxt->m.b32[(n)])
 
-#define PUTBYTE(x) \
-do { \
-	ctxt->m.b8[(COUNT % 64)] = (x);		\
-	COUNT++;				\
-	COUNT %= 64;				\
-	ctxt->c.b64[0] += 8;			\
-	if (COUNT % 64 == 0)			\
-		sha1_step(ctxt);		\
-} while (0)
-
 #define PUTPAD(x) \
 do { \
 	ctxt->m.b8[(COUNT % 64)] = (x);		\
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index fadab62950..469aac38c4 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -265,7 +265,6 @@ CreateSharedProcArray(void)
 							&found);
 	}
 
-	/* Register and initialize fields of ProcLWLockTranche */
 	LWLockRegisterTranche(LWTRANCHE_PROC, "proc");
 }
 
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index ac7ee72952..281e1db725 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -332,4 +332,4 @@ extern PGPROC *AuxiliaryPidGetProc(int pid);
 extern void BecomeLockGroupLeader(void);
 extern bool BecomeLockGroupMember(PGPROC *leader, int pid);
 
-#endif							/* PROC_H */
+#endif							/* _PROC_H_ */

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 9)
  2019-08-04 21:33 Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
@ 2019-08-05 03:15 ` Michael Paquier <michael@paquier.xyz>
  2019-08-05 03:44   ` Re: Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 05:33   ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
  0 siblings, 2 replies; 25+ messages in thread

From: Michael Paquier @ 2019-08-05 03:15 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Mon, Aug 05, 2019 at 12:33:34AM +0300, Alexander Lakhin wrote:
> 9.1. NAMESPACE_SQLXML -> remove (not used since the introduction in
> 355e05ab)

Looks important to keep as a matter of documentation.

> 9.12. not_point -> is_point (a contradiction with the check and a
> comment, appeared in 4c1383ef)

That would mean a breakage for anybody relying on it, so I would not
change that.

> 9.17. ntzones, zp -> zonecount, zpfirst

Nope, this is upstream code.

> 9.41. OWNER_TO -> OWNER TO

This one needs a back-patch.  I'll fix that separately.

> 9.43. PageClearPrunable -> remove (not used since 6f10eb21)

Better to keep it.  Some extensions may rely on it, and it costs
nothing to keep around.

> 9.75. Point-in-Time -> Point-In-Time

Why?  The original looks correct to me.

> 9.76. PO_FILES, ALL_PO_FILES -> remove (orphaned since 4e1c7207, 5dd41f35)

I am wondering if there are external things relying on that.  So I
have let them.

> 9.88. PRETTY_SCHEMA -> remove (not used since the introduction in 3d2aed66)

This should be kept for consistent IMO.  Even if not used yet, it
could be used for future patches.

> 9.94. px_hmac_block_size, px_hmac_reset -> remove (not used since the
> introduction in df24cb73)

Hm.  I think that it makes sense to keep them for consistency with the
other structures and callback reference lookups, and these macros may
prove to be useful for future patches.

> Also, please fix my typo (from the previous set), that was somehow
> silted through a double check.

Which one is that, please?  It is likely possible that some obvious
stuff has been forgotten.

Committed a large bunch of this stuff.  Please note that the
indentation was incorrect in a couple of places, including the change
in src/tools/msvc/.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190805031521.GA1740@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 9)
  2019-08-04 21:33 Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 03:15 ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
@ 2019-08-05 03:44   ` Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 05:40     ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-08-05 03:44 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers

Hello Michael,

05.08.2019 6:15, Michael Paquier wrote:
>> 9.41. OWNER_TO -> OWNER TO
> This one needs a back-patch.  I'll fix that separately.
>
I believe that all the fixes in doc/ should be back-patched too. If it's
not too late, I can produce such patches for the nearest releases.
>> 9.75. Point-in-Time -> Point-In-Time
> Why?  The original looks correct to me.
acronyms.sgml contains such spelling:
    <term><acronym>PITR</acronym></term>
    <listitem>
     <para>
      <link linkend="continuous-archiving">Point-In-Time
      Recovery</link> (Continuous Archiving)
     </para>
>> Also, please fix my typo (from the previous set), that was somehow
>> silted through a double check.
> Which one is that, please?  It is likely possible that some obvious
> stuff has been forgotten.
"It the username successfully retrieved,..." (fix_for_fix_8.15.patch)
> Committed a large bunch of this stuff.  Please note that the
> indentation was incorrect in a couple of places, including the change
> in src/tools/msvc/.
Thank you. I will check my Tab settings next time.

Best regards,
Alexander

Attachments:

  [text/x-patch] fix_for_fix_8.15.patch (633B, ../../86f078b7-3d3f-ceee-66ad-c1f3a90a6811@gmail.com/3-fix_for_fix_8.15.patch)
  download | inline diff:
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5fb1f1b7d7..3713dd2884 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1797,7 +1797,7 @@ interpret_ident_response(const char *ident_response,
 /*
  *	Talk to the ident server on "remote_addr" and find out who
  *	owns the tcp connection to "local_addr"
- *	It the username successfully retrieved, check the usermap.
+ *	If the username successfully retrieved, check the usermap.
  *
  *	XXX: Using WaitLatchOrSocket() and doing a CHECK_FOR_INTERRUPTS() if the
  *	latch was set would improve the responsiveness to timeouts/cancellations.

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 9)
  2019-08-04 21:33 Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 03:15 ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
  2019-08-05 03:44   ` Re: Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
@ 2019-08-05 05:40     ` Michael Paquier <michael@paquier.xyz>
  2019-08-05 06:30       ` Re: Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  0 siblings, 1 reply; 25+ messages in thread

From: Michael Paquier @ 2019-08-05 05:40 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Mon, Aug 05, 2019 at 06:44:46AM +0300, Alexander Lakhin wrote:
> I believe that all the fixes in doc/ should be back-patched too. If it's
> not too late, I can produce such patches for the nearest releases.

I think that's unfortunately a bit too late for this release.  Those
things have been around for years, so three months to make them appear
on the website is not a big deal IMO.  If you have something which
could be used as a base for back-branches with the most obvious typos,
that would be welcome (if you could group everything into a single
patch file, that would be even better...).
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190805054038.GD1740@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 9)
  2019-08-04 21:33 Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 03:15 ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
  2019-08-05 03:44   ` Re: Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 05:40     ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
@ 2019-08-05 06:30       ` Alexander Lakhin <exclusion@gmail.com>
  0 siblings, 0 replies; 25+ messages in thread

From: Alexander Lakhin @ 2019-08-05 06:30 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-hackers

05.08.2019 8:40, Michael Paquier wrote:
> On Mon, Aug 05, 2019 at 06:44:46AM +0300, Alexander Lakhin wrote:
>> I believe that all the fixes in doc/ should be back-patched too. If it's
>> not too late, I can produce such patches for the nearest releases.
> I think that's unfortunately a bit too late for this release.  Those
> things have been around for years, so three months to make them appear
> on the website is not a big deal IMO.  If you have something which
> could be used as a base for back-branches with the most obvious typos,
> that would be welcome (if you could group everything into a single
> patch file, that would be even better...).
OK, I will make the desired patches for all the supported branches upon
reaching the end of my unique journey.

Best regards,
Alexander





^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 9)
  2019-08-04 21:33 Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
  2019-08-05 03:15 ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
@ 2019-08-05 05:33   ` Michael Paquier <michael@paquier.xyz>
  1 sibling, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-08-05 05:33 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Mon, Aug 05, 2019 at 12:15:21PM +0900, Michael Paquier wrote:
> On Mon, Aug 05, 2019 at 12:33:34AM +0300, Alexander Lakhin wrote:
>> 9.41. OWNER_TO -> OWNER TO
> 
> This one needs a back-patch.  I'll fix that separately.

Done separately as of 05ba837, and back-patched down to 9.6 as this
has been introduced by d37b816.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190805053306.GC1740@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 10)
@ 2019-08-11 08:00 Alexander Lakhin <exclusion@gmail.com>
  2019-08-13 04:56 ` Re: Fix typos and inconsistencies for HEAD (take 10) Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-08-11 08:00 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>

Hello hackers,

Please consider fixing the next heap of typos and inconsistencies in the
tree:

10.1. query_txt -> query text
10.2. quote_object_names -> quote_object_name
10.3. ragetypes_typanalyze.c -> rangetypes_typanalyze.c
10.4. RAISE_EXCEPTION -> ERRCODE_RAISE_EXCEPTION
10.5. rb_lower -> remove (orphaned since introduction in f0e44751)
10.6. rd_newRelfilenode -> rd_newRelfilenodeSubid
10.7. readfs -> readfds
10.8. readInt -> ReadInt
10.9. recoder, dst -> record, page
10.10. recync -> resync
10.11. RedoRecptr -> RedoRecPtr
10.12. referenting -> referencing
10.13. REG_PEND -> remove (orphaned since 7bcc6d98)
10.14. regreesion -> regression
10.15. REG_STARTEND -> remove (not used since the introduction in 985acb8e)
10.16. RelationGetOidIndex -> remove a comment (irrelevant since 578b2297)
10.17. relcheck -> relchecks
10.18. releasebuf -> unlockbuf
10.19. releaseOk -> RELEASE_OK flag
10.20. relevants -> relevant
10.21. relfile -> file
10.22. RelID -> Relation ID
10.23. ReplicationSlotShmemInit -> ReplicationSlotsShmemInit
10.24. res_items -> res_nitems
10.25. restablish -> reestablish
10.26. REWRITE_H -> PRS2LOCK_H
10.27. rfmt.c -> remove (as irrelevant)
10.28. rmbuf -> buf
10.29. RunningXacts -> RunningTransactionsData (and remove a nearby
comment) (orphaned since 8431e296)
10.30. rvsToCluster -> RelToCluster
10.31. s1_delete -> remove (not used since the introduction in 8b21b416)
10.32. s1_reindex, s1_vacuum, s3_vacuum -> remove (not used since the
introduction in 9c2f0a6c)
10.33. s1reset -> s1restart
10.34. s1setval -> remove (not used since the introduction in 3d79013b)
10.35. s2_alter_tbl1_text, s2_alter_tbl1_add_int,
s2_alter_tbl1_add_float, s2_alter_tbl1_add_char,
s2_alter_tbl1_add_boolean, s2_alter_tbl1_add_text, 
s2_alter_tbl2_add_boolean -> remove (not used since the introduction in
b89e1510)
10.36. saop_leftop -> leftop
10.37. ScalarArrayOps -> ScalarArrayOpExprs
10.38. seekPos -> remove (orphaned since c24dcd0c)
10.39. segv -> SIGSEGV
10.40. semphores -> semaphores
10.41. sepgsql_audit_hook -> remove (and remove a comment) (not present
since the introduction in 968bc6fa)
10.42. seqNo -> commitSeqNo
10.43. seqtable -> seqhashtab
10.44. serendipitiously -> serendipitously
10.45. serializefn, deserializefn -> serialfn, deserialfn
10.46. setstmt -> altersysstmt
10.47. serv, servlen, host, hostlen -> service, servicelen, node, nodelen
10.48. server_version_int -> server_version_num
10.49. session_timestamp -> session_timezone
10.50. sigsetmask -> pgsigsetmask
10.51. SimpleLRU -> SimpleLru
10.52. SIXBIT -> PGSIXBIT
10.53. SizeOfHashCreateIdx, xl_hash_createidx -> remove (not used since
the introduction in c11453ce)
10.54. SizeOfXlogRecord -> SizeOfXLogRecord
10.55. sk_flag -> sk_flags
10.56. SLAB_CHUNKHDRSZ -> sizeof(SlabChunk) (orphaned after 7e3aa03b)
10.57. SlotAcquire -> ReplicationSlotAcquire
10.58. SM_DATABASE_USER -> remove (with a wrong nearby comment)
(orphaned since cb7fb3ca)
10.59. smgrscheduleunlink -> RelationDropStorage (orphaned since 33960006)
10.60. SnapBuildProcessRecord -> SnapBuildProcessRunningXacts
10.61. snapshotname -> snapshot_id
10.62. snap_state -> fctx
10.63. SO_EXLUSIVEADDRUSE -> SO_EXCLUSIVEADDRUSE
10.64. sortTuple -> SortTuple
10.65. sourcexid -> sourcevxid
10.66. spcpath -> spclocation
10.67. SPI_plan -> _SPI_plan
10.68. SPI_stack -> _SPI_stack
10.69. splited -> splitted
10.70. sqlcabc -> sqlabc
10.71. standbydef.h -> standbydefs.h
10.72. _StaticAssert -> _Static_assert
10.73. StdRdOption -> StdRdOptions
10.74. StringSortSupport -> VarStringSortSupport
10.75. STrNCpy -> StrNCpy
10.76. stxid -> relid
10.77. subtransactiony -> subtransaction
10.78. subtransations -> subtransactions
10.79. SubtransSetParent -> SubTransSetParent
10.80. succeeeded -> succeeded
10.81. SUE -> ShareUpdateExclusive
10.82. SYMENC_MDC -> SYMENCRYPTED_DATA_MDC
10.83. SYMENCRYPTED_MDC -> SYMENCRYPTED_DATA_MDC
10.84. symkey -> sym_key
10.85. synchroniation -> synchronization
10.86. system_id -> system_identifier
10.87. sysdate -> now()
10.88. SYSTEM_RESEED_* -> remove (orphaned since fe0a0b59)
10.89. http://www.cs.auckland.ac.nz/software/AlgAnim/niemann/s_man.htm
-> https://www.epaperpress.com/sortsearch/
10.90. www.pgbuildfarm.org -> buildfarm.postgresql.org
10.91. oft -> of
10.92. It the username successfully retrieved (fix_for_fix_8.15)

Best regards,
Alexander

Attachments:

  [text/x-patch] fixes_10.1-10.patch (6.3K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/2-fixes_10.1-10.patch)
  download | inline diff:
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index b576676746..054c5d9335 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -166,7 +166,7 @@ pushquery(QPRS_STATE *state, int32 type, int32 val, int32 distance, int32 lenval
 }
 
 /*
- * This function is used for query_txt parsing
+ * This function is used for query text parsing
  */
 static void
 pushval_asis(QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag)
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index 7c97fa398f..f338523b7a 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ -279,7 +279,7 @@ int			pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen);
 
 typedef struct PGP_CFB PGP_CFB;
 int			pgp_cfb_create(PGP_CFB **ctx_p, int algo,
-						   const uint8 *key, int key_len, int recync, uint8 *iv);
+						   const uint8 *key, int key_len, int resync, uint8 *iv);
 void		pgp_cfb_free(PGP_CFB *ctx);
 int			pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
 int			pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 2b6a415093..63a2dd5cc1 100644
--- a/contrib/sepgsql/label.c
+++ b/contrib/sepgsql/label.c
@@ -653,7 +653,7 @@ sepgsql_mcstrans_out(PG_FUNCTION_ARGS)
 }
 
 /*
- * quote_object_names
+ * quote_object_name
  *
  * It tries to quote the supplied identifiers
  */
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index ef1556be8f..7c30b4e28c 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3740,9 +3740,9 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id;
    <para>
     If no condition name nor SQLSTATE is specified in a
     <command>RAISE EXCEPTION</command> command, the default is to use
-    <literal>RAISE_EXCEPTION</literal> (<literal>P0001</literal>).  If no message
-    text is specified, the default is to use the condition name or
-    SQLSTATE as message text.
+    <literal>ERRCODE_RAISE_EXCEPTION</literal> (<literal>P0001</literal>).
+    If no message text is specified, the default is to use the condition
+    name or SQLSTATE as message text.
    </para>
 
    <note>
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 5a29b9673b..46d03f3b9b 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -1514,7 +1514,7 @@ partition_rbound_cmp(int partnatts, FmgrInfo *partsupfunc,
 /*
  * partition_rbound_datum_cmp
  *
- * Return whether range bound (specified in rb_datums, rb_kind, and rb_lower)
+ * Return whether range bound (specified in rb_datums and rb_kind)
  * is <, =, or > partition key of tuple (tuple_datums)
  *
  * n_tuple_datums, partsupfunc and partcollation give number of attributes in
diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c
index 631e421062..d01d3032cc 100644
--- a/src/backend/utils/adt/rangetypes_typanalyze.c
+++ b/src/backend/utils/adt/rangetypes_typanalyze.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * ragetypes_typanalyze.c
+ * rangetypes_typanalyze.c
  *	  Functions for gathering statistics from range columns
  *
  * For a range type column, histograms of lower and upper bounds, and
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 0f40328310..6c739ce663 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -1989,7 +1989,7 @@ WriteInt(ArchiveHandle *AH, int i)
 	 * This is a bit yucky, but I don't want to make the binary format very
 	 * dependent on representation, and not knowing much about it, I write out
 	 * a sign byte. If you change this, don't forget to change the file
-	 * version #, and modify readInt to read the new format AS WELL AS the old
+	 * version #, and modify ReadInt to read the new format AS WELL AS the old
 	 * formats.
 	 */
 
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h
index a12c94cba6..aa9bc63725 100644
--- a/src/include/access/xlogreader.h
+++ b/src/include/access/xlogreader.h
@@ -248,7 +248,7 @@ extern bool DecodeXLogRecord(XLogReaderState *state, XLogRecord *record,
 extern FullTransactionId XLogRecGetFullXid(XLogReaderState *record);
 #endif
 
-extern bool RestoreBlockImage(XLogReaderState *recoder, uint8 block_id, char *dst);
+extern bool RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page);
 extern char *XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len);
 extern bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
 							   RelFileNode *rnode, ForkNumber *forknum,
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index f4841fb397..1cf166a570 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -451,7 +451,7 @@ int			pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen);
 int			pgwin32_listen(SOCKET s, int backlog);
 SOCKET		pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen);
 int			pgwin32_connect(SOCKET s, const struct sockaddr *name, int namelen);
-int			pgwin32_select(int nfds, fd_set *readfs, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
+int			pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
 int			pgwin32_recv(SOCKET s, char *buf, int len, int flags);
 int			pgwin32_send(SOCKET s, const void *buf, int len, int flags);
 int			pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout);
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index b0fe19ebc5..2174bbafd1 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -75,7 +75,7 @@ typedef struct RelationData
 	 * when a relation has multiple new relfilenodes within a single
 	 * transaction, with one of them occurring in a subsequently aborted
 	 * subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
-	 * ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
+	 * ROLLBACK TO save; -- rd_newRelfilenodeSubid is now forgotten
 	 */
 	SubTransactionId rd_createSubid;	/* rel was created in current xact */
 	SubTransactionId rd_newRelfilenodeSubid;	/* new relfilenode assigned in

  [text/x-patch] fixes_10.11-20.patch (5.6K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/3-fixes_10.11-20.patch)
  download | inline diff:
diff --git a/contrib/spi/refint.example b/contrib/spi/refint.example
index d0ff744164..299166d504 100644
--- a/contrib/spi/refint.example
+++ b/contrib/spi/refint.example
@@ -5,7 +5,7 @@ CREATE TABLE A (
 );
 CREATE UNIQUE INDEX AI ON A (ID);
 
---Columns REFB of table B and REFC of C are foreign keys referenting ID of A:
+--Columns REFB of table B and REFC of C are foreign keys referencing ID of A:
 
 CREATE TABLE B (
 	REFB	int4
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index e9ca4b8252..745be4581b 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -37,7 +37,7 @@ static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack,
 							 Buffer leftchild, Buffer rightchild,
 							 bool unlockbuf, bool unlockleftchild);
 static void gistfinishsplit(GISTInsertState *state, GISTInsertStack *stack,
-							GISTSTATE *giststate, List *splitinfo, bool releasebuf);
+							GISTSTATE *giststate, List *splitinfo, bool unlockbuf);
 static void gistprunepage(Relation rel, Page page, Buffer buffer,
 						  Relation heapRel);
 
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index a065419cdb..1af31c2b9f 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -317,13 +317,6 @@ IsSharedRelation(Oid relationId)
  * consecutive existing OIDs.  This is a mostly reasonable assumption for
  * system catalogs.
  *
- * This is exported separately because there are cases where we want to use
- * an index that will not be recognized by RelationGetOidIndex: TOAST tables
- * have indexes that are usable, but have multiple columns and are on
- * ordinary columns rather than a true OID column.  This code will work
- * anyway, so long as the OID is the index's first column.  The caller must
- * pass in the actual heap attnum of the OID column, however.
- *
  * Caller must have a suitable lock on the relation.
  */
 Oid
diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c
index b6145593a3..56568b0105 100644
--- a/src/backend/catalog/pg_constraint.c
+++ b/src/backend/catalog/pg_constraint.c
@@ -580,7 +580,7 @@ RemoveConstraintById(Oid conId)
 		rel = table_open(con->conrelid, AccessExclusiveLock);
 
 		/*
-		 * We need to update the relcheck count if it is a check constraint
+		 * We need to update the relchecks count if it is a check constraint
 		 * being dropped.  This update will force backends to rebuild relcache
 		 * entries when we commit.
 		 */
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 3a9a994733..11446a1056 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1811,7 +1811,7 @@ append_nonpartial_cost(List *subpaths, int numpaths, int parallel_workers)
 		return 0;
 
 	/*
-	 * Array length is number of workers or number of relevants paths,
+	 * Array length is number of workers or number of relevant paths,
 	 * whichever is less.
 	 */
 	arrlen = Min(parallel_workers, numpaths);
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index 11bbe2c397..61544f65ad 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -750,7 +750,7 @@ IsCheckpointOnSchedule(double progress)
 	 * We compare the current WAL insert location against the location
 	 * computed before calling CreateCheckPoint. The code in XLogInsert that
 	 * actually triggers a checkpoint when CheckPointSegments is exceeded
-	 * compares against RedoRecptr, so this is not completely accurate.
+	 * compares against RedoRecPtr, so this is not completely accurate.
 	 * However, it's good enough for our purposes, we're only calculating an
 	 * estimate anyway.
 	 *
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index c77d47c01c..85748dd05e 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -1075,7 +1075,7 @@ LWLockDequeueSelf(LWLock *lock)
 		 */
 
 		/*
-		 * Reset releaseOk if somebody woke us before we removed ourselves -
+		 * Reset RELEASE_OK flag if somebody woke us before we removed ourselves -
 		 * they'll have set it to false.
 		 */
 		pg_atomic_fetch_or_u32(&lock->state, LW_FLAG_RELEASE_OK);
diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h
index dc31899aa4..0caf16982c 100644
--- a/src/include/regex/regex.h
+++ b/src/include/regex/regex.h
@@ -109,7 +109,6 @@ typedef struct
 #define REG_NLSTOP	000100		/* \n doesn't match . or [^ ] */
 #define REG_NLANCH	000200		/* ^ matches after \n, $ before */
 #define REG_NEWLINE 000300		/* newlines are line terminators */
-#define REG_PEND	000400		/* ugh -- backward-compatibility hack */
 #define REG_EXPECT	001000		/* report details on partial/limited matches */
 #define REG_BOSONLY 002000		/* temporary kludge for BOS-only matches */
 #define REG_DUMP	004000		/* none of your business :-) */
@@ -123,7 +122,6 @@ typedef struct
  */
 #define REG_NOTBOL	0001		/* BOS is not BOL */
 #define REG_NOTEOL	0002		/* EOS is not EOL */
-#define REG_STARTEND	0004	/* backward compatibility kludge */
 #define REG_FTRACE	0010		/* none of your business */
 #define REG_MTRACE	0020		/* none of your business */
 #define REG_SMALL	0040		/* none of your business */
diff --git a/src/test/regress/.gitignore b/src/test/regress/.gitignore
index 173f995d24..89129d7358 100644
--- a/src/test/regress/.gitignore
+++ b/src/test/regress/.gitignore
@@ -6,6 +6,6 @@
 /results/
 /log/
 
-# Note: regreesion.* are only left behind on a failure; that's why they're not ignored
+# Note: regression.* are only left behind on a failure; that's why they're not ignored
 #/regression.diffs
 #/regression.out

  [text/x-patch] fixes_10.21-30.patch (5.8K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/4-fixes_10.21-30.patch)
  download | inline diff:
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index cedb4ee844..28985a07ec 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -1522,7 +1522,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
 
 /*
  * Get a list of tables that the current user owns and
- * have indisclustered set.  Return the list in a List * of rvsToCluster
+ * have indisclustered set.  Return the list in a List * of RelToCluster
  * with the tableOid and the indexOid on which the table is already
  * clustered.
  */
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 62342a69cb..16fcd9df31 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -108,7 +108,7 @@ static void CreateSlotOnDisk(ReplicationSlot *slot);
 static void SaveSlotToPath(ReplicationSlot *slot, const char *path, int elevel);
 
 /*
- * Report shared-memory space needed by ReplicationSlotShmemInit.
+ * Report shared-memory space needed by ReplicationSlotsShmemInit.
  */
 Size
 ReplicationSlotsShmemSize(void)
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 469aac38c4..5fabccc72a 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -734,8 +734,6 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	Assert(standbyState == STANDBY_INITIALIZED);
 
 	/*
-	 * OK, we need to initialise from the RunningTransactionsData record.
-	 *
 	 * NB: this can be reached at least twice, so make sure new code can deal
 	 * with that.
 	 */
@@ -753,8 +751,8 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	 * We don't call SubtransSetParent because it doesn't matter yet. If we
 	 * aren't overflowed then all xids will fit in snapshot and so we don't
 	 * need subtrans. If we later overflow, an xid assignment record will add
-	 * xids to subtrans. If RunningXacts is overflowed then we don't have
-	 * enough information to correctly update subtrans anyway.
+	 * xids to subtrans. If RunningTransactionsData is overflowed then we
+	 * don't have enough information to correctly update subtrans anyway.
 	 */
 
 	/*
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 5e629d29ea..0280c2625c 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -3987,7 +3987,7 @@ xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj,
 /*
  * Common code for xpath() and xmlexists()
  *
- * Evaluate XPath expression and return number of nodes in res_items
+ * Evaluate XPath expression and return number of nodes in res_nitems
  * and array of XML values in astate.  Either of those pointers can be
  * NULL if the corresponding result isn't wanted.
  *
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 57c4ed6913..b3bbb903fc 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -138,7 +138,7 @@ typedef struct
 	char	   *nspname;		/* namespace name */
 	char	   *relname;		/* relation name */
 	Oid			reloid;			/* relation OID */
-	Oid			relfilenode;	/* relation relfile node */
+	Oid			relfilenode;	/* relation file node */
 	Oid			indtable;		/* if index, OID of its table, else 0 */
 	Oid			toastheap;		/* if toast table, OID of base table, else 0 */
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
diff --git a/src/include/access/brin_revmap.h b/src/include/access/brin_revmap.h
index 2ade88bc1e..4351dcca1f 100644
--- a/src/include/access/brin_revmap.h
+++ b/src/include/access/brin_revmap.h
@@ -31,7 +31,7 @@ extern void brinRevmapExtend(BrinRevmap *revmap,
 							 BlockNumber heapBlk);
 extern Buffer brinLockRevmapPageForUpdate(BrinRevmap *revmap,
 										  BlockNumber heapBlk);
-extern void brinSetHeapBlockItemptr(Buffer rmbuf, BlockNumber pagesPerRange,
+extern void brinSetHeapBlockItemptr(Buffer buf, BlockNumber pagesPerRange,
 									BlockNumber heapBlk, ItemPointerData tid);
 extern BrinTuple *brinGetTupleForHeapBlock(BrinRevmap *revmap,
 										   BlockNumber heapBlk, Buffer *buf, OffsetNumber *off,
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 057a3413ac..cb00ac4a06 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -69,7 +69,7 @@ typedef struct varatt_external
 	int32		va_rawsize;		/* Original data size (includes header) */
 	int32		va_extsize;		/* External saved size (doesn't) */
 	Oid			va_valueid;		/* Unique ID of value within TOAST table */
-	Oid			va_toastrelid;	/* RelID of TOAST table containing it */
+	Oid			va_toastrelid;	/* Relation ID of TOAST table containing it */
 }			varatt_external;
 
 /*
diff --git a/src/include/rewrite/prs2lock.h b/src/include/rewrite/prs2lock.h
index 62e756ff63..07ca649359 100644
--- a/src/include/rewrite/prs2lock.h
+++ b/src/include/rewrite/prs2lock.h
@@ -43,4 +43,4 @@ typedef struct RuleLock
 	RewriteRule **rules;
 } RuleLock;
 
-#endif							/* REWRITE_H */
+#endif							/* PRS2LOCK_H */
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 8fc0a467f7..d15a535f89 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -679,11 +679,6 @@ intoasc(interval * i, char *str)
 	return 0;
 }
 
-/*
- *	rfmt.c	-  description
- *	by Carsten Wolff <carsten.wolff@credativ.de>, Wed Apr 2 2003
- */
-
 static struct
 {
 	long		val;
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 3151975564..22c4954f2b 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -287,7 +287,7 @@ extern PQconninfoOption *PQconninfo(PGconn *conn);
 extern void PQconninfoFree(PQconninfoOption *connOptions);
 
 /*
- * close the current connection and restablish a new one with the same
+ * close the current connection and reestablish a new one with the same
  * parameters
  */
 /* Asynchronous (non-blocking) */

  [text/x-patch] fixes_10.31-40.patch (7.6K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/5-fixes_10.31-40.patch)
  download | inline diff:
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c
index bff20b37e6..f2f16bc883 100644
--- a/contrib/fuzzystrmatch/dmetaphone.c
+++ b/contrib/fuzzystrmatch/dmetaphone.c
@@ -191,7 +191,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
 					  (v = (t*)repalloc((v),((n)*sizeof(t))))
 
 /*
- * Don't do pfree - it seems to cause a segv sometimes - which might have just
+ * Don't do pfree - it seems to cause a SIGSEGV sometimes - which might have just
  * been caused by reloading the module in development.
  * So we rely on context cleanup - Tom Lane says pfree shouldn't be necessary
  * in a case like this.
diff --git a/contrib/test_decoding/specs/concurrent_ddl_dml.spec b/contrib/test_decoding/specs/concurrent_ddl_dml.spec
index e7cea37d30..6ee3f085d8 100644
--- a/contrib/test_decoding/specs/concurrent_ddl_dml.spec
+++ b/contrib/test_decoding/specs/concurrent_ddl_dml.spec
@@ -29,15 +29,8 @@ setup { SET synchronous_commit=on; }
 
 step "s2_alter_tbl1_float" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE float; }
 step "s2_alter_tbl1_char" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE character varying; }
-step "s2_alter_tbl1_text" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE text; }
 step "s2_alter_tbl1_boolean" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE boolean; }
 
-step "s2_alter_tbl1_add_int" { ALTER TABLE tbl1 ADD COLUMN val3 INTEGER; }
-step "s2_alter_tbl1_add_float" { ALTER TABLE tbl1 ADD COLUMN val3 FLOAT; }
-step "s2_alter_tbl1_add_char" { ALTER TABLE tbl1 ADD COLUMN val3 character varying; }
-step "s2_alter_tbl1_add_boolean" { ALTER TABLE tbl1 ADD COLUMN val3 BOOLEAN; }
-step "s2_alter_tbl1_add_text" { ALTER TABLE tbl1 ADD COLUMN val3 TEXT; }
-
 step "s2_alter_tbl2_float" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE float; }
 step "s2_alter_tbl2_char" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE character varying; }
 step "s2_alter_tbl2_text" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE text; }
@@ -46,7 +39,6 @@ step "s2_alter_tbl2_boolean" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE boolean;
 step "s2_alter_tbl2_add_int" { ALTER TABLE tbl2 ADD COLUMN val3 INTEGER; }
 step "s2_alter_tbl2_add_float" { ALTER TABLE tbl2 ADD COLUMN val3 FLOAT; }
 step "s2_alter_tbl2_add_char" { ALTER TABLE tbl2 ADD COLUMN val3 character varying; }
-step "s2_alter_tbl2_add_boolean" { ALTER TABLE tbl2 ADD COLUMN val3 BOOLEAN; }
 step "s2_alter_tbl2_add_text" { ALTER TABLE tbl2 ADD COLUMN val3 TEXT; }
 step "s2_alter_tbl2_drop_3rd_col" { ALTER TABLE tbl2 DROP COLUMN val3; }
 step "s2_alter_tbl2_3rd_char" { ALTER TABLE tbl2 ALTER COLUMN val3 TYPE character varying; }
diff --git a/src/backend/partitioning/partprune.c b/src/backend/partitioning/partprune.c
index 2ee47b8c8a..d8b6638753 100644
--- a/src/backend/partitioning/partprune.c
+++ b/src/backend/partitioning/partprune.c
@@ -2127,7 +2127,7 @@ match_clause_to_partition_key(GeneratePruningStepsContext *context,
 
 		/*
 		 * Now generate a list of clauses, one for each array element, of the
-		 * form saop_leftop saop_op elem_expr
+		 * form leftop saop_op elem_expr
 		 */
 		elem_clauses = NIL;
 		foreach(lc1, elem_exprs)
diff --git a/src/backend/port/posix_sema.c b/src/backend/port/posix_sema.c
index 5e77cb0c12..3370adf35e 100644
--- a/src/backend/port/posix_sema.c
+++ b/src/backend/port/posix_sema.c
@@ -189,7 +189,7 @@ PGSemaphoreShmemSize(int maxSemas)
  * maxSemas parameter is just used to size the arrays.  For unnamed
  * semaphores, there is an array of PGSemaphoreData structs in shared memory.
  * For named semaphores, we keep a postmaster-local array of sem_t pointers,
- * which we use for releasing the semphores when done.
+ * which we use for releasing the semaphores when done.
  * (This design minimizes the dependency of postmaster shutdown on the
  * contents of shared memory, which a failed backend might have clobbered.
  * We can't do much about the possibility of sem_destroy() crashing, but
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 60f39031fb..a76112d6cd 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1971,10 +1971,6 @@ retry:
 	{
 		/*
 		 * Maintain fileSize and temporary_files_size if it's a temp file.
-		 *
-		 * If seekPos is -1 (unknown), this will do nothing; but we could only
-		 * get here in that state if we're not enforcing temporary_files_size,
-		 * so we don't care.
 		 */
 		if (vfdP->fdstate & FD_TEMP_FILE_LIMIT)
 		{
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
index 85d9ecbfc6..9554952a8a 100644
--- a/src/include/utils/selfuncs.h
+++ b/src/include/utils/selfuncs.h
@@ -109,7 +109,7 @@ typedef struct
 	double		numIndexPages;	/* number of leaf pages visited */
 	double		numIndexTuples; /* number of leaf tuples visited */
 	double		spc_random_page_cost;	/* relevant random_page_cost value */
-	double		num_sa_scans;	/* # indexscans from ScalarArrayOps */
+	double		num_sa_scans;	/* # indexscans from ScalarArrayOpExprs */
 } GenericCosts;
 
 /* Hooks for plugins to get control when we ask for stats */
diff --git a/src/test/isolation/specs/freeze-the-dead.spec b/src/test/isolation/specs/freeze-the-dead.spec
index e24d7d5d11..219242841d 100644
--- a/src/test/isolation/specs/freeze-the-dead.spec
+++ b/src/test/isolation/specs/freeze-the-dead.spec
@@ -19,7 +19,6 @@ session "s1"
 step "s1_begin"		{ BEGIN; }
 step "s1_update"	{ UPDATE tab_freeze SET x = x + 1 WHERE id = 3; }
 step "s1_commit"	{ COMMIT; }
-step "s1_vacuum"	{ VACUUM FREEZE tab_freeze; }
 step "s1_selectone"	{
     BEGIN;
     SET LOCAL enable_seqscan = false;
@@ -28,7 +27,6 @@ step "s1_selectone"	{
     COMMIT;
 }
 step "s1_selectall"	{ SELECT * FROM tab_freeze ORDER BY name, id; }
-step "s1_reindex"	{ REINDEX TABLE tab_freeze; }
 
 session "s2"
 step "s2_begin"		{ BEGIN; }
@@ -40,7 +38,6 @@ session "s3"
 step "s3_begin"		{ BEGIN; }
 step "s3_key_share"	{ SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; }
 step "s3_commit"	{ COMMIT; }
-step "s3_vacuum"	{ VACUUM FREEZE tab_freeze; }
 
 # This permutation verfies that a previous bug
 #     https://postgr.es/m/E5711E62-8FDF-4DCA-A888-C200BF6B5742@amazon.com
diff --git a/src/test/isolation/specs/sequence-ddl.spec b/src/test/isolation/specs/sequence-ddl.spec
index 5c51fcdae6..f2a3ff628b 100644
--- a/src/test/isolation/specs/sequence-ddl.spec
+++ b/src/test/isolation/specs/sequence-ddl.spec
@@ -15,7 +15,6 @@ setup           { BEGIN; }
 step "s1alter"  { ALTER SEQUENCE seq1 MAXVALUE 10; }
 step "s1alter2" { ALTER SEQUENCE seq1 MAXVALUE 20; }
 step "s1restart" { ALTER SEQUENCE seq1 RESTART WITH 5; }
-step "s1setval" { SELECT setval('seq1', 5); }
 step "s1commit" { COMMIT; }
 
 session "s2"
@@ -29,7 +28,7 @@ permutation "s1alter" "s1commit" "s2nv"
 # change, but now it waits.
 permutation "s1alter" "s2nv" "s1commit"
 
-# Prior to PG10, the s2nv step would see the uncommitted s1reset
+# Prior to PG10, the s2nv step would see the uncommitted s1restart
 # change, but now it waits.
 permutation "s1restart" "s2nv" "s1commit"
 
diff --git a/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec b/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec
index 73f71b17a7..c3b688e19f 100644
--- a/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec
+++ b/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec
@@ -28,7 +28,6 @@ step "s1_keyshare" { select id from tlu_job where id = 1 for key share;}
 step "s1_share" { select id from tlu_job where id = 1 for share; }
 step "s1_fornokeyupd" { select id from tlu_job where id = 1 for no key update; }
 step "s1_update" { update tlu_job set name = 'b' where id = 1;  }
-step "s1_delete" { delete from tlu_job where id = 1; }
 step "s1_savept_e" { savepoint s1_e; }
 step "s1_savept_f" { savepoint s1_f; }
 step "s1_rollback_e" { rollback to s1_e; }

  [text/x-patch] fixes_10.41-50.patch (6.3K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/6-fixes_10.41-50.patch)
  download | inline diff:
diff --git a/contrib/sepgsql/selinux.c b/contrib/sepgsql/selinux.c
index bc2be8427a..93a447e5ae 100644
--- a/contrib/sepgsql/selinux.c
+++ b/contrib/sepgsql/selinux.c
@@ -657,10 +657,8 @@ sepgsql_getenforce(void)
 /*
  * sepgsql_audit_log
  *
- * It generates a security audit record. In the default, it writes out
- * audit records into standard PG's logfile. It also allows to set up
- * external audit log receiver, such as auditd in Linux, using the
- * sepgsql_audit_hook.
+ * It generates a security audit record. It writes out
+ * audit records into standard PG's logfile.
  *
  * SELinux can control what should be audited and should not using
  * "auditdeny" and "auditallow" rules in the security policy. In the
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 6b42bdc77b..718f07f4f6 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -3029,7 +3029,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
 	 * the value ends up being the same, this test will fail and we will use
 	 * the stronger lock.  This is acceptable; the important case to optimize
 	 * is updates that don't manipulate key columns, not those that
-	 * serendipitiously arrive at the same key values.
+	 * serendipitously arrive at the same key values.
 	 */
 	if (!bms_overlap(modified_attrs, key_attrs))
 	{
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 0960b339ca..a13322b693 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -1115,7 +1115,7 @@ init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel)
 	/*
 	 * Initialize the new hash table entry if it did not exist already.
 	 *
-	 * NOTE: seqtable entries are stored for the life of a backend (unless
+	 * NOTE: seqhashtab entries are stored for the life of a backend (unless
 	 * explicitly discarded with DISCARD). If the sequence itself is deleted
 	 * then the entry becomes wasted memory, but it's small enough that this
 	 * should not matter.
diff --git a/src/backend/port/win32/signal.c b/src/backend/port/win32/signal.c
index 7d8961f4a4..fd60375808 100644
--- a/src/backend/port/win32/signal.c
+++ b/src/backend/port/win32/signal.c
@@ -102,7 +102,7 @@ pgwin32_signal_initialize(void)
 /*
  * Dispatch all signals currently queued and not blocked
  * Blocked signals are ignored, and will be fired at the time of
- * the sigsetmask() call.
+ * the pgsigsetmask() call.
  */
 void
 pgwin32_dispatch_queued_signals(void)
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 85a629f4fc..6968750289 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -849,7 +849,7 @@ OldSerXidInit(void)
 /*
  * Record a committed read write serializable xid and the minimum
  * commitSeqNo of any transactions to which this xid had a rw-conflict out.
- * An invalid seqNo means that there were no conflicts out from xid.
+ * An invalid commitSeqNo means that there were no conflicts out from xid.
  */
 static void
 OldSerXidAdd(TransactionId xid, SerCommitSeqNo minConflictCommitSeqNo)
diff --git a/src/backend/utils/misc/check_guc b/src/backend/utils/misc/check_guc
index d228bbed68..416a0875b6 100755
--- a/src/backend/utils/misc/check_guc
+++ b/src/backend/utils/misc/check_guc
@@ -18,7 +18,7 @@
 ## can be ignored
 INTENTIONALLY_NOT_INCLUDED="debug_deadlocks \
 is_superuser lc_collate lc_ctype lc_messages lc_monetary lc_numeric lc_time \
-pre_auth_delay role seed server_encoding server_version server_version_int \
+pre_auth_delay role seed server_encoding server_version server_version_num \
 session_authorization trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks \
 trace_notify trace_userlocks transaction_isolation transaction_read_only \
 zero_damaged_pages"
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 4e2fb39105..3cbb08df92 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -768,8 +768,8 @@ typedef enum AggStrategy
 /* Primitive options supported by nodeAgg.c: */
 #define AGGSPLITOP_COMBINE		0x01	/* substitute combinefn for transfn */
 #define AGGSPLITOP_SKIPFINAL	0x02	/* skip finalfn, return state as-is */
-#define AGGSPLITOP_SERIALIZE	0x04	/* apply serializefn to output */
-#define AGGSPLITOP_DESERIALIZE	0x08	/* apply deserializefn to input */
+#define AGGSPLITOP_SERIALIZE	0x04	/* apply serialfn to output */
+#define AGGSPLITOP_DESERIALIZE	0x08	/* apply deserialfn to input */
 
 /* Supported operating modes (i.e., useful combinations of these options): */
 typedef enum AggSplit
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index a93ed77c9c..6791e0cbc2 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -365,7 +365,7 @@ extern int	set_config_option(const char *name, const char *value,
 							  GucContext context, GucSource source,
 							  GucAction action, bool changeVal, int elevel,
 							  bool is_reload);
-extern void AlterSystemSetConfigFile(AlterSystemStmt *setstmt);
+extern void AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt);
 extern char *GetConfigOptionByName(const char *name, const char **varname,
 								   bool missing_ok);
 extern void GetConfigOptionByNum(int varnum, const char **values, bool *noshow);
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c
index 7f53afbea2..536c5f686e 100644
--- a/src/port/getaddrinfo.c
+++ b/src/port/getaddrinfo.c
@@ -49,8 +49,8 @@ typedef void (__stdcall * freeaddrinfo_ptr_t) (struct addrinfo *ai);
 
 typedef int (__stdcall * getnameinfo_ptr_t) (const struct sockaddr *sa,
 											 int salen,
-											 char *host, int hostlen,
-											 char *serv, int servlen,
+											 char *node, int nodelen,
+											 char *service, int servicelen,
 											 int flags);
 
 /* static pointers to the native routines, so we only do the lookup once. */
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c
index 1d5bd90afb..4b3829b0b5 100644
--- a/src/timezone/pgtz.c
+++ b/src/timezone/pgtz.c
@@ -357,7 +357,7 @@ pg_tzset_offset(long gmtoffset)
  * is to ensure that log_timezone has a valid value before any logging GUC
  * variables could become set to values that require elog.c to provide
  * timestamps (e.g., log_line_prefix).  We may as well initialize
- * session_timestamp to something valid, too.
+ * session_timezone to something valid, too.
  */
 void
 pg_timezone_initialize(void)

  [text/x-patch] fixes_10.51-60.patch (6.5K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/7-fixes_10.51-60.patch)
  download | inline diff:
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 93fab264ae..9b172c1a19 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -664,7 +664,7 @@ _bt_restore_array_keys(IndexScanDesc scan)
  * scan->numberOfKeys is the number of input keys, so->numberOfKeys gets
  * the number of output keys (possibly less, never greater).
  *
- * The output keys are marked with additional sk_flag bits beyond the
+ * The output keys are marked with additional sk_flags bits beyond the
  * system-standard bits supplied by the caller.  The DESC and NULLS_FIRST
  * indoption bits for the relevant index attribute are copied into the flags.
  * Also, for a DESC column, we commute (flip) all the sk_strategy numbers
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 13aa8e1b95..0fbcb4e6fe 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -1364,7 +1364,7 @@ SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)
 }
 
 /*
- * Scan the SimpleLRU directory and apply a callback to each file found in it.
+ * Scan the SimpleLru directory and apply a callback to each file found in it.
  *
  * If the callback returns true, the scan is stopped.  The last return value
  * from the callback is returned.
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 1bbaeeebf4..52e9643305 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -1232,7 +1232,7 @@ RecordTransactionCommit(void)
 	if (!markXidCommitted)
 	{
 		/*
-		 * We expect that every smgrscheduleunlink is followed by a catalog
+		 * We expect that every RelationDropStorage is followed by a catalog
 		 * update, and hence XID assignment, so we shouldn't get here with any
 		 * pending deletes.  Use a real test not just an Assert to check this,
 		 * since it's a bit fragile.
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 0d6e968ee6..c6faf48d24 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -702,7 +702,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
  * We assume all of the record (that is, xl_tot_len bytes) has been read
  * into memory at *record.  Also, ValidXLogRecordHeader() has accepted the
  * record's header, which means in particular that xl_tot_len is at least
- * SizeOfXlogRecord.
+ * SizeOfXLogRecord.
  */
 static bool
 ValidXLogRecord(XLogReaderState *state, XLogRecord *record, XLogRecPtr recptr)
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index dc64b1e0c2..0bd1d0f954 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -269,7 +269,7 @@ static void SnapBuildSnapIncRefcount(Snapshot snap);
 
 static void SnapBuildDistributeNewCatalogSnapshot(SnapBuild *builder, XLogRecPtr lsn);
 
-/* xlog reading helper functions for SnapBuildProcessRecord */
+/* xlog reading helper functions for SnapBuildProcessRunningXacts */
 static bool SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *running);
 static void SnapBuildWaitSnapshot(xl_running_xacts *running, TransactionId cutoff);
 
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 62342a69cb..dbbca8af6c 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -298,7 +298,7 @@ ReplicationSlotCreate(const char *name, bool db_specific,
 	 * We need to briefly prevent any other backend from iterating over the
 	 * slots while we flip the in_use flag. We also need to set the active
 	 * flag while holding the ControlLock as otherwise a concurrent
-	 * SlotAcquire() could acquire the slot as well.
+	 * ReplicationSlotAcquire() could acquire the slot as well.
 	 */
 	LWLockAcquire(ReplicationSlotControlLock, LW_EXCLUSIVE);
 
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index bd8d200982..700a91a2a3 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -182,7 +182,7 @@ static const MemoryContextMethods SlabMethods = {
  * chunkSize: allocation chunk size
  *
  * The chunkSize may not exceed:
- *		MAXALIGN_DOWN(SIZE_MAX) - MAXALIGN(sizeof(SlabBlock)) - SLAB_CHUNKHDRSZ
+ *		MAXALIGN_DOWN(SIZE_MAX) - MAXALIGN(sizeof(SlabBlock)) - sizeof(SlabChunk)
  */
 MemoryContext
 SlabContextCreate(MemoryContext parent,
diff --git a/src/include/access/hash_xlog.h b/src/include/access/hash_xlog.h
index 53b682c56e..7d52145a2a 100644
--- a/src/include/access/hash_xlog.h
+++ b/src/include/access/hash_xlog.h
@@ -51,19 +51,6 @@
 #define XLH_SPLIT_META_UPDATE_MASKS		(1<<0)
 #define XLH_SPLIT_META_UPDATE_SPLITPOINT		(1<<1)
 
-/*
- * This is what we need to know about a HASH index create.
- *
- * Backup block 0: metapage
- */
-typedef struct xl_hash_createidx
-{
-	double		num_tuples;
-	RegProcedure procid;
-	uint16		ffactor;
-}			xl_hash_createidx;
-#define SizeOfHashCreateIdx (offsetof(xl_hash_createidx, ffactor) + sizeof(uint16))
-
 /*
  * This is what we need to know about simple (without split) insert.
  *
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index baf6a4b6c0..15cd7a160b 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -132,8 +132,6 @@ typedef uint32 PacketLen;
 
 #define SM_DATABASE		64
 #define SM_USER			32
-/* We append database name if db_user_namespace true. */
-#define SM_DATABASE_USER (SM_DATABASE+SM_USER+1)	/* +1 for @ */
 #define SM_OPTIONS		64
 #define SM_UNUSED		64
 #define SM_TTY			64
@@ -142,7 +140,6 @@ typedef struct StartupPacket
 {
 	ProtocolVersion protoVersion;	/* Protocol version */
 	char		database[SM_DATABASE];	/* Database name */
-	/* Db_user_namespace appends dbname */
 	char		user[SM_USER];	/* User name */
 	char		options[SM_OPTIONS];	/* Optional additional args */
 	char		unused[SM_UNUSED];	/* Unused */
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index dbfd8efd26..ba0b7f6f79 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -63,7 +63,7 @@
 	(PGSIXBIT(ch1) + (PGSIXBIT(ch2) << 6) + (PGSIXBIT(ch3) << 12) + \
 	 (PGSIXBIT(ch4) << 18) + (PGSIXBIT(ch5) << 24))
 
-/* These macros depend on the fact that '0' becomes a zero in SIXBIT */
+/* These macros depend on the fact that '0' becomes a zero in PGSIXBIT */
 #define ERRCODE_TO_CATEGORY(ec)  ((ec) & ((1 << 12) - 1))
 #define ERRCODE_IS_CATEGORY(ec)  (((ec) & ~((1 << 12) - 1)) == 0)
 

  [text/x-patch] fixes_10.61-70.patch (6.1K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/8-fixes_10.61-70.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index b6a4fa2600..a1ebcaa862 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -5011,7 +5011,7 @@ struct
 
    <para>
     The fields <structfield>sqlcaid</structfield>,
-    <structfield>sqlcabc</structfield>,
+    <structfield>sqlabc</structfield>,
     <structfield>sqlerrp</structfield>, and the remaining elements of
     <structfield>sqlerrd</structfield> and
     <structfield>sqlwarn</structfield> currently contain no useful
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 017713f6e4..77dd9a0d89 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1018,7 +1018,7 @@ PostgreSQL documentation
      </varlistentry>
 
      <varlistentry>
-       <term><option>--snapshot=<replaceable class="parameter">snapshotname</replaceable></option></term>
+       <term><option>--snapshot=<replaceable class="parameter">snapshot_id</replaceable></option></term>
        <listitem>
          <para>
           Use the specified synchronized snapshot when making a dump of the
@@ -1032,7 +1032,7 @@ PostgreSQL documentation
           or with a concurrent session.
          </para>
          <para>
-          In the case of a parallel dump, the snapshot name defined by this
+          In the case of a parallel dump, the snapshot id defined by this
           option is used rather than taking a new snapshot.
          </para>
        </listitem>
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index e9ca4b8252..54eedf8f0c 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -1047,7 +1047,7 @@ gistFindCorrectParent(Relation r, GISTInsertStack *child)
 			{
 				/*
 				 * End of chain and still didn't find parent. It's a very-very
-				 * rare situation when root splited.
+				 * rare situation when root splitted.
 				 */
 				break;
 			}
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index b8eb83b2e0..e6ff929b5c 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -2603,8 +2603,8 @@ _SPI_cursor_operation(Portal portal, FetchDirection direction, long count,
 
 	/*
 	 * Think not to combine this store with the preceding function call. If
-	 * the portal contains calls to functions that use SPI, then SPI_stack is
-	 * likely to move around while the portal runs.  When control returns,
+	 * the portal contains calls to functions that use SPI, then _SPI_stack
+	 * is likely to move around while the portal runs.  When control returns,
 	 * _SPI_current will point to the correct stack entry... but the pointer
 	 * may be different than it was beforehand. So we must be sure to re-fetch
 	 * the pointer after the function call completes.
@@ -2733,7 +2733,7 @@ _SPI_make_plan_non_temp(SPIPlanPtr plan)
 									ALLOCSET_SMALL_SIZES);
 	oldcxt = MemoryContextSwitchTo(plancxt);
 
-	/* Copy the SPI_plan struct and subsidiary data into the new context */
+	/* Copy the _SPI_plan struct and subsidiary data into the new context */
 	newplan = (SPIPlanPtr) palloc0(sizeof(_SPI_plan));
 	newplan->magic = _SPI_PLAN_MAGIC;
 	newplan->plancxt = plancxt;
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index d8d863dda2..050d84adc5 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -485,7 +485,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
 		 * error on TCP ports.
 		 *
 		 * On win32, however, this behavior only happens if the
-		 * SO_EXLUSIVEADDRUSE is set. With SO_REUSEADDR, win32 allows multiple
+		 * SO_EXCLUSIVEADDRUSE is set. With SO_REUSEADDR, win32 allows multiple
 		 * servers to listen on the same address, resulting in unpredictable
 		 * behavior. With no flags at all, win32 behaves as Unix with
 		 * SO_REUSEADDR.
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index d5f9b617c8..c91f66dcbe 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -792,7 +792,7 @@ SendBackupHeader(List *tablespaces)
 	pq_sendint32(&buf, 0);		/* typmod */
 	pq_sendint16(&buf, 0);		/* format code */
 
-	/* Second field - spcpath */
+	/* Second field - spclocation */
 	pq_sendstring(&buf, "spclocation");
 	pq_sendint32(&buf, 0);
 	pq_sendint16(&buf, 0);
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 85a629f4fc..a67b7ea4cb 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -1685,7 +1685,7 @@ SetSerializableTransactionSnapshot(Snapshot snapshot,
 /*
  * Guts of GetSerializableTransactionSnapshot
  *
- * If sourcexid is valid, this is actually an import operation and we should
+ * If sourcevxid is valid, this is actually an import operation and we should
  * skip calling GetSnapshotData, because the snapshot contents are already
  * loaded up.  HOWEVER: to avoid race conditions, we must check that the
  * source xact is still running after we acquire SerializableXactHashLock.
diff --git a/src/backend/utils/adt/txid.c b/src/backend/utils/adt/txid.c
index 4483db573f..90b2c9b694 100644
--- a/src/backend/utils/adt/txid.c
+++ b/src/backend/utils/adt/txid.c
@@ -705,7 +705,7 @@ txid_snapshot_xip(PG_FUNCTION_ARGS)
 	TxidSnapshot *snap;
 	txid		value;
 
-	/* on first call initialize snap_state and get copy of snapshot */
+	/* on first call initialize fctx and get copy of snapshot */
 	if (SRF_IS_FIRSTCALL())
 	{
 		TxidSnapshot *arg = (TxidSnapshot *) PG_GETARG_VARLENA_P(0);
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index bda802b447..d2bd2aee9f 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1150,7 +1150,7 @@ tuplesort_begin_datum(Oid datumType, Oid sortOperator, Oid sortCollation,
 	 * to compare.  In a tuple sort, we could support that, because we can
 	 * always extract the original datum from the tuple as needed.  Here, we
 	 * can't, because a datum sort only stores a single copy of the datum; the
-	 * "tuple" field of each sortTuple is NULL.
+	 * "tuple" field of each SortTuple is NULL.
 	 */
 	state->sortKeys->abbreviate = !typbyval;
 

  [text/x-patch] fixes_10.71-80.patch (6.2K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/9-fixes_10.71-80.patch)
  download | inline diff:
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index a339ebbc4b..6294312ab7 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -884,7 +884,7 @@ BETTER: unrecognized node type: 42
      features can be used, if a fallback is provided.
     </para>
     <para>
-     For example <literal>_StaticAssert()</literal> and
+     For example <literal>_Static_assert()</literal> and
      <literal>__builtin_constant_p</literal> are currently used, even though
      they are from newer revisions of the C standard and a
      <productname>GCC</productname> extension respectively. If not available
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index defdc9b408..838ee68c86 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -1510,7 +1510,7 @@ _hash_getcachedmetap(Relation rel, Buffer *metabuf, bool force_refresh)
 		 * It's important that we don't set rd_amcache to an invalid value.
 		 * Either MemoryContextAlloc or _hash_getbuf could fail, so don't
 		 * install a pointer to the newly-allocated storage in the actual
-		 * relcache entry until both have succeeeded.
+		 * relcache entry until both have succeeded.
 		 */
 		if (rel->rd_amcache == NULL)
 			cache = MemoryContextAlloc(rel->rd_indexcxt,
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 5fabccc72a..8abcfdf841 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -748,7 +748,7 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	 * sort them first.
 	 *
 	 * Some of the new xids are top-level xids and some are subtransactions.
-	 * We don't call SubtransSetParent because it doesn't matter yet. If we
+	 * We don't call SubTransSetParent because it doesn't matter yet. If we
 	 * aren't overflowed then all xids will fit in snapshot and so we don't
 	 * need subtrans. If we later overflow, an xid assignment record will add
 	 * xids to subtrans. If RunningTransactionsData is overflowed then we
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 2376bda497..15fda7f122 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -79,7 +79,7 @@
 #undef StrNCpy
 #include <shlwapi.h>
 #ifdef StrNCpy
-#undef STrNCpy
+#undef StrNCpy
 #endif
 #endif
 
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 0864838867..9e34055801 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2052,10 +2052,10 @@ varstr_sortsupport(SortSupport ssup, Oid typid, Oid collid)
 
 	/*
 	 * If we're using abbreviated keys, or if we're using a locale-aware
-	 * comparison, we need to initialize a StringSortSupport object.  Both
-	 * cases will make use of the temporary buffers we initialize here for
-	 * scratch space (and to detect requirement for BpChar semantics from
-	 * caller), and the abbreviation case requires additional state.
+	 * comparison, we need to initialize a VarStringSortSupport object.
+	 * Both cases will make use of the temporary buffers we initialize here
+	 * for scratch space (and to detect requirement for BpChar semantics
+	 * from caller), and the abbreviation case requires additional state.
 	 */
 	if (abbreviate || !collate_c)
 	{
diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h
index a1912f41e6..6d392e4d5a 100644
--- a/src/include/access/reloptions.h
+++ b/src/include/access/reloptions.h
@@ -237,7 +237,7 @@ typedef struct
 
 /*
  * For use by code reading options already parsed: get a pointer to the string
- * value itself.  "optstruct" is the StdRdOption struct or equivalent, "member"
+ * value itself.  "optstruct" is the StdRdOptions struct or equivalent, "member"
  * is the struct member corresponding to the string option
  */
 #define GET_STRING_RELOPTION(optstruct, member) \
diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h
index 187d76de18..edb98842fc 100644
--- a/src/include/catalog/namespace.h
+++ b/src/include/catalog/namespace.h
@@ -105,7 +105,7 @@ extern Oid	ConversionGetConid(const char *conname);
 extern bool ConversionIsVisible(Oid conid);
 
 extern Oid	get_statistics_object_oid(List *names, bool missing_ok);
-extern bool StatisticsObjIsVisible(Oid stxid);
+extern bool StatisticsObjIsVisible(Oid relid);
 
 extern Oid	get_ts_parser_oid(List *names, bool missing_ok);
 extern bool TSParserIsVisible(Oid prsId);
diff --git a/src/include/storage/standbydefs.h b/src/include/storage/standbydefs.h
index befdbf60bf..9a612a5834 100644
--- a/src/include/storage/standbydefs.h
+++ b/src/include/storage/standbydefs.h
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * standbydef.h
+ * standbydefs.h
  *	   Frontend exposed definitions for hot standby mode.
  *
  *
diff --git a/src/pl/plpython/plpy_subxactobject.c b/src/pl/plpython/plpy_subxactobject.c
index 53fd36edba..5dfb8a4cb5 100644
--- a/src/pl/plpython/plpy_subxactobject.c
+++ b/src/pl/plpython/plpy_subxactobject.c
@@ -132,7 +132,7 @@ PLy_subtransaction_enter(PyObject *self, PyObject *unused)
  *
  * Exit an explicit subtransaction. exc_type is an exception type, exc
  * is the exception object, tb is the traceback.  If exc_type is None,
- * commit the subtransactiony, if not abort it.
+ * commit the subtransaction, if not abort it.
  *
  * The method signature is chosen to allow subtransaction objects to
  * be used as context managers as described in
diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl
index c184553694..292cd40fe2 100644
--- a/src/test/recovery/t/012_subtransactions.pl
+++ b/src/test/recovery/t/012_subtransactions.pl
@@ -76,7 +76,7 @@ is($psql_out, '6', "Check nextXid handling for prepared subtransactions");
 
 ###############################################################################
 # Check that replay will correctly set 2PC with more than
-# PGPROC_MAX_CACHED_SUBXIDS subtransations and also show data properly
+# PGPROC_MAX_CACHED_SUBXIDS subtransactions and also show data properly
 # on promotion
 ###############################################################################
 $node_master->psql('postgres', "DELETE FROM t_012_tbl");

  [text/x-patch] fixes_10.81-90.patch (5.6K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/10-fixes_10.81-90.patch)
  download | inline diff:
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c
index 16dfe725ea..db58408d4c 100644
--- a/contrib/pgcrypto/internal.c
+++ b/contrib/pgcrypto/internal.c
@@ -39,25 +39,6 @@
 #include "blf.h"
 #include "rijndael.h"
 
-/*
- * System reseeds should be separated at least this much.
- */
-#define SYSTEM_RESEED_MIN			(20*60) /* 20 min */
-/*
- * How often to roll dice.
- */
-#define SYSTEM_RESEED_CHECK_TIME	(10*60) /* 10 min */
-/*
- * The chance is x/256 that the reseed happens.
- */
-#define SYSTEM_RESEED_CHANCE		(4) /* 256/4 * 10min ~ 10h */
-
-/*
- * If this much time has passed, force reseed.
- */
-#define SYSTEM_RESEED_MAX			(12*60*60)	/* 12h */
-
-
 #ifndef MD5_DIGEST_LENGTH
 #define MD5_DIGEST_LENGTH 16
 #endif
diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c
index eed0f6ad2d..142c3f2588 100644
--- a/contrib/pgcrypto/pgp-decrypt.c
+++ b/contrib/pgcrypto/pgp-decrypt.c
@@ -423,7 +423,7 @@ static struct PullFilterOps mdc_filter = {
 /*
  * Combined Pkt reader and MDC hasher.
  *
- * For the case of SYMENCRYPTED_MDC packet, where
+ * For the case of SYMENCRYPTED_DATA_MDC packet, where
  * the data part has 'context length', which means
  * that data packet ends 22 bytes before end of parent
  * packet, which is silly.
@@ -894,7 +894,10 @@ process_data_packets(PGP_Context *ctx, MBuf *dst, PullFilter *src,
 			break;
 		}
 
-		/* context length inside SYMENC_MDC needs special handling */
+		/*
+		 * context length inside SYMENCRYPTED_DATA_MDC packet needs
+		 * special handling
+		 */
 		if (need_mdc && res == PKT_CONTEXT)
 			res = pullf_create(&pkt, &mdcbuf_filter, ctx, src);
 		else
diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c
index 8a6cd82675..2938b4b3f5 100644
--- a/contrib/pgcrypto/pgp-encrypt.c
+++ b/contrib/pgcrypto/pgp-encrypt.c
@@ -618,7 +618,7 @@ pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst)
 		goto out;
 
 	/*
-	 * initialize symkey
+	 * initialize sym_key
 	 */
 	if (ctx->sym_key)
 	{
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index ef1556be8f..d491235f7f 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -5626,7 +5626,7 @@ BEGIN
     INSERT INTO cs_active_job(job_id) VALUES (v_job_id);
 
     BEGIN
-        INSERT INTO cs_jobs (job_id, start_stamp) VALUES (v_job_id, sysdate);
+        INSERT INTO cs_jobs (job_id, start_stamp) VALUES (v_job_id, now());
     EXCEPTION
         WHEN dup_val_on_index THEN NULL; -- don't worry if it already exists
     END;
diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c
index e2bfbf8a68..a04288eb6b 100644
--- a/src/backend/access/brin/brin_revmap.c
+++ b/src/backend/access/brin/brin_revmap.c
@@ -395,9 +395,10 @@ brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk)
 	 */
 
 	/*
-	 * Because of SUE lock, this function shouldn't run concurrently with
-	 * summarization.  Placeholder tuples can only exist as leftovers from
-	 * crashed summarization, so if we detect any, we complain but proceed.
+	 * Because of ShareUpdateExclusive lock, this function shouldn't run
+	 * iconcurrently with summarization.  Placeholder tuples can only exist
+	 * as leftovers from crashed summarization, so if we detect any,
+	 * we complain but proceed.
 	 */
 	if (BrinTupleIsPlaceholder(tup))
 		ereport(WARNING,
diff --git a/src/backend/lib/rbtree.c b/src/backend/lib/rbtree.c
index 33181e9211..d439ec189f 100644
--- a/src/backend/lib/rbtree.c
+++ b/src/backend/lib/rbtree.c
@@ -7,8 +7,8 @@
  * This code comes from Thomas Niemann's "Sorting and Searching Algorithms:
  * a Cookbook".
  *
- * See http://www.cs.auckland.ac.nz/software/AlgAnim/niemann/s_man.htm for
- * license terms: "Source code, when part of a software project, may be used
+ * See https://www.epaperpress.com/sortsearch/ for license terms:
+ * "Source code, when part of a software project, may be used
  * freely without reference to the author."
  *
  * Red-black trees are a type of balanced binary tree wherein (1) any child of
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 43edfef089..11e6331f49 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -1658,7 +1658,7 @@ ApplyWorkerMain(Datum main_arg)
 	{
 		char	   *syncslotname;
 
-		/* This is table synchroniation worker, call initial sync. */
+		/* This is table synchronization worker, call initial sync. */
 		syncslotname = LogicalRepSyncTableStart(&origin_startpos);
 
 		/* The slot name needs to be allocated in permanent memory context. */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index d378053de4..15e3eab550 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -404,7 +404,7 @@ sanityChecks(void)
 {
 	/* TODO Check that there's no backup_label in either cluster */
 
-	/* Check system_id match */
+	/* Check system_identifier match */
 	if (ControlFile_target.system_identifier != ControlFile_source.system_identifier)
 		pg_fatal("source and target clusters are from different systems");
 
diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README
index 00bffcf005..8eb15fafb9 100644
--- a/src/tools/pgindent/README
+++ b/src/tools/pgindent/README
@@ -31,7 +31,7 @@ DOING THE INDENT RUN:
 
 	wget -O src/tools/pgindent/typedefs.list https://buildfarm.postgresql.org/cgi-bin/typedefs.pl
 
-   (See https://www.pgbuildfarm.org/cgi-bin/typedefs.pl?show_list for a full
+   (See https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list for a full
    list of typedef files, if you want to indent some back branch.)
 
 3) Run pgindent on the C files:

  [text/x-patch] fixes_10.91-92.patch (1.1K, ../../9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com/11-fixes_10.91-92.patch)
  download | inline diff:
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5fb1f1b7d7..3713dd2884 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1797,7 +1797,7 @@ interpret_ident_response(const char *ident_response,
 /*
  *	Talk to the ident server on "remote_addr" and find out who
  *	owns the tcp connection to "local_addr"
- *	It the username successfully retrieved, check the usermap.
+ *	If the username successfully retrieved, check the usermap.
  *
  *	XXX: Using WaitLatchOrSocket() and doing a CHECK_FOR_INTERRUPTS() if the
  *	latch was set would improve the responsiveness to timeouts/cancellations.
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 8fc0a467f7..df7f271c10 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -745,7 +745,7 @@ initValue(long lng_val)
 	return 0;
 }
 
-/* return the position oft the right-most dot in some string */
+/* return the position of the right-most dot in some string */
 static int
 getRightMostDot(const char *str)
 {

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 10)
  2019-08-11 08:00 Re: Fix typos and inconsistencies for HEAD (take 10) Alexander Lakhin <exclusion@gmail.com>
@ 2019-08-13 04:56 ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-08-13 04:56 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Sun, Aug 11, 2019 at 11:00:00AM +0300, Alexander Lakhin wrote:
> 10.44. serendipitiously -> serendipitously

I didn't know that this even was a word:
https://www.thefreedictionary.com/serendipitously
But it seems to come from Horace Walpole.

> 10.50. sigsetmask -> pgsigsetmask

It should be pqsigsetmask.

> 10.81. SUE -> ShareUpdateExclusive

Your new comment had a typo here.

Please note that I have discarded the portion about the isolation
tests for now.  I need to have a second look at that part, and there
were already a lot of changes to review.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190813045647.GJ2551@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Fix typos and inconsistencies for HEAD (take 11)
@ 2019-08-19 04:04 Alexander Lakhin <exclusion@gmail.com>
  2019-08-19 07:22 ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 25+ messages in thread

From: Alexander Lakhin @ 2019-08-19 04:04 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>

Hello hackers,

Please consider fixing the last group (for now) of typos and
inconsistencies in the tree:

11.1 peforming -> performing
11.2 table_freeze_age -> freeze_table_age
11.3 TableInfoData -> TableDataInfo
11.4 TableStatus -> PgStat_TableStatus
11.5 TAG_VALID -> BM_TAG_VALID
11.6 TarDirectoryMethod -> WalTarMethod
11.7 targetss -> targets
11.8 tarReadRaw -> _tarReadRaw
11.9 Tcl_SetVar2 -> Tcl_SetVar2Ex
11.10 tcvn_to_utf8, utf8_to_tcvn -> windows_1258_to_utf8,
utf8_to_windows_1258
11.11 test_rls_hook_permissive, test_rls_hook_restrictive ->
test_rls_hooks_permissive, test_rls_hooks_restrictive
11.12 test_thread_funcs.c -> thread_test.c
11.13 threated -> treated
11.14 TidNode -> TidScan
11.15 tidPtr -> tss_TidPtr
11.16 TimestampTZ -> TimestampTz
11.17 TM_ZONE -> tm_zone
11.18 TOAST_DEBUG -> remove (orphaned since the introduction in 57d8080a)
11.19 TopTransactionState -> TopTransactionStateData
11.20 tpe -> type
11.21 tranasctions -> transactions
11.22 TransactionOid -> TransactionId
11.23 TupleLockUpdate -> LockTupleNoKeyExclusive
11.24 TUPLES_OK -> PGRES_TUPLES_OK
11.25 typstore -> tupstore
11.26 uniquePairs -> hstoreUniquePairs
11.27 upperIndex -> upperIndx
11.28 USER_NAME_SIZE -> remove (not used since the introduction in
c2e9b2f28)
11.29 VacLimit -> xidVacLimit
11.30 verfies -> verifies
11.31 verifymbstr -> pg_verifymbstr
11.32 VfdArray -> VfdCache
11.33 visca -> vice
11.34 v_spl_left, v_spl_right -> v-&gt;spl_left, v-&gt;spl_right
11.35 WaitforMultipleObjects -> WaitForMultipleObjects
11.36 walrcv_query -> walrcv_exec
11.37 max wal_size_mb -> max_wal_size_mb
11.38 WalWriteDelay -> WalWriterDelay
11.39 whichChkpti -> whichChkpt
11.40 win32_crashdump.c -> crashdump.c
11.41 worker_i -> worker_num
11.42 WorkingDirectorY -> WorkingDirectory
11.43 XactLockTableWaitErrorContextCb -> XactLockTableWaitErrorCb
11.44 xlblock -> xlblocks
11.45 xl_multi_insert -> xl_multi_insert_tuple
11.46 xlog_brin_update -> xl_brin_insert
11.47 XLogFakeRelcacheEntry -> CreateFakeRelcacheEntry
11.48 XLOGFileSlop -> XLOGfileslop
11.49 XLogreader -> XLogReader
11.50 XLogReadPage -> XLogRead
11.51 xl_rem_len -> xlp_rem_len
11.52 XMAX_EXCL_LOCK, XMAX_KEYSHR_LOCK -> HEAP_XMAX_EXCL_LOCK,
HEAP_XMAX_KEYSHR_LOCK
11.53 yyscanner_t -> yyscan_t
11.54 cdir -> cidr
11.55 examine_operator_expression -> examine_opclause_expression
11.56 list_qsort_comparator -> list_sort_comparator (renamed in 569ed7f4)
11.57 PASSBYVALUE -> PASSEDBYVALUE

Best regards,
Alexander

Attachments:

  [text/x-patch] fixes_11.1-10.patch (5.7K, ../../5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com/2-fixes_11.1-10.patch)
  download | inline diff:
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index f1d1005ae2..a7abf8c2ee 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -2875,7 +2875,7 @@
       </row>
 
       <row>
-       <entry><literal>tcvn_to_utf8</literal></entry>
+       <entry><literal>windows_1258_to_utf8</literal></entry>
        <entry><literal>WIN1258</literal></entry>
        <entry><literal>UTF8</literal></entry>
       </row>
@@ -3037,7 +3037,7 @@
       </row>
 
       <row>
-       <entry><literal>utf8_to_tcvn</literal></entry>
+       <entry><literal>utf8_to_windows_1258</literal></entry>
        <entry><literal>UTF8</literal></entry>
        <entry><literal>WIN1258</literal></entry>
       </row>
diff --git a/src/backend/access/nbtree/nbtsplitloc.c b/src/backend/access/nbtree/nbtsplitloc.c
index a7882fd874..c83016af71 100644
--- a/src/backend/access/nbtree/nbtsplitloc.c
+++ b/src/backend/access/nbtree/nbtsplitloc.c
@@ -814,7 +814,7 @@ _bt_bestsplitloc(FindSplitData *state, int perfectpenalty,
 		final->firstoldonright < state->newitemoff + MAX_LEAF_INTERVAL)
 	{
 		/*
-		 * Avoid the problem by peforming a 50:50 split when the new item is
+		 * Avoid the problem by performing a 50:50 split when the new item is
 		 * just to the right of the would-be "many duplicates" split point.
 		 */
 		final = &state->splits[0];
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 7d6c50b49d..e154507ecd 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -863,7 +863,7 @@ get_all_vacuum_rels(int options)
  *	 DEAD or RECENTLY_DEAD (see HeapTupleSatisfiesVacuum).
  * - freezeLimit is the Xid below which all Xids are replaced by
  *	 FrozenTransactionId during vacuum.
- * - xidFullScanLimit (computed from table_freeze_age parameter)
+ * - xidFullScanLimit (computed from freeze_table_age parameter)
  *	 represents a minimum Xid value; a table whose relfrozenxid is older than
  *	 this will have a full-table vacuum applied to it, to freeze tuples across
  *	 the whole table.  Vacuuming a table younger than this value can use a
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 58e2432aac..20ee1d3fb4 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -1776,7 +1776,7 @@ ExecInitExprRec(Expr *node, ExprState *state,
 				scratch.d.rowcompare_final.rctype = rcexpr->rctype;
 				ExprEvalPushStep(state, &scratch);
 
-				/* adjust jump targetss */
+				/* adjust jump targets */
 				foreach(lc, adjust_jumps)
 				{
 					ExprEvalStep *as = &state->steps[lfirst_int(lc)];
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 2bb14cdd02..d362e7f7d7 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -893,7 +893,7 @@ pgstat_report_stat(bool force)
 				this_msg->m_nentries = 0;
 			}
 		}
-		/* zero out TableStatus structs after use */
+		/* zero out PgStat_TableStatus structs after use */
 		MemSet(tsa->tsa_entries, 0,
 			   tsa->tsa_used * sizeof(PgStat_TableStatus));
 		tsa->tsa_used = 0;
diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h
index 94d0f6bc91..eb5bef8c3c 100644
--- a/src/bin/pg_basebackup/walmethods.h
+++ b/src/bin/pg_basebackup/walmethods.h
@@ -81,7 +81,7 @@ struct WalWriteMethod
 /*
  * Available WAL methods:
  *	- WalDirectoryMethod - write WAL to regular files in a standard pg_wal
- *	- TarDirectoryMethod - write WAL to a tarfile corresponding to pg_wal
+ *	- WalTarMethod       - write WAL to a tarfile corresponding to pg_wal
  *						   (only implements the methods required for pg_basebackup,
  *						   not all those required for pg_receivewal)
  */
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 0e547e83be..dead8fc580 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -568,7 +568,7 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
 			}
 		}
 		else
-			fatal("internal error -- neither th nor fh specified in tarReadRaw()");
+			fatal("internal error -- neither th nor fh specified in _tarReadRaw()");
 	}
 
 	ctx->tarFHpos += res + used;
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index be25e94cb2..34981401bf 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -17834,7 +17834,7 @@ processExtensionTables(Archive *fout, ExtensionInfo extinfo[],
 	}
 
 	/*
-	 * Now that all the TableInfoData objects have been created for all the
+	 * Now that all the TableDataInfo objects have been created for all the
 	 * extensions, check their FK dependencies and register them to try and
 	 * dump the data out in an order that they can be restored in.
 	 *
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index df2dda7e7e..6ffe184476 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -52,7 +52,7 @@
 /*
  * Flags for buffer descriptors
  *
- * Note: TAG_VALID essentially means that there is a buffer hashtable
+ * Note: BM_TAG_VALID essentially means that there is a buffer hashtable
  * entry associated with the buffer's tag.
  */
 #define BM_LOCKED				(1U << 22)	/* buffer header is locked */
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index b318854d6c..8277d1ea85 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -3027,7 +3027,7 @@ pltcl_set_tuple_values(Tcl_Interp *interp, const char *arrayname,
 	const char *nullname = NULL;
 
 	/************************************************************
-	 * Prepare pointers for Tcl_SetVar2() below
+	 * Prepare pointers for Tcl_SetVar2Ex() below
 	 ************************************************************/
 	if (arrayname == NULL)
 	{

  [text/x-patch] fixes_11.11-20.patch (5.4K, ../../5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com/3-fixes_11.11-20.patch)
  download | inline diff:
diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c
index 74233bb931..970e78d849 100644
--- a/src/backend/access/heap/tuptoaster.c
+++ b/src/backend/access/heap/tuptoaster.c
@@ -44,8 +44,6 @@
 #include "utils/typcache.h"
 
 
-#undef TOAST_DEBUG
-
 /*
  *	The information at the start of the compressed toast data.
  */
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 52e9643305..f594d33e7a 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -92,8 +92,8 @@ int			synchronous_commit = SYNCHRONOUS_COMMIT_ON;
  * in the user backend, so we need some additional bookkeeping.
  *
  * XactTopFullTransactionId stores the XID of our toplevel transaction, which
- * will be the same as TopTransactionState.fullTransactionId in an ordinary
- * backend; but in a parallel backend, which does not have the entire
+ * will be the same as TopTransactionStateData.fullTransactionId in an
+ * ordinary backend; but in a parallel backend, which does not have the entire
  * transaction state, it will instead be copied from the backend that started
  * the parallel operation.
  *
diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c
index 83ece6bf56..8cf22d5bf0 100644
--- a/src/backend/executor/nodeTidscan.c
+++ b/src/backend/executor/nodeTidscan.c
@@ -432,7 +432,7 @@ TidRecheck(TidScanState *node, TupleTableSlot *slot)
  *		Initial States:
  *		  -- the relation indicated is opened for scanning so that the
  *			 "cursor" is positioned before the first qualifying tuple.
- *		  -- tidPtr is -1.
+ *		  -- tss_TidPtr is -1.
  * ----------------------------------------------------------------
  */
 static TupleTableSlot *
@@ -498,7 +498,7 @@ ExecEndTidScan(TidScanState *node)
  *		scan keys, and opens the base and tid relations.
  *
  *		Parameters:
- *		  node: TidNode node produced by the planner.
+ *		  node: TidScan node produced by the planner.
  *		  estate: the execution state initialized in InitPlan.
  * ----------------------------------------------------------------
  */
diff --git a/src/backend/tsearch/dict_synonym.c b/src/backend/tsearch/dict_synonym.c
index b6226df940..ba1582c451 100644
--- a/src/backend/tsearch/dict_synonym.c
+++ b/src/backend/tsearch/dict_synonym.c
@@ -37,7 +37,7 @@ typedef struct
  * Finds the next whitespace-delimited word within the 'in' string.
  * Returns a pointer to the first character of the word, and a pointer
  * to the next byte after the last character in the word (in *end).
- * Character '*' at the end of word will not be threated as word
+ * Character '*' at the end of word will not be treated as word
  * character if flags is not null.
  */
 static char *
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index 171ade273b..fb86ea2e08 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -282,7 +282,7 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem)
 				if (!dictExists)
 				{
 					/*
-					 * Dictionary can't work with current tpe of lexeme,
+					 * Dictionary can't work with current type of lexeme,
 					 * return to basic mode and redo all stored lexemes
 					 */
 					ld->curDictId = InvalidOid;
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 61a24c2e3c..bc6e03fbc7 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -25,7 +25,7 @@
 
 #include <signal.h>
 
-#include "datatype/timestamp.h" /* for TimestampTZ */
+#include "datatype/timestamp.h" /* for TimestampTz */
 #include "pgtime.h"				/* for pg_time_t */
 
 
diff --git a/src/test/modules/test_rls_hooks/README b/src/test/modules/test_rls_hooks/README
index b61dace572..c22e0d3fb4 100644
--- a/src/test/modules/test_rls_hooks/README
+++ b/src/test/modules/test_rls_hooks/README
@@ -3,13 +3,13 @@ define additional policies to be used.
 
 Functions
 =========
-test_rls_hook_permissive(CmdType cmdtype, Relation relation)
+test_rls_hooks_permissive(CmdType cmdtype, Relation relation)
     RETURNS List*
 
 Returns a list of policies which should be added to any existing
 policies on the relation, combined with OR.
 
-test_rls_hook_restrictive(CmdType cmdtype, Relation relation)
+test_rls_hooks_restrictive(CmdType cmdtype, Relation relation)
     RETURNS List*
 
 Returns a list of policies which should be added to any existing
diff --git a/src/test/thread/thread_test.c b/src/test/thread/thread_test.c
index 5392439146..4fbba78ef6 100644
--- a/src/test/thread/thread_test.c
+++ b/src/test/thread/thread_test.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * test_thread_funcs.c
+ * thread_test.c
  *		libc thread test program
  *
  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
diff --git a/src/timezone/localtime.c b/src/timezone/localtime.c
index 1d9244bc0a..333f27300a 100644
--- a/src/timezone/localtime.c
+++ b/src/timezone/localtime.c
@@ -36,7 +36,7 @@
  *		in which Daylight Saving Time is never observed.
  *	4.	They might reference tzname[0] after setting to a time zone
  *		in which Standard Time is never observed.
- *	5.	They might reference tm.TM_ZONE after calling offtime.
+ *	5.	They might reference tm.tm_zone after calling offtime.
  * What's best to do in the above cases is open to debate;
  * for now, we just set things up so that in any of the five cases
  * WILDABBR is used. Another possibility: initialize tzname[0] to the

  [text/x-patch] fixes_11.21-30.patch (5.9K, ../../5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com/4-fixes_11.21-30.patch)
  download | inline diff:
diff --git a/contrib/hstore/hstore_op.c b/contrib/hstore/hstore_op.c
index 87f1aef3a3..a3a8a91827 100644
--- a/contrib/hstore/hstore_op.c
+++ b/contrib/hstore/hstore_op.c
@@ -682,8 +682,8 @@ hstore_slice_to_hstore(PG_FUNCTION_ARGS)
 	}
 
 	/*
-	 * we don't use uniquePairs here because we know that the pairs list is
-	 * already sorted and uniq'ed.
+	 * we don't use hstoreUniquePairs here because we know that the pairs list
+	 * is already sorted and uniq'ed.
 	 */
 
 	out = hstorePairs(out_pairs, out_count, bufsiz);
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 718f07f4f6..e4ad1919fe 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -3165,8 +3165,8 @@ l2:
 			 * Note that the multixact may not be done by now.  It could have
 			 * surviving members; our own xact or other subxacts of this
 			 * backend, and also any other concurrent transaction that locked
-			 * the tuple with KeyShare if we only got TupleLockUpdate.  If
-			 * this is the case, we have to be careful to mark the updated
+			 * the tuple with KeyShare if we only got LockTupleNoKeyExclusive.
+			 * If this is the case, we have to be careful to mark the updated
 			 * tuple with the surviving members in Xmax.
 			 *
 			 * Note that there could have been another update in the
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index 5b759ec7f3..b18eee42d4 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -488,7 +488,7 @@ ForceTransactionIdLimitUpdate(void)
 	if (!TransactionIdIsValid(xidVacLimit))
 		return true;			/* this shouldn't happen anymore either */
 	if (TransactionIdFollowsOrEquals(nextXid, xidVacLimit))
-		return true;			/* past VacLimit, don't delay updating */
+		return true;			/* past xidVacLimit, don't delay updating */
 	if (!SearchSysCacheExists1(DATABASEOID, ObjectIdGetDatum(oldestXidDB)))
 		return true;			/* could happen, per comments above */
 	return false;
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index b35043bf71..4795c6fa94 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -267,7 +267,7 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
 	values[0] = LSNGetDatum(stoppoint);
 
 	tuplestore_putvalues(tupstore, tupdesc, values, nulls);
-	tuplestore_donestoring(typstore);
+	tuplestore_donestoring(tupstore);
 
 	return (Datum) 0;
 }
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 5fa3d7323e..409f787ac3 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -3368,7 +3368,7 @@ ApplyLogicalMappingFile(HTAB *tuplecid_data, Oid relid, const char *fname)
 
 
 /*
- * Check whether the TransactionOid 'xid' is in the pre-sorted array 'xip'.
+ * Check whether the TransactionId 'xid' is in the pre-sorted array 'xip'.
  */
 static bool
 TransactionIdInArray(TransactionId xid, TransactionId *xip, Size num)
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index ec8fbb9a7d..8079b13ba5 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -1997,7 +1997,7 @@ array_get_element_expanded(Datum arraydatum,
 
 /*
  * array_get_slice :
- *		   This routine takes an array and a range of indices (upperIndex and
+ *		   This routine takes an array and a range of indices (upperIndx and
  *		   lowerIndx), creates a new array structure for the referred elements
  *		   and returns a pointer to it.
  *
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index b3bbb903fc..f724ecf9ca 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -15,9 +15,6 @@
 /* Use port in the private/dynamic port number range */
 #define DEF_PGUPORT			50432
 
-/* Allocate for null byte */
-#define USER_NAME_SIZE		128
-
 #define MAX_STRING			1024
 #define QUERY_ALLOC			8192
 
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
index bbba48bc8b..b04f7ec123 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -317,8 +317,8 @@ pqParseInput3(PGconn *conn)
 					 *
 					 * If we're doing a Describe, we have to pass something
 					 * back to the client, so set up a COMMAND_OK result,
-					 * instead of TUPLES_OK.  Otherwise we can just ignore
-					 * this message.
+					 * instead of PGRES_TUPLES_OK.  Otherwise we can just
+					 * ignore this message.
 					 */
 					if (conn->queryclass == PGQUERY_DESCRIBE)
 					{
diff --git a/src/test/isolation/specs/freeze-the-dead.spec b/src/test/isolation/specs/freeze-the-dead.spec
index e24d7d5d11..8c3649902a 100644
--- a/src/test/isolation/specs/freeze-the-dead.spec
+++ b/src/test/isolation/specs/freeze-the-dead.spec
@@ -42,7 +42,7 @@ step "s3_key_share"	{ SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; }
 step "s3_commit"	{ COMMIT; }
 step "s3_vacuum"	{ VACUUM FREEZE tab_freeze; }
 
-# This permutation verfies that a previous bug
+# This permutation verifies that a previous bug
 #     https://postgr.es/m/E5711E62-8FDF-4DCA-A888-C200BF6B5742@amazon.com
 #     https://postgr.es/m/20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de
 # is not reintroduced. We used to make wrong pruning / freezing
diff --git a/src/test/isolation/specs/read-only-anomaly-3.spec b/src/test/isolation/specs/read-only-anomaly-3.spec
index 58a159a949..d43fc2e03f 100644
--- a/src/test/isolation/specs/read-only-anomaly-3.spec
+++ b/src/test/isolation/specs/read-only-anomaly-3.spec
@@ -2,7 +2,7 @@
 # isolation"[1].
 #
 # Here we test that serializable snapshot isolation can avoid the anomaly
-# without aborting any tranasctions, by instead causing s3 to be deferred
+# without aborting any transactions, by instead causing s3 to be deferred
 # until a safe snapshot can be taken.
 #
 # [1] http://www.cs.umb.edu/~poneil/ROAnom.pdf

  [text/x-patch] fixes_11.31-40.patch (5.8K, ../../5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com/5-fixes_11.31-40.patch)
  download | inline diff:
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index f1b46fd113..10422254c8 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -697,8 +697,8 @@ my_picksplit(PG_FUNCTION_ARGS)
 
         /*
          * Choose where to put the index entries and update unionL and unionR
-         * accordingly. Append the entries to either v_spl_left or
-         * v_spl_right, and care about the counters.
+         * accordingly. Append the entries to either v-&gt;spl_left or
+         * v-&gt;spl_right, and care about the counters.
          */
 
         if (my_choice_is_left(unionL, curl, unionR, curr))
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f553523857..4203a30097 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -743,7 +743,7 @@ static ControlFileData *ControlFile = NULL;
  */
 #define UsableBytesInPage (XLOG_BLCKSZ - SizeOfXLogShortPHD)
 
-/* Convert min_wal_size_mb and max wal_size_mb to equivalent segment count */
+/* Convert min_wal_size_mb and max_wal_size_mb to equivalent segment count */
 #define ConvertToXSegs(x, segsize)	\
 	(x / ((segsize) / (1024 * 1024)))
 
@@ -903,7 +903,7 @@ static XLogRecord *ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr,
 							  int emode, bool fetching_ckpt);
 static void CheckRecoveryConsistency(void);
 static XLogRecord *ReadCheckpointRecord(XLogReaderState *xlogreader,
-										XLogRecPtr RecPtr, int whichChkpti, bool report);
+										XLogRecPtr RecPtr, int whichChkpt, bool report);
 static bool rescanLatestTimeLine(void);
 static void WriteControlFile(void);
 static void ReadControlFile(void);
@@ -3049,9 +3049,9 @@ XLogBackgroundFlush(void)
 	else if (TimestampDifferenceExceeds(lastflush, now, WalWriterDelay))
 	{
 		/*
-		 * Flush the writes at least every WalWriteDelay ms. This is important
-		 * to bound the amount of time it takes for an asynchronous commit to
-		 * hit disk.
+		 * Flush the writes at least every WalWriterDelay ms. This is
+		 * important to bound the amount of time it takes for an asynchronous
+		 * commit to hit disk.
 		 */
 		WriteRqst.Flush = WriteRqst.Write;
 		lastflush = now;
diff --git a/src/backend/port/win32/crashdump.c b/src/backend/port/win32/crashdump.c
index e0e94f7828..b1fe5d3430 100644
--- a/src/backend/port/win32/crashdump.c
+++ b/src/backend/port/win32/crashdump.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * win32_crashdump.c
+ * crashdump.c
  *		   Automatic crash dump creation for PostgreSQL on Windows
  *
  * The crashdump feature traps unhandled win32 exceptions produced by the
diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c
index bafd31d22b..bb2baff763 100644
--- a/src/backend/postmaster/syslogger.c
+++ b/src/backend/postmaster/syslogger.c
@@ -1114,7 +1114,7 @@ write_syslogger_file(const char *buffer, int count, int destination)
 /*
  * Worker thread to transfer data from the pipe to the current logfile.
  *
- * We need this because on Windows, WaitforMultipleObjects does not work on
+ * We need this because on Windows, WaitForMultipleObjects does not work on
  * unnamed pipes: it always reports "signaled", so the blocking ReadFile won't
  * allow for SIGHUP; and select is for sockets only.
  */
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index a76112d6cd..2de2105105 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -269,7 +269,7 @@ static int	nextTempTableSpace = 0;
  * LruInsert	   - put a file at the front of the Lru ring and open it
  * ReleaseLruFile  - Release an fd by closing the last entry in the Lru ring
  * ReleaseLruFiles - Release fd(s) until we're under the max_safe_fds limit
- * AllocateVfd	   - grab a free (or new) file record (from VfdArray)
+ * AllocateVfd	   - grab a free (or new) file record (from VfdCache)
  * FreeVfd		   - free a file record
  *
  * The Least Recently Used ring is a doubly linked list that begins and
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 15fda7f122..b2f08ead45 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -1916,7 +1916,7 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen,
 		 * error message by letting pg_verifymbstr check the string.  But it's
 		 * possible that the string is OK to us, and not OK to mbstowcs ---
 		 * this suggests that the LC_CTYPE locale is different from the
-		 * database encoding.  Give a generic error message if verifymbstr
+		 * database encoding.  Give a generic error message if pg_verifymbstr
 		 * can't find anything wrong.
 		 */
 		pg_verifymbstr(from, fromlen, false);	/* might not return */
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index 9a1ae13ab1..5c9112362c 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -742,7 +742,7 @@ FreePageBtreeConsolidate(FreePageManager *fpm, FreePageBtree *btp)
 
 	/*
 	 * If we can fit our keys onto our left sibling's page, consolidate. In
-	 * this case, we move our keys onto the other page rather than visca
+	 * this case, we move our keys onto the other page rather than vice
 	 * versa, to avoid having to adjust ancestor keys.
 	 */
 	np = FreePageBtreeFindLeftSibling(base, btp);
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h
index bc9468b519..e12a934966 100644
--- a/src/include/replication/walreceiver.h
+++ b/src/include/replication/walreceiver.h
@@ -187,7 +187,7 @@ typedef enum
 } WalRcvExecStatus;
 
 /*
- * Return value for walrcv_query, returns the status of the execution and
+ * Return value for walrcv_exec, returns the status of the execution and
  * tuples if any.
  */
 typedef struct WalRcvExecResult

  [text/x-patch] fixes_11.41-50.patch (5.6K, ../../5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com/6-fixes_11.41-50.patch)
  download | inline diff:
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f553523857..b3564796c8 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -626,7 +626,7 @@ typedef struct XLogCtlData
 
 	/*
 	 * These values do not change after startup, although the pointed-to pages
-	 * and xlblocks values certainly do.  xlblock values are protected by
+	 * and xlblocks values certainly do.  xlblocks values are protected by
 	 * WALBufMappingLock.
 	 */
 	char	   *pages;			/* buffers for unwritten XLOG pages */
@@ -8442,7 +8442,7 @@ LogCheckpointEnd(bool restartpoint)
  * Update the estimate of distance between checkpoints.
  *
  * The estimate is used to calculate the number of WAL segments to keep
- * preallocated, see XLOGFileSlop().
+ * preallocated, see XLOGfileslop().
  */
 static void
 UpdateCheckPointDistanceEstimate(uint64 nbytes)
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index 10a663bae6..1fc39333f1 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -523,7 +523,7 @@ XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum,
 }
 
 /*
- * Struct actually returned by XLogFakeRelcacheEntry, though the declared
+ * Struct actually returned by CreateFakeRelcacheEntry, though the declared
  * return type is Relation.
  */
 typedef struct
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index e172dad07f..23870a25a5 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -866,7 +866,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
 
 	parseCreateReplSlotOptions(cmd, &reserve_wal, &snapshot_action);
 
-	/* setup state for XLogReadPage */
+	/* setup state for XLogRead */
 	sendTimeLineIsHistoric = false;
 	sendTimeLine = ThisTimeLineID;
 
diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c
index f838b0f758..4682438114 100644
--- a/src/backend/storage/lmgr/lmgr.c
+++ b/src/backend/storage/lmgr/lmgr.c
@@ -792,7 +792,7 @@ SpeculativeInsertionWait(TransactionId xid, uint32 token)
 }
 
 /*
- * XactLockTableWaitErrorContextCb
+ * XactLockTableWaitErrorCb
  *		Error context callback for transaction lock waits.
  */
 static void
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c
index f0439edce3..63c3879ead 100644
--- a/src/bin/pg_rewind/parsexlog.c
+++ b/src/bin/pg_rewind/parsexlog.c
@@ -234,7 +234,7 @@ findLastCheckpoint(const char *datadir, XLogRecPtr forkptr, int tliIndex,
 	}
 }
 
-/* XLogreader callback function, to read a WAL page */
+/* XLogReader callback function, to read a WAL page */
 static int
 SimpleXLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr,
 				   int reqLen, XLogRecPtr targetRecPtr, char *readBuf,
diff --git a/src/include/access/brin_xlog.h b/src/include/access/brin_xlog.h
index f0ed33659b..5583ea7154 100644
--- a/src/include/access/brin_xlog.h
+++ b/src/include/access/brin_xlog.h
@@ -77,7 +77,7 @@ typedef struct xl_brin_insert
  * A cross-page update is the same as an insert, but also stores information
  * about the old tuple.
  *
- * Like in xlog_brin_update:
+ * Like in xl_brin_insert:
  * Backup block 0: new page, block data includes the new BrinTuple.
  * Backup block 1: revmap page
  *
diff --git a/src/include/access/heapam_xlog.h b/src/include/access/heapam_xlog.h
index 9629db9df4..d72d4e1b8e 100644
--- a/src/include/access/heapam_xlog.h
+++ b/src/include/access/heapam_xlog.h
@@ -168,7 +168,7 @@ typedef struct xl_heap_insert
  *
  * In block 0's data portion, there is an xl_multi_insert_tuple struct,
  * followed by the tuple data for each tuple. There is padding to align
- * each xl_multi_insert struct.
+ * each xl_multi_insert_tuple struct.
  */
 typedef struct xl_heap_multi_insert
 {
diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h
index f8b79ec120..8639891c16 100644
--- a/src/include/commands/explain.h
+++ b/src/include/commands/explain.h
@@ -84,7 +84,7 @@ extern void ExplainPrintTriggers(ExplainState *es, QueryDesc *queryDesc);
 
 extern void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc);
 extern void ExplainPrintJIT(ExplainState *es, int jit_flags,
-							struct JitInstrumentation *jit_instr, int worker_i);
+							struct JitInstrumentation *jit_instr, int worker_num);
 
 extern void ExplainQueryText(ExplainState *es, QueryDesc *queryDesc);
 
diff --git a/src/tools/msvc/ecpg_regression.proj b/src/tools/msvc/ecpg_regression.proj
index 9fa4a69021..ec2760b1f6 100644
--- a/src/tools/msvc/ecpg_regression.proj
+++ b/src/tools/msvc/ecpg_regression.proj
@@ -54,7 +54,7 @@
 
   <!-- Run ECPG and the Visual C++ compiler on the files. Don't bother with dependency check between the steps -->
   <Exec WorkingDirectory="%(Pgc.RelativeDir)" Command="$(OUTDIR)ecpg\ecpg -I ../../include --regression $(ECPGPARAM) -o %(Pgc.Filename).c %(Pgc.Filename).pgc" />
-  <Exec WorkingDirectorY="%(Pgc.RelativeDir)" Command="cl /nologo %(Pgc.FileName).c /TC /MD$(DEBUGLIB) /DENABLE_THREAD_SAFETY /DWIN32 /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:$(OUTDIR)libecpg\libecpg.lib /defaultlib:$(OUTDIR)libecpg_compat\libecpg_compat.lib /defaultlib:$(OUTDIR)libpgtypes\libpgtypes.lib" />
+  <Exec WorkingDirectory="%(Pgc.RelativeDir)" Command="cl /nologo %(Pgc.FileName).c /TC /MD$(DEBUGLIB) /DENABLE_THREAD_SAFETY /DWIN32 /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:$(OUTDIR)libecpg\libecpg.lib /defaultlib:$(OUTDIR)libecpg_compat\libecpg_compat.lib /defaultlib:$(OUTDIR)libpgtypes\libpgtypes.lib" />
  </Target>
 
  <!-- Clean up all output files -->

  [text/x-patch] fixes_11.51-57.patch (4.2K, ../../5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com/7-fixes_11.51-57.patch)
  download | inline diff:
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 48f17ba8d5..bde13e631c 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1189,7 +1189,7 @@ statext_clauselist_selectivity(PlannerInfo *root, List *clauses, int varRelid,
 }
 
 /*
- * examine_operator_expression
+ * examine_opclause_expression
  *		Split expression into Var and Const parts.
  *
  * Attempts to match the arguments to either (Var op Const) or (Const op Var),
diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c
index 3d536a1662..a6dd8b75aa 100644
--- a/src/backend/utils/adt/network.c
+++ b/src/backend/utils/adt/network.c
@@ -579,7 +579,7 @@ network_abbrev_abort(int memtupcount, SortSupport ssup)
  * IPv4 addresses have a maximum of 32 bits compared to IPv6's 64 bits, so in
  * IPv6 each part may be larger.
  *
- * inet/cdir types compare using these sorting rules. If inequality is detected
+ * inet/cidr types compare using these sorting rules. If inequality is detected
  * at any step, comparison is finished. If any rule is a tie, the algorithm
  * drops through to the next to break it:
  *
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index d40800709b..bcc7404c55 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2705,7 +2705,7 @@ psql_completion(const char *text, int start, int end)
 		if (TailMatches("(|*,"))
 			COMPLETE_WITH("INPUT", "OUTPUT", "RECEIVE", "SEND",
 						  "TYPMOD_IN", "TYPMOD_OUT", "ANALYZE",
-						  "INTERNALLENGTH", "PASSBYVALUE", "ALIGNMENT",
+						  "INTERNALLENGTH", "PASSEDBYVALUE", "ALIGNMENT",
 						  "STORAGE", "LIKE", "CATEGORY", "PREFERRED",
 						  "DEFAULT", "ELEMENT", "DELIMITER",
 						  "COLLATABLE");
diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h
index 27f963e9e8..66d61fd570 100644
--- a/src/include/access/htup_details.h
+++ b/src/include/access/htup_details.h
@@ -233,7 +233,7 @@ struct HeapTupleHeaderData
 
 /*
  * A tuple that has HEAP_XMAX_IS_MULTI and HEAP_XMAX_LOCK_ONLY but neither of
- * XMAX_EXCL_LOCK and XMAX_KEYSHR_LOCK must come from a tuple that was
+ * HEAP_XMAX_EXCL_LOCK and HEAP_XMAX_KEYSHR_LOCK must come from a tuple that was
  * share-locked in 9.2 or earlier and then pg_upgrade'd.
  *
  * In 9.2 and prior, HEAP_XMAX_IS_MULTI was only set when there were multiple
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index b986a38575..3f0de6625d 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -45,7 +45,7 @@ typedef struct XLogPageHeaderData
 	 * continue on the next page.  xlp_rem_len is the number of bytes
 	 * remaining from a previous page.
 	 *
-	 * Note that xl_rem_len includes backup-block data; that is, it tracks
+	 * Note that xlp_rem_len includes backup-block data; that is, it tracks
 	 * xl_tot_len not xl_len in the initial header.  Also note that the
 	 * continuation data isn't necessarily aligned.
 	 */
diff --git a/src/include/fe_utils/psqlscan_int.h b/src/include/fe_utils/psqlscan_int.h
index 2acb380078..c538ece197 100644
--- a/src/include/fe_utils/psqlscan_int.h
+++ b/src/include/fe_utils/psqlscan_int.h
@@ -27,7 +27,7 @@
  * is the start state number, which is easy enough to manage --- usually,
  * in fact, we just need to set it to INITIAL when changing lexers.  But to
  * make that work at all, we must use re-entrant lexers, so that all the
- * relevant state is in the yyscanner_t attached to the PsqlScanState;
+ * relevant state is in the yyscan_t attached to the PsqlScanState;
  * if we were using lexers with separate static state we would soon end up
  * with dangling buffer pointers in one or the other.  Also note that this
  * is unlikely to work very nicely if the lexers aren't all built with the
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 432d2d812e..35f1cff61b 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -2981,7 +2981,7 @@ leafSegmentInfo
 leaf_item
 line_t
 lineno_t
-list_qsort_comparator
+list_sort_comparator
 locale_t
 locate_agg_of_level_context
 locate_var_of_level_context

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 11)
  2019-08-19 04:04 Fix typos and inconsistencies for HEAD (take 11) Alexander Lakhin <exclusion@gmail.com>
@ 2019-08-19 07:22 ` Michael Paquier <michael@paquier.xyz>
  2019-08-19 07:39   ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
  2019-08-20 20:47   ` Re: Fix typos and inconsistencies for HEAD (take 11) Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 2 replies; 25+ messages in thread

From: Michael Paquier @ 2019-08-19 07:22 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Mon, Aug 19, 2019 at 07:04:04AM +0300, Alexander Lakhin wrote:
> 11.23 TupleLockUpdate -> LockTupleNoKeyExclusive

Not sure about this one, so discarded for now.  Alvaro?

> 11.25 typstore -> tupstore

This one is cute.  It actually does not cause a compilation failure as
tuplestore_donestoring() is a no-op.

> 11.33 visca -> vice

This one is interesting latin.

> 11.57 PASSBYVALUE -> PASSEDBYVALUE

Will fix this one separately and back-patch.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190819072244.GE18166@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 11)
  2019-08-19 04:04 Fix typos and inconsistencies for HEAD (take 11) Alexander Lakhin <exclusion@gmail.com>
  2019-08-19 07:22 ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
@ 2019-08-19 07:39   ` Michael Paquier <michael@paquier.xyz>
  1 sibling, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-08-19 07:39 UTC (permalink / raw)
  To: Alexander Lakhin <exclusion@gmail.com>; +Cc: pgsql-hackers

On Mon, Aug 19, 2019 at 04:22:44PM +0900, Michael Paquier wrote:
> On Mon, Aug 19, 2019 at 07:04:04AM +0300, Alexander Lakhin wrote:
>> 11.57 PASSBYVALUE -> PASSEDBYVALUE
> 
> Will fix this one separately and back-patch.

No need to, actually, as the error comes from 7bdc655.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190819073954.GF18166@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 11)
  2019-08-19 04:04 Fix typos and inconsistencies for HEAD (take 11) Alexander Lakhin <exclusion@gmail.com>
  2019-08-19 07:22 ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
@ 2019-08-20 20:47   ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2019-08-21 07:37     ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 25+ messages in thread

From: Alvaro Herrera @ 2019-08-20 20:47 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Alexander Lakhin <exclusion@gmail.com>; pgsql-hackers

On 2019-Aug-19, Michael Paquier wrote:

> On Mon, Aug 19, 2019 at 07:04:04AM +0300, Alexander Lakhin wrote:
> > 11.23 TupleLockUpdate -> LockTupleNoKeyExclusive
> 
> Not sure about this one, so discarded for now.  Alvaro?

Yeah, Alexander proposed change is correct.  I just pushed it.

> > 11.33 visca -> vice
> 
> This one is interesting latin.

Well, it's a regular Haasism.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 25+ messages in thread

* Re: Fix typos and inconsistencies for HEAD (take 11)
  2019-08-19 04:04 Fix typos and inconsistencies for HEAD (take 11) Alexander Lakhin <exclusion@gmail.com>
  2019-08-19 07:22 ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
  2019-08-20 20:47   ` Re: Fix typos and inconsistencies for HEAD (take 11) Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2019-08-21 07:37     ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 25+ messages in thread

From: Michael Paquier @ 2019-08-21 07:37 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Alexander Lakhin <exclusion@gmail.com>; pgsql-hackers

On Tue, Aug 20, 2019 at 04:47:41PM -0400, Alvaro Herrera wrote:
> Yeah, Alexander proposed change is correct.  I just pushed it.

Thanks, Alvaro.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190821073714.GD26424@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 25+ messages in thread


end of thread, other threads:[~2019-08-21 07:37 UTC | newest]

Thread overview: 25+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-07 05:03 Fix typos and inconsistencies for HEAD (take 5) Alexander Lakhin <exclusion@gmail.com>
2019-07-08 04:14 ` Michael Paquier <michael@paquier.xyz>
2019-07-14 05:24 Fix typos and inconsistencies for HEAD (take 6) Alexander Lakhin <exclusion@gmail.com>
2019-07-16 04:24 ` Re: Fix typos and inconsistencies for HEAD (take 6) Michael Paquier <michael@paquier.xyz>
2019-07-21 05:28 Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
2019-07-21 16:34 ` Re: Fix typos and inconsistencies for HEAD (take 7) Tom Lane <tgl@sss.pgh.pa.us>
2019-07-22 01:05 ` Re: Fix typos and inconsistencies for HEAD (take 7) Michael Paquier <michael@paquier.xyz>
2019-07-22 04:14   ` Re: Fix typos and inconsistencies for HEAD (take 7) Tom Lane <tgl@sss.pgh.pa.us>
2019-07-22 05:00     ` Re: Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
2019-07-22 04:31   ` Re: Fix typos and inconsistencies for HEAD (take 7) Alexander Lakhin <exclusion@gmail.com>
2019-07-28 04:44 Fix typos and inconsistencies for HEAD (take 8) Alexander Lakhin <exclusion@gmail.com>
2019-07-29 03:39 ` Re: Fix typos and inconsistencies for HEAD (take 8) Michael Paquier <michael@paquier.xyz>
2019-08-04 21:33 Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
2019-08-05 03:15 ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
2019-08-05 03:44   ` Re: Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
2019-08-05 05:40     ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
2019-08-05 06:30       ` Re: Fix typos and inconsistencies for HEAD (take 9) Alexander Lakhin <exclusion@gmail.com>
2019-08-05 05:33   ` Re: Fix typos and inconsistencies for HEAD (take 9) Michael Paquier <michael@paquier.xyz>
2019-08-11 08:00 Re: Fix typos and inconsistencies for HEAD (take 10) Alexander Lakhin <exclusion@gmail.com>
2019-08-13 04:56 ` Re: Fix typos and inconsistencies for HEAD (take 10) Michael Paquier <michael@paquier.xyz>
2019-08-19 04:04 Fix typos and inconsistencies for HEAD (take 11) Alexander Lakhin <exclusion@gmail.com>
2019-08-19 07:22 ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
2019-08-19 07:39   ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>
2019-08-20 20:47   ` Re: Fix typos and inconsistencies for HEAD (take 11) Alvaro Herrera <alvherre@2ndquadrant.com>
2019-08-21 07:37     ` Re: Fix typos and inconsistencies for HEAD (take 11) Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox