Skip to content

Commit 30c22eb

Browse files
committed
Correct sundry errors in Hot Standby-related comments.
Fujii Masao
1 parent 00f76db commit 30c22eb

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

src/backend/access/transam/xact.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.295 2010/07/29 22:27:27 sriggs Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.296 2010/08/12 23:24:53 rhaas Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -4522,9 +4522,9 @@ xact_redo_abort(xl_xact_abort *xlrec, TransactionId xid)
45224522
sub_xids = (TransactionId *) &(xlrec->xnodes[xlrec->nrels]);
45234523
max_xid = TransactionIdLatest(xid, xlrec->nsubxacts, sub_xids);
45244524

4525-
/* Make sure nextXid is beyond any XID mentioned in the record */
4526-
45274525
/*
4526+
* Make sure nextXid is beyond any XID mentioned in the record.
4527+
*
45284528
* We don't expect anyone else to modify nextXid, hence we don't need to
45294529
* hold a lock while checking this. We still acquire the lock to modify
45304530
* it, though.

src/backend/storage/ipc/procarray.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.72 2010/07/06 19:18:57 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.73 2010/08/12 23:24:54 rhaas Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -449,7 +449,7 @@ ProcArrayInitRecoveryInfo(TransactionId oldestActiveXid)
449449
/*
450450
* ProcArrayApplyRecoveryInfo -- apply recovery info about xids
451451
*
452-
* Takes us through 3 states: Uninitialized, Pending and Ready.
452+
* Takes us through 3 states: Initialized, Pending and Ready.
453453
* Normal case is to go all the way to Ready straight away, though there
454454
* are atypical cases where we need to take it in steps.
455455
*
@@ -487,7 +487,7 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
487487
return;
488488

489489
/*
490-
* If our initial RunningXactData had an overflowed snapshot then we knew
490+
* If our initial RunningTransactionsData had an overflowed snapshot then we knew
491491
* we were missing some subxids from our snapshot. We can use this data as
492492
* an initial snapshot, but we cannot yet mark it valid. We know that the
493493
* missing subxids are equal to or earlier than nextXid. After we
@@ -518,7 +518,7 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
518518
Assert(standbyState == STANDBY_INITIALIZED);
519519

520520
/*
521-
* OK, we need to initialise from the RunningXactData record
521+
* OK, we need to initialise from the RunningTransactionsData record
522522
*/
523523

524524
/*
@@ -1499,7 +1499,7 @@ GetRunningTransactionData(void)
14991499
suboverflowed = true;
15001500

15011501
/*
1502-
* Top-level XID of a transaction is always greater than any of
1502+
* Top-level XID of a transaction is always less than any of
15031503
* its subxids, so we don't need to check if any of the subxids
15041504
* are smaller than oldestRunningXid
15051505
*/
@@ -2313,7 +2313,7 @@ DisplayXidCache(void)
23132313
* aborted but we think they were running; the distinction is irrelevant
23142314
* because either way any changes done by the transaction are not visible to
23152315
* backends in the standby. We prune KnownAssignedXids when
2316-
* XLOG_XACT_RUNNING_XACTS arrives, to forestall possible overflow of the
2316+
* XLOG_RUNNING_XACTS arrives, to forestall possible overflow of the
23172317
* array due to such dead XIDs.
23182318
*/
23192319

@@ -2323,9 +2323,9 @@ DisplayXidCache(void)
23232323
* unobserved XIDs.
23242324
*
23252325
* RecordKnownAssignedTransactionIds() should be run for *every* WAL record
2326-
* type apart from XLOG_XACT_RUNNING_XACTS (since that initialises the first
2326+
* type apart from XLOG_RUNNING_XACTS (since that initialises the first
23272327
* snapshot so that RecordKnownAssignedTransactionIds() can be called). Must
2328-
* be called for each record after we have executed StartupCLog() et al,
2328+
* be called for each record after we have executed StartupCLOG() et al,
23292329
* since we must ExtendCLOG() etc..
23302330
*
23312331
* Called during recovery in analogy with and in place of GetNewTransactionId()
@@ -3046,11 +3046,11 @@ KnownAssignedXidsDisplay(int trace_level)
30463046
if (KnownAssignedXidsValid[i])
30473047
{
30483048
nxids++;
3049-
appendStringInfo(&buf, "[%u]=%u ", i, KnownAssignedXids[i]);
3049+
appendStringInfo(&buf, "[%d]=%u ", i, KnownAssignedXids[i]);
30503050
}
30513051
}
30523052

3053-
elog(trace_level, "%d KnownAssignedXids (num=%u tail=%u head=%u) %s",
3053+
elog(trace_level, "%d KnownAssignedXids (num=%d tail=%d head=%d) %s",
30543054
nxids,
30553055
pArray->numKnownAssignedXids,
30563056
pArray->tailKnownAssignedXids,

src/backend/storage/ipc/standby.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.27 2010/07/06 19:18:57 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.28 2010/08/12 23:24:54 rhaas Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -522,7 +522,7 @@ CheckRecoveryConflictDeadlock(LWLockId partitionLock)
522522
* one transaction on one relation, and don't worry about lock queuing.
523523
*
524524
* We keep a single dynamically expandible list of locks in local memory,
525-
* RelationLockList, so we can keep track of the various entried made by
525+
* RelationLockList, so we can keep track of the various entries made by
526526
* the Startup process's virtual xid in the shared lock table.
527527
*
528528
* List elements use type xl_rel_lock, since the WAL record type exactly
@@ -700,7 +700,7 @@ standby_redo(XLogRecPtr lsn, XLogRecord *record)
700700
{
701701
uint8 info = record->xl_info & ~XLR_INFO_MASK;
702702

703-
/* Do nothing if we're not in standby mode */
703+
/* Do nothing if we're not in hot standby mode */
704704
if (standbyState == STANDBY_DISABLED)
705705
return;
706706

@@ -872,7 +872,7 @@ LogStandbySnapshot(TransactionId *oldestActiveXid, TransactionId *nextXid)
872872
/*
873873
* Record an enhanced snapshot of running transactions into WAL.
874874
*
875-
* The definitions of RunningTransactionData and xl_xact_running_xacts
875+
* The definitions of RunningTransactionsData and xl_xact_running_xacts
876876
* are similar. We keep them separate because xl_xact_running_xacts
877877
* is a contiguous chunk of memory and never exists fully until it is
878878
* assembled in WAL.

src/backend/tcop/postgres.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.595 2010/07/06 19:18:57 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.596 2010/08/12 23:24:54 rhaas Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -2741,7 +2741,7 @@ SigHupHandler(SIGNAL_ARGS)
27412741

27422742
/*
27432743
* RecoveryConflictInterrupt: out-of-line portion of recovery conflict
2744-
* handling ollowing receipt of SIGUSR1. Designed to be similar to die()
2744+
* handling following receipt of SIGUSR1. Designed to be similar to die()
27452745
* and StatementCancelHandler(). Called only by a normal user backend
27462746
* that begins a transaction during recovery.
27472747
*/

src/include/access/xlog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.115 2010/07/29 22:27:27 sriggs Exp $
9+
* $PostgreSQL: pgsql/src/include/access/xlog.h,v 1.116 2010/08/12 23:24:54 rhaas Exp $
1010
*/
1111
#ifndef XLOG_H
1212
#define XLOG_H
@@ -149,7 +149,7 @@ extern bool InRecovery;
149149
* InHotStandby will read as FALSE).
150150
*
151151
* In DISABLED state, we're performing crash recovery or hot standby was
152-
* disabled in recovery.conf.
152+
* disabled in postgresql.conf.
153153
*
154154
* In INITIALIZED state, we've run InitRecoveryTransactionEnvironment, but
155155
* we haven't yet processed a RUNNING_XACTS or shutdown-checkpoint WAL record

src/include/catalog/pg_control.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.57 2010/06/03 20:37:13 alvherre Exp $
11+
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.58 2010/08/12 23:24:54 rhaas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -45,7 +45,7 @@ typedef struct CheckPoint
4545
/*
4646
* Oldest XID still running. This is only needed to initialize hot standby
4747
* mode from an online checkpoint, so we only bother calculating this for
48-
* online checkpoints and only when archiving is enabled. Otherwise it's
48+
* online checkpoints and only when wal_level is hot_standby. Otherwise it's
4949
* set to InvalidTransactionId.
5050
*/
5151
TransactionId oldestActiveXid;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy