Fix inconsistencies and typos in the tree, take 11

This fixes various typos in docs and comments, and removes some orphaned
definitions.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/5da8e325-c665-da95-21e0-c8a99ea61fbf@gmail.com
This commit is contained in:
Michael Paquier 2019-08-19 16:21:39 +09:00
parent 927f34ce8a
commit c96581abe4
48 changed files with 60 additions and 65 deletions

View File

@ -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);

View File

@ -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>

View File

@ -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))

View File

@ -44,8 +44,6 @@
#include "utils/typcache.h"
#undef TOAST_DEBUG
/*
* The information at the start of the compressed toast data.
*/

View File

@ -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;

View File

@ -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.
*

View File

@ -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 */
@ -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;
@ -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)

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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)];

View File

@ -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.
* ----------------------------------------------------------------
*/

View File

@ -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

View File

@ -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;

View File

@ -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.
*/

View File

@ -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)

View File

@ -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;

View File

@ -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),

View File

@ -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

View File

@ -792,7 +792,7 @@ SpeculativeInsertionWait(TransactionId xid, uint32 token)
}
/*
* XactLockTableWaitErrorContextCb
* XactLockTableWaitErrorCb
* Error context callback for transaction lock waits.
*/
static void

View File

@ -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 *

View File

@ -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;

View File

@ -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.
*

View File

@ -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:
*

View File

@ -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 */

View File

@ -742,8 +742,8 @@ 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
* versa, to avoid having to adjust ancestor keys.
* 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);
if (np != NULL && btp->hdr.nused + np->hdr.nused <= max)

View File

@ -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)
*/

View File

@ -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;

View File

@ -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.
*

View File

@ -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,

View File

@ -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

View File

@ -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
*

View File

@ -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
{

View File

@ -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

View File

@ -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.
*/

View File

@ -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);

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
/*-------------------------------------------------------------------------
*
* test_thread_funcs.c
* thread_test.c
* libc thread test program
*
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group

View File

@ -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

View File

@ -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 -->