mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Fix more typos in comments.
Patch by CharSyam, plus a few more I spotted with grep.
This commit is contained in:
@ -494,7 +494,7 @@ brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange,
|
|||||||
* index item of size itemsz. If oldbuf is a valid buffer, it is also locked
|
* index item of size itemsz. If oldbuf is a valid buffer, it is also locked
|
||||||
* (in an 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
|
* If there's no existing page with enough free space to accommodate the new
|
||||||
* item, the relation is extended. If this happens, *extended is set to true.
|
* item, the relation is extended. If this happens, *extended is set to true.
|
||||||
*
|
*
|
||||||
* If we find that the old page is no longer a regular index page (because
|
* If we find that the old page is no longer a regular index page (because
|
||||||
|
@ -9,7 +9,7 @@ is implemented by storing locking information in the tuple header: a tuple is
|
|||||||
marked as locked by setting the current transaction's XID as its XMAX, and
|
marked as locked by setting the current transaction's XID as its XMAX, and
|
||||||
setting additional infomask bits to distinguish this case from the more normal
|
setting additional infomask bits to distinguish this case from the more normal
|
||||||
case of having deleted the tuple. When multiple transactions concurrently
|
case of having deleted the tuple. When multiple transactions concurrently
|
||||||
lock a tuple, a MultiXact is used; see below. This mechanism can accomodate
|
lock a tuple, a MultiXact is used; see below. This mechanism can accommodate
|
||||||
arbitrarily large numbers of tuples being locked simultaneously.
|
arbitrarily large numbers of tuples being locked simultaneously.
|
||||||
|
|
||||||
When it is necessary to wait for a tuple-level lock to be released, the basic
|
When it is necessary to wait for a tuple-level lock to be released, the basic
|
||||||
|
@ -269,7 +269,7 @@ AtAbort_Twophase(void)
|
|||||||
* can be finished later, so just unlock it.
|
* can be finished later, so just unlock it.
|
||||||
*
|
*
|
||||||
* If we abort during prepare, after having written the WAL record, we
|
* If we abort during prepare, after having written the WAL record, we
|
||||||
* might not have transfered all locks and other state to the prepared
|
* might not have transferred all locks and other state to the prepared
|
||||||
* transaction yet. Likewise, if we abort during commit or rollback,
|
* transaction yet. Likewise, if we abort during commit or rollback,
|
||||||
* after having written the WAL record, we might not have released
|
* after having written the WAL record, we might not have released
|
||||||
* all the resources held by the transaction yet. In those cases, the
|
* all the resources held by the transaction yet. In those cases, the
|
||||||
|
@ -2317,7 +2317,7 @@ PrepareTransaction(void)
|
|||||||
/*
|
/*
|
||||||
* In normal commit-processing, this is all non-critical post-transaction
|
* In normal commit-processing, this is all non-critical post-transaction
|
||||||
* cleanup. When the transaction is prepared, however, it's important that
|
* cleanup. When the transaction is prepared, however, it's important that
|
||||||
* the locks and other per-backend resources are transfered to the
|
* the locks and other per-backend resources are transferred to the
|
||||||
* prepared transaction's PGPROC entry. Note that if an error is raised
|
* prepared transaction's PGPROC entry. Note that if an error is raised
|
||||||
* here, it's too late to abort the transaction. XXX: This probably should
|
* here, it's too late to abort the transaction. XXX: This probably should
|
||||||
* be in a critical section, to force a PANIC if any of this fails, but
|
* be in a critical section, to force a PANIC if any of this fails, but
|
||||||
|
@ -883,7 +883,7 @@ EventTriggerSQLDrop(Node *parsetree)
|
|||||||
/*
|
/*
|
||||||
* Nothing to do if run list is empty. Note this shouldn't happen,
|
* Nothing to do if run list is empty. Note this shouldn't happen,
|
||||||
* because if there are no sql_drop events, then objects-to-drop wouldn't
|
* because if there are no sql_drop events, then objects-to-drop wouldn't
|
||||||
* have been collected in the first place and we would have quitted above.
|
* have been collected in the first place and we would have quit above.
|
||||||
*/
|
*/
|
||||||
if (runlist == NIL)
|
if (runlist == NIL)
|
||||||
return;
|
return;
|
||||||
|
@ -952,7 +952,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
|
|||||||
heap_execute_freeze_tuple(htup, &frozen[i]);
|
heap_execute_freeze_tuple(htup, &frozen[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now WAL-log freezing if neccessary */
|
/* Now WAL-log freezing if necessary */
|
||||||
if (RelationNeedsWAL(onerel))
|
if (RelationNeedsWAL(onerel))
|
||||||
{
|
{
|
||||||
XLogRecPtr recptr;
|
XLogRecPtr recptr;
|
||||||
|
@ -297,7 +297,7 @@ BackgroundWriterMain(void)
|
|||||||
* overall timeout handling but just assume we're going to get called
|
* overall timeout handling but just assume we're going to get called
|
||||||
* often enough even if hibernation mode is active. It's not that
|
* often enough even if hibernation mode is active. It's not that
|
||||||
* important that log_snap_interval_ms is met strictly. To make sure
|
* important that log_snap_interval_ms is met strictly. To make sure
|
||||||
* we're not waking the disk up unneccesarily on an idle system we
|
* 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
|
* check whether there has been any WAL inserted since the last time
|
||||||
* we've logged a running xacts.
|
* we've logged a running xacts.
|
||||||
*
|
*
|
||||||
|
@ -85,7 +85,7 @@ static char *statrelpath = NULL;
|
|||||||
/* The actual number of bytes, transfer of which may cause sleep. */
|
/* The actual number of bytes, transfer of which may cause sleep. */
|
||||||
static uint64 throttling_sample;
|
static uint64 throttling_sample;
|
||||||
|
|
||||||
/* Amount of data already transfered but not yet throttled. */
|
/* Amount of data already transferred but not yet throttled. */
|
||||||
static int64 throttling_counter;
|
static int64 throttling_counter;
|
||||||
|
|
||||||
/* The minimum time required to transfer throttling_sample bytes. */
|
/* The minimum time required to transfer throttling_sample bytes. */
|
||||||
@ -172,7 +172,7 @@ perform_base_backup(basebackup_options *opt, DIR *tblspcdir)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The minimum amount of time for throttling_sample bytes to be
|
* The minimum amount of time for throttling_sample bytes to be
|
||||||
* transfered.
|
* transferred.
|
||||||
*/
|
*/
|
||||||
elapsed_min_unit = USECS_PER_SEC / THROTTLING_FREQUENCY;
|
elapsed_min_unit = USECS_PER_SEC / THROTTLING_FREQUENCY;
|
||||||
|
|
||||||
|
@ -1342,7 +1342,7 @@ pg_replication_origin_advance(PG_FUNCTION_ARGS)
|
|||||||
/*
|
/*
|
||||||
* Can't sensibly pass a local commit to be flushed at checkpoint - this
|
* Can't sensibly pass a local commit to be flushed at checkpoint - this
|
||||||
* xact hasn't committed yet. This is why this function should be used to
|
* xact hasn't committed yet. This is why this function should be used to
|
||||||
* set up the intial replication state, but not for replay.
|
* set up the initial replication state, but not for replay.
|
||||||
*/
|
*/
|
||||||
replorigin_advance(node, remote_commit, InvalidXLogRecPtr,
|
replorigin_advance(node, remote_commit, InvalidXLogRecPtr,
|
||||||
true /* go backward */, true /* wal log */);
|
true /* go backward */, true /* wal log */);
|
||||||
|
@ -143,7 +143,7 @@ typedef struct ReorderBufferDiskChange
|
|||||||
* without hitting disk in OLTP workloads, while starting to spool to disk in
|
* without hitting disk in OLTP workloads, while starting to spool to disk in
|
||||||
* other workloads reasonably fast.
|
* other workloads reasonably fast.
|
||||||
*
|
*
|
||||||
* At some point in the future it probaly makes sense to have a more elaborate
|
* At some point in the future it probably makes sense to have a more elaborate
|
||||||
* resource management here, but it's not entirely clear what that would look
|
* resource management here, but it's not entirely clear what that would look
|
||||||
* like.
|
* like.
|
||||||
*/
|
*/
|
||||||
@ -1704,7 +1704,7 @@ ReorderBufferForget(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
|
|||||||
txn->final_lsn = lsn;
|
txn->final_lsn = lsn;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Proccess cache invalidation messages if there are any. Even if we're
|
* Process cache invalidation messages if there are any. Even if we're
|
||||||
* not interested in the transaction's contents, it could have manipulated
|
* not interested in the transaction's contents, it could have manipulated
|
||||||
* the catalog and we need to update the caches according to that.
|
* the catalog and we need to update the caches according to that.
|
||||||
*/
|
*/
|
||||||
|
@ -770,7 +770,7 @@ SnapBuildDistributeNewCatalogSnapshot(SnapBuild *builder, XLogRecPtr lsn)
|
|||||||
/*
|
/*
|
||||||
* Iterate through all toplevel transactions. This can include
|
* Iterate through all toplevel transactions. This can include
|
||||||
* subtransactions which we just don't yet know to be that, but that's
|
* subtransactions which we just don't yet know to be that, but that's
|
||||||
* fine, they will just get an unneccesary snapshot queued.
|
* fine, they will just get an unnecessary snapshot queued.
|
||||||
*/
|
*/
|
||||||
dlist_foreach(txn_i, &builder->reorder->toplevel_by_lsn)
|
dlist_foreach(txn_i, &builder->reorder->toplevel_by_lsn)
|
||||||
{
|
{
|
||||||
@ -1212,7 +1212,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
|||||||
* to CONSISTENT.
|
* to CONSISTENT.
|
||||||
* NB: We need to search running.xip when seeing a transaction's end to
|
* NB: We need to search running.xip when seeing a transaction's end to
|
||||||
* make sure it's a toplevel transaction and it's been one of the
|
* make sure it's a toplevel transaction and it's been one of the
|
||||||
* intially running ones.
|
* initially running ones.
|
||||||
* Interestingly, in contrast to HS, this allows us not to care about
|
* Interestingly, in contrast to HS, this allows us not to care about
|
||||||
* subtransactions - and by extension suboverflowed xl_running_xacts -
|
* subtransactions - and by extension suboverflowed xl_running_xacts -
|
||||||
* at all.
|
* at all.
|
||||||
@ -1657,7 +1657,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
|
|||||||
* Make sure the snapshot had been stored safely to disk, that's normally
|
* Make sure the snapshot had been stored safely to disk, that's normally
|
||||||
* cheap.
|
* cheap.
|
||||||
* Note that we do not need PANIC here, nobody will be able to use the
|
* Note that we do not need PANIC here, nobody will be able to use the
|
||||||
* slot without fsyncing, and saving it won't suceed without an fsync()
|
* slot without fsyncing, and saving it won't succeed without an fsync()
|
||||||
* either...
|
* either...
|
||||||
* ----
|
* ----
|
||||||
*/
|
*/
|
||||||
@ -1749,7 +1749,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* We are only interested in consistent snapshots for now, comparing
|
* We are only interested in consistent snapshots for now, comparing
|
||||||
* whether one imcomplete snapshot is more "advanced" seems to be
|
* whether one incomplete snapshot is more "advanced" seems to be
|
||||||
* unnecessarily complex.
|
* unnecessarily complex.
|
||||||
*/
|
*/
|
||||||
if (ondisk.builder.state < SNAPBUILD_CONSISTENT)
|
if (ondisk.builder.state < SNAPBUILD_CONSISTENT)
|
||||||
|
@ -79,7 +79,7 @@ typedef struct ReplicationSlotOnDisk
|
|||||||
/* size of the part covered by the checksum */
|
/* size of the part covered by the checksum */
|
||||||
#define SnapBuildOnDiskChecksummedSize \
|
#define SnapBuildOnDiskChecksummedSize \
|
||||||
sizeof(ReplicationSlotOnDisk) - SnapBuildOnDiskNotChecksummedSize
|
sizeof(ReplicationSlotOnDisk) - SnapBuildOnDiskNotChecksummedSize
|
||||||
/* size of the slot data that is version dependant */
|
/* size of the slot data that is version dependent */
|
||||||
#define ReplicationSlotOnDiskV2Size \
|
#define ReplicationSlotOnDiskV2Size \
|
||||||
sizeof(ReplicationSlotOnDisk) - ReplicationSlotOnDiskConstantSize
|
sizeof(ReplicationSlotOnDisk) - ReplicationSlotOnDiskConstantSize
|
||||||
|
|
||||||
|
@ -2165,7 +2165,7 @@ CheckForBufferLeaks(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if neccessary search the hash */
|
/* if necessary search the hash */
|
||||||
if (PrivateRefCountOverflowed)
|
if (PrivateRefCountOverflowed)
|
||||||
{
|
{
|
||||||
HASH_SEQ_STATUS hstat;
|
HASH_SEQ_STATUS hstat;
|
||||||
|
@ -225,7 +225,7 @@ dsm_cleanup_using_control_segment(dsm_handle old_control_handle)
|
|||||||
/*
|
/*
|
||||||
* Try to attach the segment. If this fails, it probably just means that
|
* Try to attach the segment. If this fails, it probably just means that
|
||||||
* the operating system has been rebooted and the segment no longer
|
* the operating system has been rebooted and the segment no longer
|
||||||
* exists, or an unrelated proces has used the same shm ID. So just fall
|
* exists, or an unrelated process has used the same shm ID. So just fall
|
||||||
* out quietly.
|
* out quietly.
|
||||||
*/
|
*/
|
||||||
if (!dsm_impl_op(DSM_OP_ATTACH, old_control_handle, 0, &impl_private,
|
if (!dsm_impl_op(DSM_OP_ATTACH, old_control_handle, 0, &impl_private,
|
||||||
|
@ -2001,7 +2001,7 @@ GetOldestSafeDecodingTransactionId(void)
|
|||||||
/*
|
/*
|
||||||
* If there's already a slot pegging the xmin horizon, we can start with
|
* If there's already a slot pegging the xmin horizon, we can start with
|
||||||
* that value, it's guaranteed to be safe since it's computed by this
|
* that value, it's guaranteed to be safe since it's computed by this
|
||||||
* routine initally and has been enforced since.
|
* routine initially and has been enforced since.
|
||||||
*/
|
*/
|
||||||
if (TransactionIdIsValid(procArray->replication_slot_catalog_xmin) &&
|
if (TransactionIdIsValid(procArray->replication_slot_catalog_xmin) &&
|
||||||
TransactionIdPrecedes(procArray->replication_slot_catalog_xmin,
|
TransactionIdPrecedes(procArray->replication_slot_catalog_xmin,
|
||||||
|
@ -1047,7 +1047,7 @@ shm_mq_inc_bytes_read(volatile shm_mq *mq, Size n)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the number of bytes written. The sender need not use this to access
|
* Get the number of bytes written. The sender need not use this to access
|
||||||
* the count of bytes written, but the reciever must.
|
* the count of bytes written, but the receiver must.
|
||||||
*/
|
*/
|
||||||
static uint64
|
static uint64
|
||||||
shm_mq_get_bytes_written(volatile shm_mq *mq, bool *detached)
|
shm_mq_get_bytes_written(volatile shm_mq *mq, bool *detached)
|
||||||
|
@ -15484,7 +15484,7 @@ dumpRule(Archive *fout, DumpOptions *dopt, RuleInfo *rinfo)
|
|||||||
* is able and expected to modify those tables after the extension has been
|
* is able and expected to modify those tables after the extension has been
|
||||||
* loaded. For these tables, we dump out only the data- the structure is
|
* loaded. For these tables, we dump out only the data- the structure is
|
||||||
* expected to be handled at CREATE EXTENSION time, including any indexes or
|
* expected to be handled at CREATE EXTENSION time, including any indexes or
|
||||||
* foriegn keys, which brings us to-
|
* foreign keys, which brings us to-
|
||||||
*
|
*
|
||||||
* 3. Record FK dependencies between configuration tables.
|
* 3. Record FK dependencies between configuration tables.
|
||||||
*
|
*
|
||||||
|
@ -198,7 +198,7 @@ setup(char *argv0, bool *live_check)
|
|||||||
* start, assume the server is running. If the pid file is left over
|
* start, assume the server is running. If the pid file is left over
|
||||||
* from a server crash, this also allows any committed transactions
|
* from a server crash, this also allows any committed transactions
|
||||||
* stored in the WAL to be replayed so they are not lost, because WAL
|
* stored in the WAL to be replayed so they are not lost, because WAL
|
||||||
* files are not transfered from old to new servers.
|
* files are not transferred from old to new servers.
|
||||||
*/
|
*/
|
||||||
if (start_postmaster(&old_cluster, false))
|
if (start_postmaster(&old_cluster, false))
|
||||||
stop_postmaster(false);
|
stop_postmaster(false);
|
||||||
|
@ -749,7 +749,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Optional optimized word wrap. Shrink columns with a high max/avg
|
* Optional optimized word wrap. Shrink columns with a high max/avg
|
||||||
* ratio. Slighly bias against wider columns. (Increases chance a
|
* ratio. Slightly bias against wider columns. (Increases chance a
|
||||||
* narrow column will fit in its cell.) If available columns is
|
* narrow column will fit in its cell.) If available columns is
|
||||||
* positive... and greater than the width of the unshrinkable column
|
* positive... and greater than the width of the unshrinkable column
|
||||||
* headers
|
* headers
|
||||||
|
@ -982,7 +982,7 @@ typedef NameData *Name;
|
|||||||
* To better support parallel installations of major PostgeSQL
|
* To better support parallel installations of major PostgeSQL
|
||||||
* versions as well as parallel installations of major library soname
|
* versions as well as parallel installations of major library soname
|
||||||
* versions, we mangle the gettext domain name by appending those
|
* versions, we mangle the gettext domain name by appending those
|
||||||
* version numbers. The coding rule ought to be that whereever the
|
* version numbers. The coding rule ought to be that wherever the
|
||||||
* domain name is mentioned as a literal, it must be wrapped into
|
* domain name is mentioned as a literal, it must be wrapped into
|
||||||
* PG_TEXTDOMAIN(). The macros below do not work on non-literals; but
|
* PG_TEXTDOMAIN(). The macros below do not work on non-literals; but
|
||||||
* that is somewhat intentional because it avoids having to worry
|
* that is somewhat intentional because it avoids having to worry
|
||||||
|
@ -89,7 +89,7 @@ typedef struct RelationData
|
|||||||
* survived into, or zero if not changed in the current transaction (or we
|
* survived into, or zero if not changed in the current transaction (or we
|
||||||
* have forgotten changing it). rd_newRelfilenodeSubid can be forgotten
|
* have forgotten changing it). rd_newRelfilenodeSubid can be forgotten
|
||||||
* when a relation has multiple new relfilenodes within a single
|
* when a relation has multiple new relfilenodes within a single
|
||||||
* transaction, with one of them occuring in a subsequently aborted
|
* transaction, with one of them occurring in a subsequently aborted
|
||||||
* subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
|
* subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
|
||||||
* ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
|
* ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
|
||||||
*/
|
*/
|
||||||
|
@ -300,7 +300,7 @@ pg_SSPI_continue(PGconn *conn)
|
|||||||
|
|
||||||
if (conn->sspictx == NULL)
|
if (conn->sspictx == NULL)
|
||||||
{
|
{
|
||||||
/* On first run, transfer retreived context handle */
|
/* On first run, transfer retrieved context handle */
|
||||||
conn->sspictx = malloc(sizeof(CtxtHandle));
|
conn->sspictx = malloc(sizeof(CtxtHandle));
|
||||||
if (conn->sspictx == NULL)
|
if (conn->sspictx == NULL)
|
||||||
{
|
{
|
||||||
@ -373,7 +373,7 @@ pg_SSPI_startup(PGconn *conn, int use_negotiate)
|
|||||||
conn->sspictx = NULL;
|
conn->sspictx = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Retreive credentials handle
|
* Retrieve credentials handle
|
||||||
*/
|
*/
|
||||||
conn->sspicred = malloc(sizeof(CredHandle));
|
conn->sspicred = malloc(sizeof(CredHandle));
|
||||||
if (conn->sspicred == NULL)
|
if (conn->sspicred == NULL)
|
||||||
|
@ -19,7 +19,7 @@ my $devnull = File::Spec->devnull;
|
|||||||
my $indent_opts =
|
my $indent_opts =
|
||||||
"-bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 -lp -nip -npro -bbb";
|
"-bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 -lp -nip -npro -bbb";
|
||||||
|
|
||||||
# indent-dependant settings
|
# indent-dependent settings
|
||||||
my $extra_opts = "";
|
my $extra_opts = "";
|
||||||
|
|
||||||
my ($typedefs_file, $typedef_str, $code_base, $excludes, $indent, $build);
|
my ($typedefs_file, $typedef_str, $code_base, $excludes, $indent, $build);
|
||||||
|
Reference in New Issue
Block a user