diff options
| author | Bruce Momjian | 2007-11-15 21:14:46 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2007-11-15 21:14:46 +0000 |
| commit | fdf5a5efb7b28c13085fe7313658de8d7b9914f6 (patch) | |
| tree | a75cf1422fa1eef4e801cf502b148d8ce1b5dfe7 /src/backend/utils/time | |
| parent | 3adc760fb92eab1a8720337a8bf9b66486609eb3 (diff) | |
pgindent run for 8.3.
Diffstat (limited to 'src/backend/utils/time')
| -rw-r--r-- | src/backend/utils/time/combocid.c | 44 | ||||
| -rw-r--r-- | src/backend/utils/time/tqual.c | 22 |
2 files changed, 34 insertions, 32 deletions
diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c index 5ba76660fdd..a26823fe441 100644 --- a/src/backend/utils/time/combocid.c +++ b/src/backend/utils/time/combocid.c @@ -15,7 +15,7 @@ * this module. * * To allow reusing existing combo cids, we also keep a hash table that - * maps cmin,cmax pairs to combo cids. This keeps the data structure size + * maps cmin,cmax pairs to combo cids. This keeps the data structure size * reasonable in most cases, since the number of unique pairs used by any * one transaction is likely to be small. * @@ -34,7 +34,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.1 2007/02/09 03:35:34 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/time/combocid.c,v 1.2 2007/11/15 21:14:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,17 +54,17 @@ static HTAB *comboHash = NULL; /* Key and entry structures for the hash table */ typedef struct { - CommandId cmin; - CommandId cmax; -} ComboCidKeyData; + CommandId cmin; + CommandId cmax; +} ComboCidKeyData; typedef ComboCidKeyData *ComboCidKey; typedef struct { ComboCidKeyData key; - CommandId combocid; -} ComboCidEntryData; + CommandId combocid; +} ComboCidEntryData; typedef ComboCidEntryData *ComboCidEntry; @@ -77,8 +77,8 @@ typedef ComboCidEntryData *ComboCidEntry; * To convert a combo cid to cmin and cmax, you do a simple array lookup. */ static ComboCidKey comboCids = NULL; -static int usedComboCids = 0; /* number of elements in comboCids */ -static int sizeComboCids = 0; /* allocated size of array */ +static int usedComboCids = 0; /* number of elements in comboCids */ +static int sizeComboCids = 0; /* allocated size of array */ /* Initial size of the array */ #define CCID_ARRAY_SIZE 100 @@ -102,7 +102,7 @@ static CommandId GetRealCmax(CommandId combocid); CommandId HeapTupleHeaderGetCmin(HeapTupleHeader tup) { - CommandId cid = HeapTupleHeaderGetRawCommandId(tup); + CommandId cid = HeapTupleHeaderGetRawCommandId(tup); Assert(!(tup->t_infomask & HEAP_MOVED)); Assert(TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tup))); @@ -116,7 +116,7 @@ HeapTupleHeaderGetCmin(HeapTupleHeader tup) CommandId HeapTupleHeaderGetCmax(HeapTupleHeader tup) { - CommandId cid = HeapTupleHeaderGetRawCommandId(tup); + CommandId cid = HeapTupleHeaderGetRawCommandId(tup); /* We do not store cmax when locking a tuple */ Assert(!(tup->t_infomask & (HEAP_MOVED | HEAP_IS_LOCKED))); @@ -155,7 +155,7 @@ HeapTupleHeaderAdjustCmax(HeapTupleHeader tup, if (!(tup->t_infomask & HEAP_XMIN_COMMITTED) && TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetXmin(tup))) { - CommandId cmin = HeapTupleHeaderGetRawCommandId(tup); + CommandId cmin = HeapTupleHeaderGetRawCommandId(tup); *cmax = GetComboCommandId(cmin, *cmax); *iscombo = true; @@ -174,8 +174,8 @@ void AtEOXact_ComboCid(void) { /* - * Don't bother to pfree. These are allocated in TopTransactionContext, - * so they're going to go away at the end of transaction anyway. + * Don't bother to pfree. These are allocated in TopTransactionContext, so + * they're going to go away at the end of transaction anyway. */ comboHash = NULL; @@ -195,18 +195,18 @@ AtEOXact_ComboCid(void) static CommandId GetComboCommandId(CommandId cmin, CommandId cmax) { - CommandId combocid; + CommandId combocid; ComboCidKeyData key; ComboCidEntry entry; - bool found; + bool found; /* - * Create the hash table and array the first time we need to use - * combo cids in the transaction. + * Create the hash table and array the first time we need to use combo + * cids in the transaction. */ if (comboHash == NULL) { - HASHCTL hash_ctl; + HASHCTL hash_ctl; memset(&hash_ctl, 0, sizeof(hash_ctl)); hash_ctl.keysize = sizeof(ComboCidKeyData); @@ -243,13 +243,13 @@ GetComboCommandId(CommandId cmin, CommandId cmax) } /* - * We have to create a new combo cid. Check that there's room - * for it in the array, and grow it if there isn't. + * We have to create a new combo cid. Check that there's room for it in + * the array, and grow it if there isn't. */ if (usedComboCids >= sizeComboCids) { /* We need to grow the array */ - int newsize = sizeComboCids * 2; + int newsize = sizeComboCids * 2; comboCids = (ComboCidKeyData *) repalloc(comboCids, sizeof(ComboCidKeyData) * newsize); diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index e5401861455..4c128e4446b 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -31,7 +31,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.106 2007/09/21 18:24:28 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/time/tqual.c,v 1.107 2007/11/15 21:14:41 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -95,12 +95,12 @@ static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot); * buffer, so we can't use the LSN to interlock this; we have to just refrain * from setting the hint bit until some future re-examination of the tuple. * - * We can always set hint bits when marking a transaction aborted. (Some + * We can always set hint bits when marking a transaction aborted. (Some * code in heapam.c relies on that!) * * Also, if we are cleaning up HEAP_MOVED_IN or HEAP_MOVED_OFF entries, then * we can always set the hint bits, since VACUUM FULL always uses synchronous - * commits and doesn't move tuples that weren't previously hinted. (This is + * commits and doesn't move tuples that weren't previously hinted. (This is * not known by this subroutine, but is applied by its callers.) * * Normal commits may be asynchronous, so for those we need to get the LSN @@ -116,7 +116,7 @@ SetHintBits(HeapTupleHeader tuple, Buffer buffer, if (TransactionIdIsValid(xid)) { /* NB: xid must be known committed here! */ - XLogRecPtr commitLSN = TransactionIdGetCommitLSN(xid); + XLogRecPtr commitLSN = TransactionIdGetCommitLSN(xid); if (XLogNeedsFlush(commitLSN)) return; /* not flushed yet, so don't set hint */ @@ -1127,10 +1127,11 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, InvalidTransactionId); return HEAPTUPLE_DEAD; } + /* * At this point the xmin is known committed, but we might not have - * been able to set the hint bit yet; so we can no longer Assert - * that it's set. + * been able to set the hint bit yet; so we can no longer Assert that + * it's set. */ } @@ -1146,8 +1147,8 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, /* * "Deleting" xact really only locked it, so the tuple is live in any * case. However, we should make sure that either XMAX_COMMITTED or - * XMAX_INVALID gets set once the xact is gone, to reduce the costs - * of examining the tuple for future xacts. Also, marking dead + * XMAX_INVALID gets set once the xact is gone, to reduce the costs of + * examining the tuple for future xacts. Also, marking dead * MultiXacts as invalid here provides defense against MultiXactId * wraparound (see also comments in heap_freeze_tuple()). */ @@ -1198,10 +1199,11 @@ HeapTupleSatisfiesVacuum(HeapTupleHeader tuple, TransactionId OldestXmin, InvalidTransactionId); return HEAPTUPLE_LIVE; } + /* * At this point the xmax is known committed, but we might not have - * been able to set the hint bit yet; so we can no longer Assert - * that it's set. + * been able to set the hint bit yet; so we can no longer Assert that + * it's set. */ } |
