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/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 nodeToString, so that debugging routines that attempt to
print the custom path will work as designed. methods must
point to a (usually statically allocated) object implementing the required
- custom path methods, of which there is currently only one. The
- LibraryName and SymbolName 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.
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 name. This requires
specifying the MSFUNC, MINVFUNC,
and MSTYPE parameters, and optionally
- the MSPACE, MFINALFUNC,
+ the MSSPACE, MFINALFUNC,
MFINALFUNC_EXTRA, MFINALFUNC_MODIFY,
and MINITCOND parameters. Except for MINVFUNC,
these parameters work like the corresponding simple-aggregate parameters
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 validator_function_name(oid)
Finally, the PL must be declared with the command
-CREATE TRUSTED LANGUAGE language-name
+CREATE TRUSTED LANGUAGE language_name
HANDLER handler_function_name
INLINE inline_function_name
VALIDATOR validator_function_name ;
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/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/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/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 72a448ad31..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,
@@ -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/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/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/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index da3d250986..f553523857 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1796,11 +1796,11 @@ 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
+ * 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
@@ -6024,7 +6024,10 @@ recoveryApplyDelay(XLogReaderState *record)
TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime,
&secs, µsecs);
- /* 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/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/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/libpq/auth.c b/src/backend/libpq/auth.c
index 9358219aa6..e17fd9a317 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 "remote_addr" and find out who
+ * owns the tcp connection to "local_addr"
+ * 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/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/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/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/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/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/tcop/pquery.c b/src/backend/tcop/pquery.c
index 1ed2838ad4..9e48adc53c 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -1023,8 +1023,8 @@ 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_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,
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 .
- * Special thanks to Lars Mathiesen for the LABORT code.
+ * Special thanks to Lars Mathiesen 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/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/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/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 , 2001;
- * licence: BSD
+ * license: BSD
*
* src/bin/pg_controldata/pg_controldata.c
*/
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 ca6a9efd9c..57c4ed6913 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -19,11 +19,8 @@
#define USER_NAME_SIZE 128
#define MAX_STRING 1024
-#define LINE_ALLOC 4096
#define QUERY_ALLOC 8192
-#define MIGRATOR_API_VERSION 1
-
#define MESSAGE_WIDTH 60
#define GET_MAJOR_VERSION(v) ((v) / 100)
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/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/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);
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/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/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/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/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_ */
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;
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);
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
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 "$@"