Collection of typo fixes.

Use "a" and "an" correctly, mostly in comments. Two error messages were
also fixed (they were just elogs, so no translation work required). Two
function comments in pg_proc.h were also fixed. Etsuro Fujita reported one
of these, but I found a lot more with grep.

Also fix a few other typos spotted while grepping for the a/an typos.
For example, "consists out of ..." -> "consists of ...". Plus a "though"/
"through" mixup reported by Euler Taveira.

Many of these typos were in old code, which would be nice to backpatch to
make future backpatching easier. But much of the code was new, and I didn't
feel like crafting separate patches for each branch. So no backpatching.
This commit is contained in:
Heikki Linnakangas 2015-05-20 16:18:11 +03:00
parent f6a54fefc2
commit 4fc72cc7bb
62 changed files with 95 additions and 93 deletions

View File

@ -511,7 +511,7 @@ str2ean(const char *num)
}
/*
* ean2string --- Try to convert an ean13 number to an hyphenated string.
* ean2string --- Try to convert an ean13 number to a hyphenated string.
* Assumes there's enough space in result to hold
* the string (maximum MAXEAN13LEN+1 bytes)
* This doesn't verify for a valid check digit.

View File

@ -142,7 +142,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
LWLockAcquire(BufMappingPartitionLockByIndex(i), LW_SHARED);
/*
* Scan though all the buffers, saving the relevant fields in the
* Scan through all the buffers, saving the relevant fields in the
* fctx->record structure.
*/
for (i = 0; i < NBuffers; i++)

View File

@ -51,7 +51,7 @@ static EPlan *find_plan(char *ident, EPlan **eplan, int *nplans);
* and all other column values as in new tuple, and insert tuple
* with old data and stop_date eq current date
* ELSE - skip updation of tuple.
* 2. IF an delete affects tuple with stop_date eq INFINITY
* 2. IF a delete affects tuple with stop_date eq INFINITY
* then insert the same tuple with stop_date eq current date
* [ and delete_user eq current user ]
* ELSE - skip deletion of tuple.

View File

@ -11,7 +11,7 @@ SELECT txid_current() = 0;
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
ERROR: cannot create logical replication slot in transaction that has performed writes
ROLLBACK;
-- fail because we're creating a slot while in an subxact whose topxact has a xid
-- fail because we're creating a slot while in a subxact whose topxact has an xid
BEGIN;
SELECT txid_current() = 0;
?column?

View File

@ -36,7 +36,7 @@ step "s3txid" { BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT txid_current() IS
step "s3c" { COMMIT; }
# Force usage of ondisk snapshot by starting and not finishing a
# transaction with a assigned xid after consistency has been
# transaction with an assigned xid after consistency has been
# reached. In combination with a checkpoint forcing a snapshot to be
# written and a new restart point computed that'll lead to the usage
# of the snapshot.

View File

@ -7,7 +7,7 @@ SELECT txid_current() = 0;
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
ROLLBACK;
-- fail because we're creating a slot while in an subxact whose topxact has a xid
-- fail because we're creating a slot while in a subxact whose topxact has an xid
BEGIN;
SELECT txid_current() = 0;
SAVEPOINT barf;

View File

@ -415,7 +415,7 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
one or more <replaceable
class="PARAMETER">column_name_index</replaceable> columns and/or
<replaceable class="PARAMETER">expression_index</replaceable>
expressions, and a optional <replaceable class="PARAMETER">
expressions, and an optional <replaceable class="PARAMETER">
index_predicate</replaceable>.
</para>

View File

@ -492,7 +492,7 @@ brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange,
/*
* Return a pinned and exclusively locked buffer which can be used to insert an
* index item of size itemsz. If oldbuf is a valid buffer, it is also locked
* (in a order determined to avoid deadlocks.)
* (in an order determined to avoid deadlocks.)
*
* If there's no existing page with enough free space to accomodate the new
* item, the relation is extended. If this happens, *extended is set to true.

View File

@ -313,7 +313,7 @@ ginFindParents(GinBtree btree, GinBtreeStack *stack)
* the parent needs to be updated. (a root split returns true as it doesn't
* need any further action by the caller to complete)
*
* When inserting a downlink to a internal page, 'childbuf' contains the
* When inserting a downlink to an internal page, 'childbuf' contains the
* child page that was split. Its GIN_INCOMPLETE_SPLIT flag will be cleared
* atomically with the insert. Also, the existing item at the given location
* is updated to point to 'updateblkno'.

View File

@ -409,7 +409,7 @@ ginRedoSplit(XLogReaderState *record)
/*
* VACUUM_PAGE record contains simply a full image of the page, similar to
* a XLOG_FPI record.
* an XLOG_FPI record.
*/
static void
ginRedoVacuumPage(XLogReaderState *record)

View File

@ -5107,7 +5107,7 @@ l5:
/*
* Subroutine for heap_lock_updated_tuple_rec.
*
* Given an hypothetical multixact status held by the transaction identified
* Given a hypothetical multixact status held by the transaction identified
* with the given xid, does the current transaction need to wait, fail, or can
* it continue if it wanted to acquire a lock of the given mode? "needwait"
* is set to true if waiting is necessary; if it can continue, then
@ -7139,7 +7139,7 @@ log_heap_update(Relation reln, Buffer oldbuf,
}
/*
* Perform XLogInsert of a XLOG_HEAP2_NEW_CID record
* Perform XLogInsert of an XLOG_HEAP2_NEW_CID record
*
* This is only used in wal_level >= WAL_LEVEL_LOGICAL, and only for catalog
* tuples.
@ -7179,7 +7179,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
*
* We need to check for LOCK ONLY because multixacts might be
* transferred to the new tuple in case of FOR KEY SHARE updates in
* which case there will be a xmax, although the tuple just got
* which case there will be an xmax, although the tuple just got
* inserted.
*/
if (hdr->t_infomask & HEAP_XMAX_INVALID ||
@ -7217,7 +7217,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup)
* Build a heap tuple representing the configured REPLICA IDENTITY to represent
* the old tuple in a UPDATE or DELETE.
*
* Returns NULL if there's no need to log a identity or if there's no suitable
* Returns NULL if there's no need to log an identity or if there's no suitable
* key in the Relation relation.
*/
static HeapTuple

View File

@ -195,7 +195,7 @@ typedef struct
typedef OldToNewMappingData *OldToNewMapping;
/*
* In-Memory data for a xid that might need logical remapping entries
* In-Memory data for an xid that might need logical remapping entries
* to be logged.
*/
typedef struct RewriteMappingFile

View File

@ -118,7 +118,7 @@ _bt_search(Relation rel, int keysz, ScanKey scankey, bool nextkey,
* In write-mode, allow _bt_moveright to finish any incomplete splits
* along the way. Strictly speaking, we'd only need to finish an
* incomplete split on the leaf page we're about to insert to, not on
* any of the upper levels (they is taken care of in _bt_getstackbuf,
* any of the upper levels (they are taken care of in _bt_getstackbuf,
* if the leaf page is split and we insert to the parent page). But
* this is a good opportunity to finish splits of internal pages too.
*/

View File

@ -21,7 +21,7 @@
#include "utils/timestamp.h"
/*
* Parse the WAL format of a xact commit and abort records into a easier to
* Parse the WAL format of an xact commit and abort records into an easier to
* understand format.
*
* This routines are in xactdesc.c because they're accessed in backend (when

View File

@ -122,7 +122,7 @@ static void WriteSetTimestampXlogRec(TransactionId mainxid, int nsubxids,
* subtrans implementation changes in the future, we might want to revisit the
* decision of storing timestamp info for each subxid.
*
* The do_xlog parameter tells us whether to include a XLog record of this
* The do_xlog parameter tells us whether to include an XLog record of this
* or not. Normal path through RecordTransactionCommit() will be related
* to a transaction commit XLog record, and so should pass "false" here.
* Other callers probably want to pass true, so that the given values persist

View File

@ -221,7 +221,7 @@ static TransactionStateData TopTransactionStateData = {
/*
* unreportedXids holds XIDs of all subtransactions that have not yet been
* reported in a XLOG_XACT_ASSIGNMENT record.
* reported in an XLOG_XACT_ASSIGNMENT record.
*/
static int nUnreportedXids;
static TransactionId unreportedXids[PGPROC_MAX_CACHED_SUBXIDS];
@ -532,7 +532,7 @@ AssignTransactionId(TransactionState s)
/*
* When wal_level=logical, guarantee that a subtransaction's xid can only
* be seen in the WAL stream if its toplevel xid has been logged before.
* If necessary we log a xact_assignment record with fewer than
* If necessary we log an xact_assignment record with fewer than
* PGPROC_MAX_CACHED_SUBXIDS. Note that it is fine if didLogXid isn't set
* for a transaction even though it appears in a WAL record, we just might
* superfluously log something. That can happen when an xid is included
@ -1232,8 +1232,8 @@ RecordTransactionCommit(void)
* Check if we want to commit asynchronously. We can allow the XLOG flush
* to happen asynchronously if synchronous_commit=off, or if the current
* transaction has not performed any WAL-logged operation or didn't assign
* a xid. The transaction can end up not writing any WAL, even if it has
* a xid, if it only wrote to temporary and/or unlogged tables. It can
* an xid. The transaction can end up not writing any WAL, even if it has
* an xid, if it only wrote to temporary and/or unlogged tables. It can
* end up having written WAL without an xid if it did HOT pruning. In
* case of a crash, the loss of such a transaction will be irrelevant;
* temp tables will be lost anyway, unlogged tables will be truncated and
@ -1305,7 +1305,7 @@ RecordTransactionCommit(void)
/*
* Wait for synchronous replication, if required. Similar to the decision
* above about using committing asynchronously we only want to wait if
* this backend assigned a xid and wrote WAL. No need to wait if a xid
* this backend assigned an xid and wrote WAL. No need to wait if an xid
* was assigned due to temporary/unlogged tables or due to HOT pruning.
*
* Note that at this stage we have marked clog, but still show as running

View File

@ -8832,7 +8832,7 @@ CreateRestartPoint(int flags)
}
/*
* Due to an historical accident multixact truncations are not WAL-logged,
* Due to a historical accident multixact truncations are not WAL-logged,
* but just performed everytime the mxact horizon is increased. So, unless
* we explicitly execute truncations on a standby it will never clean out
* /pg_multixact which obviously is bad, both because it uses space and

View File

@ -117,7 +117,7 @@ IsCatalogClass(Oid relid, Form_pg_class reltuple)
* We could instead check whether the relation is pinned in pg_depend, but
* this is noticeably cheaper and doesn't require catalog access.
*
* This test is safe since even a oid wraparound will preserve this
* This test is safe since even an oid wraparound will preserve this
* property (c.f. GetNewObjectId()) and it has the advantage that it works
* correctly even if a user decides to create a relation in the pg_catalog
* namespace.

View File

@ -119,7 +119,7 @@ RelationCreateStorage(RelFileNode rnode, char relpersistence)
}
/*
* Perform XLogInsert of a XLOG_SMGR_CREATE record to WAL.
* Perform XLogInsert of an XLOG_SMGR_CREATE record to WAL.
*/
void
log_smgrcreate(RelFileNode *rnode, ForkNumber forkNum)

View File

@ -3346,7 +3346,7 @@ CopyReadLineText(CopyState cstate)
* just use the char as a toggle. If they are different, we need
* to ensure that we only take account of an escape inside a
* quoted field and immediately preceding a quote char, and not
* the second in a escape-escape sequence.
* the second in an escape-escape sequence.
*/
if (in_quote && c == escapec)
last_was_esc = !last_was_esc;

View File

@ -1771,7 +1771,7 @@ EventTriggerCollectAlterTableSubcmd(Node *subcmd, ObjectAddress address)
* EventTriggerAlterTableEnd
* Finish up saving an ALTER TABLE command, and add it to command list.
*
* FIXME this API isn't considering the possibility that a xact/subxact is
* FIXME this API isn't considering the possibility that an xact/subxact is
* aborted partway through. Probably it's best to add an
* AtEOSubXact_EventTriggers() to fix this.
*/

View File

@ -703,8 +703,8 @@ nextval_internal(Oid relid)
/*
* If something needs to be WAL logged, acquire an xid, so this
* transaction's commit will trigger a WAL flush and wait for
* syncrep. It's sufficient to ensure the toplevel transaction has a xid,
* no need to assign xids subxacts, that'll already trigger a appropriate
* syncrep. It's sufficient to ensure the toplevel transaction has an xid,
* no need to assign xids subxacts, that'll already trigger an appropriate
* wait. (Have to do that here, so we're outside the critical section)
*/
if (logit && RelationNeedsWAL(seqrel))

View File

@ -2342,7 +2342,7 @@ RangeVarCallbackForRenameAttribute(const RangeVar *rv, Oid relid, Oid oldrelid,
}
/*
* renameatt - changes the name of a attribute in a relation
* renameatt - changes the name of an attribute in a relation
*
* The returned ObjectAddress is that of the renamed column.
*/

View File

@ -53,7 +53,7 @@
* Speculative insertion
* ---------------------
*
* Speculative insertion is a is a two-phase mechanism, used to implement
* Speculative insertion is a two-phase mechanism used to implement
* INSERT ... ON CONFLICT DO UPDATE/NOTHING. The tuple is first inserted
* to the heap and update the indexes as usual, but if a constraint is
* violated, we can still back out the insertion without aborting the whole

View File

@ -656,7 +656,7 @@ EquivalenceClasses and PathKeys after query_planner has completed.
In these cases, the extra ECs/PKs are needed to represent sort orders
that were not considered during query_planner. Such situations should be
minimized since it is impossible for query_planner to return a plan
producing such a sort order, meaning a explicit sort will always be needed.
producing such a sort order, meaning an explicit sort will always be needed.
Currently this happens only for queries involving multiple window functions
with different orderings, for which extra sorts are needed anyway.

View File

@ -3968,7 +3968,7 @@ prefix_quals(Node *leftop, Oid opfamily, Oid collation,
}
/*
* Given a leftop and a rightop, and a inet-family sup/sub operator,
* Given a leftop and a rightop, and an inet-family sup/sub operator,
* generate suitable indexqual condition(s). expr_op is the original
* operator, and opfamily is the index opfamily.
*/

View File

@ -9484,8 +9484,8 @@ InsertStmt:
/*
* Can't easily make AS optional here, because VALUES in insert_rest would
* have a shift/reduce conflict with a values as a optional alias. We could
* easily allow unreserved_keywords as optional aliases, but that'd be a odd
* have a shift/reduce conflict with a values as an optional alias. We could
* easily allow unreserved_keywords as optional aliases, but that'd be an odd
* divergance from other places. So just require AS for now.
*/
insert_target:

View File

@ -52,7 +52,7 @@ pg_atomic_init_flag_impl(volatile pg_atomic_flag *ptr)
#ifndef HAVE_SPINLOCKS
/*
* NB: If we're using semaphore based TAS emulation, be careful to use a
* separate set of semaphores. Otherwise we'd get in trouble if a atomic
* separate set of semaphores. Otherwise we'd get in trouble if an atomic
* var would be manipulated while spinlock is held.
*/
s_init_lock_sema((slock_t *) &ptr->sema, true);

View File

@ -443,7 +443,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir)
/*
* Mark file as archived, otherwise files can get archived again
* after promotion of a new node. This is in line with
* walreceiver.c always doing a XLogArchiveForceDone() after a
* walreceiver.c always doing an XLogArchiveForceDone() after a
* complete segment.
*/
StatusFilePath(pathbuf, walFiles[i], ".done");

View File

@ -149,7 +149,7 @@ StartupDecodingContext(List *output_plugin_options,
* replication slots.
*
* We can only do so if we're outside of a transaction (i.e. the case when
* streaming changes via walsender), otherwise a already setup
* streaming changes via walsender), otherwise an already setup
* snapshot/xid would end up being ignored. That's not a particularly
* bothersome restriction since the SQL interface can't be used for
* streaming anyway.
@ -225,7 +225,7 @@ CreateInitDecodingContext(char *plugin,
/* first some sanity checks that are unlikely to be violated */
if (slot == NULL)
elog(ERROR, "cannot perform logical decoding without a acquired slot");
elog(ERROR, "cannot perform logical decoding without an acquired slot");
if (plugin == NULL)
elog(ERROR, "cannot initialize logical decoding without a specified plugin");
@ -377,7 +377,7 @@ CreateDecodingContext(XLogRecPtr start_lsn,
/* first some sanity checks that are unlikely to be violated */
if (slot == NULL)
elog(ERROR, "cannot perform logical decoding without a acquired slot");
elog(ERROR, "cannot perform logical decoding without an acquired slot");
/* make sure the passed slot is suitable, these are user facing errors */
if (slot->data.database == InvalidOid)
@ -436,7 +436,7 @@ CreateDecodingContext(XLogRecPtr start_lsn,
}
/*
* Returns true if an consistent initial decoding snapshot has been built.
* Returns true if a consistent initial decoding snapshot has been built.
*/
bool
DecodingContextReady(LogicalDecodingContext *ctx)

View File

@ -53,7 +53,7 @@ typedef struct DecodingOutputState
} DecodingOutputState;
/*
* Prepare for a output plugin write.
* Prepare for an output plugin write.
*/
static void
LogicalOutputPrepareWrite(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xid,

View File

@ -286,7 +286,7 @@ ReorderBufferFree(ReorderBuffer *rb)
}
/*
* Get a unused, possibly preallocated, ReorderBufferTXN.
* Get an unused, possibly preallocated, ReorderBufferTXN.
*/
static ReorderBufferTXN *
ReorderBufferGetTXN(ReorderBuffer *rb)
@ -361,7 +361,7 @@ ReorderBufferReturnTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
}
/*
* Get a unused, possibly preallocated, ReorderBufferChange.
* Get an unused, possibly preallocated, ReorderBufferChange.
*/
ReorderBufferChange *
ReorderBufferGetChange(ReorderBuffer *rb)
@ -444,7 +444,7 @@ ReorderBufferReturnChange(ReorderBuffer *rb, ReorderBufferChange *change)
/*
* Get a unused, possibly preallocated, ReorderBufferTupleBuf
* Get an unused, possibly preallocated, ReorderBufferTupleBuf
*/
ReorderBufferTupleBuf *
ReorderBufferGetTupleBuf(ReorderBuffer *rb)
@ -1531,7 +1531,7 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid,
}
/*
* There's a a speculative insertion remaining, just clean in up, it
* There's a speculative insertion remaining, just clean in up, it
* can't have been successful, otherwise we'd gotten a confirmation
* record.
*/

View File

@ -79,7 +79,7 @@
* +--->|SNAPBUILD_CONSISTENT |<------------+
* +-------------------------+
*
* Initially the machinery is in the START stage. When a xl_running_xacts
* Initially the machinery is in the START stage. When an xl_running_xacts
* record is read that is sufficiently new (above the safe xmin horizon),
* there's a state transition. If there were no running xacts when the
* runnign_xacts record was generated, we'll directly go into CONSISTENT
@ -161,7 +161,7 @@ struct SnapBuild
/*
* Don't start decoding WAL until the "xl_running_xacts" information
* indicates there are no running xids with a xid smaller than this.
* indicates there are no running xids with an xid smaller than this.
*/
TransactionId initial_xmin_horizon;
@ -683,8 +683,9 @@ SnapBuildProcessChange(SnapBuild *builder, TransactionId xid, XLogRecPtr lsn)
}
/*
* Do CommandId/ComboCid handling after reading a xl_heap_new_cid record. This
* implies that a transaction has done some form of write to system catalogs.
* Do CommandId/ComboCid handling after reading an xl_heap_new_cid record.
* This implies that a transaction has done some form of write to system
* catalogs.
*/
void
SnapBuildProcessNewCid(SnapBuild *builder, TransactionId xid,

View File

@ -437,7 +437,7 @@ ReplicationSlotDropAcquired(void)
/*
* Rename the slot directory on disk, so that we'll no longer recognize
* this as a valid slot. Note that if this fails, we've got to mark the
* slot inactive before bailing out. If we're dropping a ephemeral slot,
* slot inactive before bailing out. If we're dropping an ephemeral slot,
* we better never fail hard as the caller won't expect the slot to
* survive and this might get called during error handling.
*/
@ -546,7 +546,7 @@ ReplicationSlotMarkDirty(void)
/*
* Convert a slot that's marked as RS_EPHEMERAL to a RS_PERSISTENT slot,
* guaranteeing it will be there after a eventual crash.
* guaranteeing it will be there after an eventual crash.
*/
void
ReplicationSlotPersist(void)

View File

@ -50,7 +50,7 @@ char *BufferBlocks;
* refcount -- Counts the number of processes holding pins on a buffer.
* A buffer is pinned during IO and immediately after a BufferAlloc().
* Pins must be released before end of transaction. For efficiency the
* shared refcount isn't increased if a individual backend pins a buffer
* shared refcount isn't increased if an individual backend pins a buffer
* multiple times. Check the PrivateRefCount infrastructure in bufmgr.c.
*/

View File

@ -101,13 +101,13 @@ static volatile BufferDesc *PinCountWaitBuf = NULL;
* Each buffer also has a private refcount that keeps track of the number of
* times the buffer is pinned in the current process. This is so that the
* shared refcount needs to be modified only once if a buffer is pinned more
* than once by a individual backend. It's also used to check that no buffers
* than once by an individual backend. It's also used to check that no buffers
* are still pinned at the end of transactions and when exiting.
*
*
* To avoid - as we used to - requiring an array with NBuffers entries to keep
* track of local buffers, we use a small sequentially searched array
* (PrivateRefCountArray) and a overflow hash table (PrivateRefCountHash) to
* (PrivateRefCountArray) and an overflow hash table (PrivateRefCountHash) to
* keep track of backend local pins.
*
* Until no more than REFCOUNT_ARRAY_ENTRIES buffers are pinned at once, all

View File

@ -149,7 +149,7 @@ ClockSweepTick(void)
* allows other readers to read nextVictimBuffer and
* completePasses in a consistent manner which is required for
* StrategySyncStart(). In theory delaying the increment
* could lead to a overflow of nextVictimBuffers, but that's
* could lead to an overflow of nextVictimBuffers, but that's
* highly unlikely and wouldn't be particularly harmful.
*/
SpinLockAcquire(&StrategyControl->buffer_strategy_lock);

View File

@ -287,7 +287,7 @@ ProcArrayAdd(PGPROC *proc)
/*
* Keep the procs array sorted by (PGPROC *) so that we can utilize
* locality of references much better. This is useful while traversing the
* ProcArray because there is a increased likelihood of finding the next
* ProcArray because there is an increased likelihood of finding the next
* PGPROC structure in the cache.
*
* Since the occurrence of adding/removing a proc is much lower than the
@ -2061,7 +2061,7 @@ GetOldestSafeDecodingTransactionId(void)
* the result is somewhat indeterminate, but we don't really care. Even in
* a multiprocessor with delayed writes to shared memory, it should be certain
* that setting of delayChkpt will propagate to shared memory when the backend
* takes a lock, so we cannot fail to see an virtual xact as delayChkpt if
* takes a lock, so we cannot fail to see a virtual xact as delayChkpt if
* it's already inserted its commit record. Whether it takes a little while
* for clearing of delayChkpt to propagate is unimportant for correctness.
*/
@ -3500,7 +3500,7 @@ KnownAssignedXidsRemovePreceding(TransactionId removeXid)
/*
* Mark entries invalid starting at the tail. Since array is sorted, we
* can stop as soon as we reach a entry >= removeXid.
* can stop as soon as we reach an entry >= removeXid.
*/
tail = pArray->tailKnownAssignedXids;
head = pArray->headKnownAssignedXids;

View File

@ -33,7 +33,7 @@ uint64 SharedInvalidMessageCounter;
* through a cache reset exercise. This is done by sending
* PROCSIG_CATCHUP_INTERRUPT to any backend that gets too far behind.
*
* The signal handler will set a interrupt pending flag and will set the
* The signal handler will set an interrupt pending flag and will set the
* processes latch. Whenever starting to read from the client, or when
* interrupted while doing so, ProcessClientReadInterrupt() will call
* ProcessCatchupEvent().

View File

@ -62,7 +62,7 @@
* an existing SIREAD lock for the same transaction, the SIREAD lock
* can be deleted.
*
* (7) A write from a serializable transaction must ensure that a xact
* (7) A write from a serializable transaction must ensure that an xact
* record exists for the transaction, with the same lifespan (until
* all concurrent transaction complete or the transaction is rolled
* back) so that rw-dependencies to that transaction can be
@ -4745,7 +4745,7 @@ AtPrepare_PredicateLocks(void)
if (MySerializableXact == InvalidSerializableXact)
return;
/* Generate a xact record for our SERIALIZABLEXACT */
/* Generate an xact record for our SERIALIZABLEXACT */
record.type = TWOPHASEPREDICATERECORD_XACT;
xactRecord->xmin = MySerializableXact->xmin;
xactRecord->flags = MySerializableXact->flags;

View File

@ -1335,7 +1335,7 @@ CheckAffix(const char *word, size_t len, AFFIX *Affix, int flagflags, char *neww
else
{
/*
* if prefix is a all non-chaged part's length then all word contains
* if prefix is an all non-changed part's length then all word contains
* only prefix and suffix, so out
*/
if (baselen && *baselen + strlen(Affix->find) <= Affix->replen)

View File

@ -300,7 +300,7 @@ arraycontsel(PG_FUNCTION_ARGS)
/*
* OK, there's a Var and a Const we're dealing with here. We need the
* Const to be a array with same element type as column, else we can't do
* Const to be an array with same element type as column, else we can't do
* anything useful. (Such cases will likely fail at runtime, but here
* we'd rather just return a default estimate.)
*/
@ -358,7 +358,7 @@ calc_arraycontsel(VariableStatData *vardata, Datum constval,
cmpfunc = &typentry->cmp_proc_finfo;
/*
* The caller made sure the const is a array with same element type, so
* The caller made sure the const is an array with same element type, so
* get it now
*/
array = DatumGetArrayTypeP(constval);

View File

@ -157,7 +157,7 @@ array_typanalyze(PG_FUNCTION_ARGS)
}
/*
* compute_array_stats() -- compute statistics for a array column
* compute_array_stats() -- compute statistics for an array column
*
* This function computes statistics useful for determining selectivity of
* the array operators <@, &&, and @>. It is invoked by ANALYZE via the

View File

@ -893,7 +893,7 @@ cashsmaller(PG_FUNCTION_ARGS)
}
/* cash_words()
* This converts a int4 as well but to a representation using words
* This converts an int4 as well but to a representation using words
* Obviously way North American centric - sorry
*/
Datum

View File

@ -596,8 +596,8 @@ calc_hist_selectivity_scalar(TypeCacheEntry *typcache, RangeBound *constbound,
* range bounds in array are greater or equal(greater) than given range bound,
* return -1. When "equal" flag is set conditions in brackets are used.
*
* This function is used in scalar operators selectivity estimation. Another
* goal of this function is to found an histogram bin where to stop
* This function is used in scalar operator selectivity estimation. Another
* goal of this function is to find a histogram bin where to stop
* interpolation of portion of bounds which are less or equal to given bound.
*/
static int

View File

@ -440,7 +440,7 @@ format_procedure_internal(Oid procedure_oid, bool force_qualify)
}
/*
* Output a objname/objargs representation for the procedure with the
* Output an objname/objargs representation for the procedure with the
* given OID. If it doesn't exist, an error is thrown.
*
* This can be used to feed get_object_address.

View File

@ -1963,7 +1963,7 @@ tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *result)
/* interval2tm()
* Convert a interval data type to a tm structure.
* Convert an interval data type to a tm structure.
*/
int
interval2tm(Interval span, struct pg_tm * tm, fsec_t *fsec)
@ -2907,7 +2907,7 @@ interval_justify_days(PG_FUNCTION_ARGS)
}
/* timestamp_pl_interval()
* Add a interval to a timestamp data type.
* Add an interval to a timestamp data type.
* Note that interval has provisions for qualitative year/month and day
* units, so try to do the right thing with them.
* To add a month, increment the month, and use the same day of month.
@ -3007,7 +3007,7 @@ timestamp_mi_interval(PG_FUNCTION_ARGS)
/* timestamptz_pl_interval()
* Add a interval to a timestamp with time zone data type.
* Add an interval to a timestamp with time zone data type.
* Note that interval has provisions for qualitative year/month
* units, so try to do the right thing with them.
* To add a month, increment the month, and use the same day of month.

View File

@ -38,8 +38,8 @@ typedef struct
typedef struct StatEntry
{
uint32 ndoc; /* zero indicates that we already was here
* while walking throug the tree */
uint32 ndoc; /* zero indicates that we were already here
* while walking through the tree */
uint32 nentry;
struct StatEntry *left;
struct StatEntry *right;

View File

@ -4126,7 +4126,7 @@ array_to_text_internal(FunctionCallInfo fcinfo, ArrayType *v,
#define HEXBASE 16
/*
* Convert a int32 to a string containing a base 16 (hex) representation of
* Convert an int32 to a string containing a base 16 (hex) representation of
* the number.
*/
Datum
@ -4150,7 +4150,7 @@ to_hex32(PG_FUNCTION_ARGS)
}
/*
* Convert a int64 to a string containing a base 16 (hex) representation of
* Convert an int64 to a string containing a base 16 (hex) representation of
* the number.
*/
Datum

View File

@ -1123,7 +1123,7 @@ SearchCatCache(CatCache *cache,
SysScanDesc scandesc;
HeapTuple ntp;
/* Make sure we're in a xact, even if this ends up being a cache hit */
/* Make sure we're in an xact, even if this ends up being a cache hit */
Assert(IsTransactionState());
/*

View File

@ -78,7 +78,7 @@ BlockSampler_Next(BlockSampler bs)
* Knuth says to skip the current block with probability 1 - k/K.
* If we are to skip, we should advance t (hence decrease K), and
* repeat the same probabilistic test for the next block. The naive
* implementation thus requires an sampler_random_fract() call for each
* implementation thus requires a sampler_random_fract() call for each
* block number. But we can reduce this to one sampler_random_fract()
* call per selected block, by noting that each time the while-test
* succeeds, we can reinterpret V as a uniform random number in the range

View File

@ -1734,7 +1734,7 @@ runPgDump(const char *dbname)
/*
* buildShSecLabels
*
* Build SECURITY LABEL command(s) for an shared object
* Build SECURITY LABEL command(s) for a shared object
*
* The caller has to provide object type and identifier to select security
* labels from pg_seclabels system view.

View File

@ -429,7 +429,7 @@ typedef struct
* whose split this insertion finishes. As BlockIdData[2] (beware of
* adding fields before this that would make them not 16-bit aligned)
*
* 2. an ginxlogInsertEntry or ginxlogRecompressDataLeaf struct, depending
* 2. a ginxlogInsertEntry or ginxlogRecompressDataLeaf struct, depending
* on tree type.
*
* NB: the below structs are only 16-bit aligned when appended to a

View File

@ -41,7 +41,7 @@ typedef struct LogicalRewriteMappingData
} LogicalRewriteMappingData;
/* ---
* The filename consists out of the following, dash separated,
* The filename consists of the following, dash separated,
* components:
* 1) database oid or InvalidOid for shared relations
* 2) the oid of the relation

View File

@ -21,7 +21,7 @@
* entries should be added at the end, to avoid changing IDs of existing
* entries.
*
* Changes to this list possibly need a XLOG_PAGE_MAGIC bump.
* Changes to this list possibly need an XLOG_PAGE_MAGIC bump.
*/
/* symbol name, textual name, redo, desc, identify, startup, cleanup */

View File

@ -167,7 +167,7 @@ typedef struct xl_xact_assignment
* portion of the records won't need all possible pieces of information. So we
* only include what's needed.
*
* A minimal commit/abort record only consists out of a xl_xact_commit/abort
* A minimal commit/abort record only consists of a xl_xact_commit/abort
* struct. The presence of additional information is indicated by bits set in
* 'xl_xact_xinfo->xinfo'. The presence of the xinfo field itself is signalled
* by a set XLOG_XACT_HAS_INFO bit in the xl_info field.

View File

@ -909,11 +909,11 @@ DESCR("larger of two");
DATA(insert OID = 516 ( array_smaller PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 2277 "2277 2277" _null_ _null_ _null_ _null_ _null_ array_smaller _null_ _null_ _null_ ));
DESCR("smaller of two");
DATA(insert OID = 3277 ( array_position PGNSP PGUID 12 1 0 0 0 f f f f f f i 2 0 23 "2277 2283" _null_ _null_ _null_ _null_ _null_ array_position _null_ _null_ _null_ ));
DESCR("returns a offset of value in array");
DESCR("returns an offset of value in array");
DATA(insert OID = 3278 ( array_position PGNSP PGUID 12 1 0 0 0 f f f f f f i 3 0 23 "2277 2283 23" _null_ _null_ _null_ _null_ _null_ array_position_start _null_ _null_ _null_ ));
DESCR("returns a offset of value in array with start index");
DESCR("returns an offset of value in array with start index");
DATA(insert OID = 3279 ( array_positions PGNSP PGUID 12 1 0 0 0 f f f f f f i 2 0 1007 "2277 2283" _null_ _null_ _null_ _null_ _null_ array_positions _null_ _null_ _null_ ));
DESCR("returns a array of offsets of some value in array");
DESCR("returns an array of offsets of some value in array");
DATA(insert OID = 1191 ( generate_subscripts PGNSP PGUID 12 1 1000 0 0 f f f f t t i 3 0 23 "2277 23 16" _null_ _null_ _null_ _null_ _null_ generate_subscripts _null_ _null_ _null_ ));
DESCR("array subscripts generator");
DATA(insert OID = 1192 ( generate_subscripts PGNSP PGUID 12 1 1000 0 0 f f f f t t i 2 0 23 "2277 23" _null_ _null_ _null_ _null_ _null_ generate_subscripts_nodir _null_ _null_ _null_ ));

View File

@ -117,7 +117,7 @@ typedef struct pg_atomic_uint64
static inline bool
pg_atomic_test_set_flag_impl(volatile pg_atomic_flag *ptr)
{
/* NB: only a acquire barrier, not a full one */
/* NB: only an acquire barrier, not a full one */
/* some platform only support a 1 here */
return __sync_lock_test_and_set(&ptr->value, 1) == 0;
}

View File

@ -245,7 +245,7 @@ typedef struct ReorderBufferTXN
/* ---
* Position in one of three lists:
* * list of subtransactions if we are *known* to be subxact
* * list of toplevel xacts (can be a as-yet unknown subxact)
* * list of toplevel xacts (can be am as-yet unknown subxact)
* * list of preallocated ReorderBufferTXNs
* ---
*/

View File

@ -18,7 +18,7 @@
/*
* RewriteRule -
* holds a info for a rewrite rule
* holds an info for a rewrite rule
*
*/
typedef struct RewriteRule

View File

@ -980,7 +980,7 @@ EncodeInterval(struct /* pg_ */ tm * tm, fsec_t fsec, int style, char *str)
/* interval2tm()
* Convert a interval data type to a tm structure.
* Convert an interval data type to a tm structure.
*/
static int
interval2tm(interval span, struct tm * tm, fsec_t *fsec)

View File

@ -445,7 +445,8 @@ PLy_procedure_argument_valid(PLyTypeInfo *arg)
/*
* Zero typ_relid means that we got called on an output argument of a
* function returning a unnamed record type; the info for it can't change.
* function returning an unnamed record type; the info for it can't
* change.
*/
if (!OidIsValid(arg->typ_relid))
return true;