summaryrefslogtreecommitdiff
path: root/src/backend/storage
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-11-22 18:23:31 +0000
committerBruce Momjian <bruce@momjian.us>2005-11-22 18:23:31 +0000
commitbef7764835725e5d8468da1c139e9020be689b95 (patch)
tree71075b16ab6ed5152b31757e5dd65cd2b9383ba0 /src/backend/storage
parentc8de36352fe72ae2265eb53a6e1bf334e4f24888 (diff)
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
Diffstat (limited to 'src/backend/storage')
-rw-r--r--src/backend/storage/buffer/bufmgr.c24
-rw-r--r--src/backend/storage/buffer/localbuf.c4
-rw-r--r--src/backend/storage/file/fd.c8
-rw-r--r--src/backend/storage/ipc/ipc.c15
-rw-r--r--src/backend/storage/ipc/procarray.c10
-rw-r--r--src/backend/storage/ipc/shmem.c6
-rw-r--r--src/backend/storage/ipc/sinval.c32
-rw-r--r--src/backend/storage/lmgr/lock.c26
-rw-r--r--src/backend/storage/lmgr/proc.c46
-rw-r--r--src/backend/storage/lmgr/s_lock.c35
-rw-r--r--src/backend/storage/lmgr/spin.c6
-rw-r--r--src/backend/storage/page/bufpage.c10
-rw-r--r--src/backend/storage/smgr/smgr.c10
13 files changed, 117 insertions, 115 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index c556c5d91fa..1204bbfb07d 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.198.2.1 2005/11/17 17:42:24 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.198.2.2 2005/11/22 18:23:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -86,7 +86,7 @@ static volatile BufferDesc *PinCountWaitBuf = NULL;
static bool PinBuffer(volatile BufferDesc *buf);
static void PinBuffer_Locked(volatile BufferDesc *buf);
static void UnpinBuffer(volatile BufferDesc *buf,
- bool fixOwner, bool normalAccess);
+ bool fixOwner, bool normalAccess);
static bool SyncOneBuffer(int buf_id, bool skip_pinned);
static void WaitIO(volatile BufferDesc *buf);
static bool StartBufferIO(volatile BufferDesc *buf, bool forInput);
@@ -178,11 +178,12 @@ ReadBuffer(Relation reln, BlockNumber blockNum)
* page but its contents are not yet valid. IO_IN_PROGRESS is set for it,
* if it's a shared buffer.
*
- * Note: if smgrextend fails, we will end up with a buffer that is allocated
- * but not marked BM_VALID. P_NEW will still select the same block number
- * (because the relation didn't get any longer on disk) and so future
- * attempts to extend the relation will find the same buffer (if it's not
- * been recycled) but come right back here to try smgrextend again.
+ * Note: if smgrextend fails, we will end up with a buffer that is
+ * allocated but not marked BM_VALID. P_NEW will still select the same
+ * block number (because the relation didn't get any longer on disk) and
+ * so future attempts to extend the relation will find the same buffer (if
+ * it's not been recycled) but come right back here to try smgrextend
+ * again.
*/
Assert(!(bufHdr->flags & BM_VALID)); /* spinlock not needed */
@@ -982,8 +983,8 @@ SyncOneBuffer(int buf_id, bool skip_pinned)
/*
* Check whether buffer needs writing.
*
- * We can make this check without taking the buffer content lock so long as
- * we mark pages dirty in access methods *before* logging changes with
+ * We can make this check without taking the buffer content lock so long
+ * as we mark pages dirty in access methods *before* logging changes with
* XLogInsert(): if someone marks the buffer dirty just after our check we
* don't worry because our checkpoint.redo points before log record for
* upcoming changes and so we are not required to write such dirty buffer.
@@ -1871,8 +1872,9 @@ WaitIO(volatile BufferDesc *buf)
/*
* Changed to wait until there's no IO - Inoue 01/13/2000
*
- * Note this is *necessary* because an error abort in the process doing I/O
- * could release the io_in_progress_lock prematurely. See AbortBufferIO.
+ * Note this is *necessary* because an error abort in the process doing
+ * I/O could release the io_in_progress_lock prematurely. See
+ * AbortBufferIO.
*/
for (;;)
{
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 52750051946..38fec03419c 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.70.2.1 2005/11/17 17:42:24 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.70.2.2 2005/11/22 18:23:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -277,7 +277,7 @@ DropRelFileNodeLocalBuffers(RelFileNode rnode, BlockNumber firstDelBlock)
hresult = (LocalBufferLookupEnt *)
hash_search(LocalBufHash, (void *) &bufHdr->tag,
HASH_REMOVE, NULL);
- if (!hresult) /* shouldn't happen */
+ if (!hresult) /* shouldn't happen */
elog(ERROR, "local buffer hash table corrupted");
/* Mark buffer invalid */
CLEAR_BUFFERTAG(bufHdr->tag);
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 2db12ebd11b..f706e062ffd 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.121 2005/10/15 02:49:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.121.2.1 2005/11/22 18:23:18 momjian Exp $
*
* NOTES:
*
@@ -901,9 +901,9 @@ OpenTemporaryFile(bool interXact)
* We might need to create the pg_tempfiles subdirectory, if no one
* has yet done so.
*
- * Don't check for error from mkdir; it could fail if someone else just
- * did the same thing. If it doesn't work then we'll bomb out on the
- * second create attempt, instead.
+ * Don't check for error from mkdir; it could fail if someone else
+ * just did the same thing. If it doesn't work then we'll bomb out on
+ * the second create attempt, instead.
*/
dirpath = make_database_relative(PG_TEMP_FILES_DIR);
mkdir(dirpath, S_IRWXU);
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index 39e8d3e527a..15bca1bfd78 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.91 2005/10/15 02:49:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.91.2.1 2005/11/22 18:23:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -100,10 +100,11 @@ proc_exit(int code)
/*
* call all the callbacks registered before calling exit().
*
- * Note that since we decrement on_proc_exit_index each time, if a callback
- * calls ereport(ERROR) or ereport(FATAL) then it won't be invoked again
- * when control comes back here (nor will the previously-completed
- * callbacks). So, an infinite loop should not be possible.
+ * Note that since we decrement on_proc_exit_index each time, if a
+ * callback calls ereport(ERROR) or ereport(FATAL) then it won't be
+ * invoked again when control comes back here (nor will the
+ * previously-completed callbacks). So, an infinite loop should not be
+ * possible.
*/
while (--on_proc_exit_index >= 0)
(*on_proc_exit_list[on_proc_exit_index].function) (code,
@@ -127,8 +128,8 @@ shmem_exit(int code)
/*
* call all the registered callbacks.
*
- * As with proc_exit(), we remove each callback from the list before calling
- * it, to avoid infinite loop in case of error.
+ * As with proc_exit(), we remove each callback from the list before
+ * calling it, to avoid infinite loop in case of error.
*/
while (--on_shmem_exit_index >= 0)
(*on_shmem_exit_list[on_shmem_exit_index].function) (code,
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 1387ec6bd9d..2e4fc92e246 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -23,7 +23,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.7 2005/10/15 02:49:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.7.2.1 2005/11/22 18:23:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -293,10 +293,10 @@ TransactionIdIsInProgress(TransactionId xid)
/*
* Step 3: have to check pg_subtrans.
*
- * At this point, we know it's either a subtransaction of one of the Xids in
- * xids[], or it's not running. If it's an already-failed subtransaction,
- * we want to say "not running" even though its parent may still be
- * running. So first, check pg_clog to see if it's been aborted.
+ * At this point, we know it's either a subtransaction of one of the Xids
+ * in xids[], or it's not running. If it's an already-failed
+ * subtransaction, we want to say "not running" even though its parent may
+ * still be running. So first, check pg_clog to see if it's been aborted.
*/
xc_slow_answer_inc();
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index 443c153c90a..5e71b489d5a 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/ipc/shmem.c,v 1.87 2005/10/15 02:49:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/ipc/shmem.c,v 1.87.2.1 2005/11/22 18:23:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -350,8 +350,8 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
* If the shmem index doesn't exist, we are bootstrapping: we must
* be trying to init the shmem index itself.
*
- * Notice that the ShmemIndexLock is held until the shmem index has
- * been completely initialized.
+ * Notice that the ShmemIndexLock is held until the shmem index
+ * has been completely initialized.
*/
*foundPtr = FALSE;
ShmemIndexAlloc = ShmemAlloc(size);
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c
index b5efb510d7d..ca8fb8feff7 100644
--- a/src/backend/storage/ipc/sinval.c
+++ b/src/backend/storage/ipc/sinval.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.78 2005/10/15 02:49:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.78.2.1 2005/11/22 18:23:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -262,18 +262,18 @@ EnableCatchupInterrupt(void)
* steps. (A very small time window, perhaps, but Murphy's Law says you
* can hit it...) Instead, we first set the enable flag, then test the
* occurred flag. If we see an unserviced interrupt has occurred, we
- * re-clear the enable flag before going off to do the service work.
- * (That prevents re-entrant invocation of ProcessCatchupEvent() if
- * another interrupt occurs.) If an interrupt comes in between the setting
- * and clearing of catchupInterruptEnabled, then it will have done the
- * service work and left catchupInterruptOccurred zero, so we have to
- * check again after clearing enable. The whole thing has to be in a loop
- * in case another interrupt occurs while we're servicing the first. Once
- * we get out of the loop, enable is set and we know there is no
- * unserviced interrupt.
+ * re-clear the enable flag before going off to do the service work. (That
+ * prevents re-entrant invocation of ProcessCatchupEvent() if another
+ * interrupt occurs.) If an interrupt comes in between the setting and
+ * clearing of catchupInterruptEnabled, then it will have done the service
+ * work and left catchupInterruptOccurred zero, so we have to check again
+ * after clearing enable. The whole thing has to be in a loop in case
+ * another interrupt occurs while we're servicing the first. Once we get
+ * out of the loop, enable is set and we know there is no unserviced
+ * interrupt.
*
- * NB: an overenthusiastic optimizing compiler could easily break this code.
- * Hopefully, they all understand what "volatile" means these days.
+ * NB: an overenthusiastic optimizing compiler could easily break this
+ * code. Hopefully, they all understand what "volatile" means these days.
*/
for (;;)
{
@@ -332,10 +332,10 @@ ProcessCatchupEvent(void)
* start and immediately end a transaction; the call to
* AcceptInvalidationMessages() happens down inside transaction start.
*
- * It is awfully tempting to just call AcceptInvalidationMessages() without
- * the rest of the xact start/stop overhead, and I think that would
- * actually work in the normal case; but I am not sure that things would
- * clean up nicely if we got an error partway through.
+ * It is awfully tempting to just call AcceptInvalidationMessages()
+ * without the rest of the xact start/stop overhead, and I think that
+ * would actually work in the normal case; but I am not sure that things
+ * would clean up nicely if we got an error partway through.
*/
if (IsTransactionOrTransactionBlock())
{
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 467bde6c1cc..fe983106889 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.159 2005/11/05 03:04:52 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.159.2.1 2005/11/22 18:23:18 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -322,10 +322,10 @@ LockMethodTableInit(const char *tabName,
* allocate a non-shared hash table for LOCALLOCK structs. This is used
* to store lock counts and resource owner information.
*
- * The non-shared table could already exist in this process (this occurs when
- * the postmaster is recreating shared memory after a backend crash). If
- * so, delete and recreate it. (We could simply leave it, since it ought
- * to be empty in the postmaster, but for safety let's zap it.)
+ * The non-shared table could already exist in this process (this occurs
+ * when the postmaster is recreating shared memory after a backend crash).
+ * If so, delete and recreate it. (We could simply leave it, since it
+ * ought to be empty in the postmaster, but for safety let's zap it.)
*/
if (LockMethodLocalHash[lockmethodid])
hash_destroy(LockMethodLocalHash[lockmethodid]);
@@ -534,8 +534,8 @@ LockAcquire(LOCKMETHODID lockmethodid,
/*
* Find or create a lock with this tag.
*
- * Note: if the locallock object already existed, it might have a pointer to
- * the lock already ... but we probably should not assume that that
+ * Note: if the locallock object already existed, it might have a pointer
+ * to the lock already ... but we probably should not assume that that
* pointer is valid, since a lock object with no locks can go away
* anytime.
*/
@@ -818,10 +818,10 @@ LockCheckConflicts(LockMethod lockMethodTable,
* first check for global conflicts: If no locks conflict with my request,
* then I get the lock.
*
- * Checking for conflict: lock->grantMask represents the types of currently
- * held locks. conflictTable[lockmode] has a bit set for each type of
- * lock that conflicts with request. Bitwise compare tells if there is a
- * conflict.
+ * Checking for conflict: lock->grantMask represents the types of
+ * currently held locks. conflictTable[lockmode] has a bit set for each
+ * type of lock that conflicts with request. Bitwise compare tells if
+ * there is a conflict.
*/
if (!(lockMethodTable->conflictTab[lockmode] & lock->grantMask))
{
@@ -1875,8 +1875,8 @@ LockShmemSize(void)
* Note we count only one pair of hash tables, since the userlocks table
* actually overlays the main one.
*
- * Since the lockHash entry count above is only an estimate, add 10% safety
- * margin.
+ * Since the lockHash entry count above is only an estimate, add 10%
+ * safety margin.
*/
size = add_size(size, size / 10);
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 1c26a5934ba..4ea1dfe74be 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.167 2005/10/15 02:49:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.167.2.1 2005/11/22 18:23:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -640,15 +640,15 @@ ProcSleep(LockMethod lockMethodTable,
/*
* Determine where to add myself in the wait queue.
*
- * Normally I should go at the end of the queue. However, if I already hold
- * locks that conflict with the request of any previous waiter, put myself
- * in the queue just in front of the first such waiter. This is not a
- * necessary step, since deadlock detection would move me to before that
+ * Normally I should go at the end of the queue. However, if I already
+ * hold locks that conflict with the request of any previous waiter, put
+ * myself in the queue just in front of the first such waiter. This is not
+ * a necessary step, since deadlock detection would move me to before that
* waiter anyway; but it's relatively cheap to detect such a conflict
* immediately, and avoid delaying till deadlock timeout.
*
- * Special case: if I find I should go in front of some waiter, check to see
- * if I conflict with already-held locks or the requests before that
+ * Special case: if I find I should go in front of some waiter, check to
+ * see if I conflict with already-held locks or the requests before that
* waiter. If not, then just grant myself the requested lock immediately.
* This is the same as the test for immediate grant in LockAcquire, except
* we are only considering the part of the wait queue before my insertion
@@ -755,8 +755,8 @@ ProcSleep(LockMethod lockMethodTable,
* sets MyProc->waitStatus = STATUS_ERROR, allowing us to know that we
* must report failure rather than success.
*
- * By delaying the check until we've waited for a bit, we can avoid running
- * the rather expensive deadlock-check code in most cases.
+ * By delaying the check until we've waited for a bit, we can avoid
+ * running the rather expensive deadlock-check code in most cases.
*/
if (!enable_sig_alarm(DeadlockTimeout, false))
elog(FATAL, "could not set timer for process wakeup");
@@ -768,13 +768,13 @@ ProcSleep(LockMethod lockMethodTable,
* not detect a deadlock, PGSemaphoreLock() will continue to wait. There
* used to be a loop here, but it was useless code...
*
- * We pass interruptOK = true, which eliminates a window in which cancel/die
- * interrupts would be held off undesirably. This is a promise that we
- * don't mind losing control to a cancel/die interrupt here. We don't,
- * because we have no shared-state-change work to do after being granted
- * the lock (the grantor did it all). We do have to worry about updating
- * the locallock table, but if we lose control to an error, LockWaitCancel
- * will fix that up.
+ * We pass interruptOK = true, which eliminates a window in which
+ * cancel/die interrupts would be held off undesirably. This is a promise
+ * that we don't mind losing control to a cancel/die interrupt here. We
+ * don't, because we have no shared-state-change work to do after being
+ * granted the lock (the grantor did it all). We do have to worry about
+ * updating the locallock table, but if we lose control to an error,
+ * LockWaitCancel will fix that up.
*/
PGSemaphoreLock(&MyProc->sem, true);
@@ -931,9 +931,9 @@ CheckDeadLock(void)
/*
* Check to see if we've been awoken by anyone in the interim.
*
- * If we have we can return and resume our transaction -- happy day. Before
- * we are awoken the process releasing the lock grants it to us so we know
- * that we don't have to wait anymore.
+ * If we have we can return and resume our transaction -- happy day.
+ * Before we are awoken the process releasing the lock grants it to us so
+ * we know that we don't have to wait anymore.
*
* We check by looking to see if we've been unlinked from the wait queue.
* This is quicker than checking our semaphore's state, since no kernel
@@ -1085,10 +1085,10 @@ enable_sig_alarm(int delayms, bool is_statement_timeout)
/*
* Begin deadlock timeout with statement-level timeout active
*
- * Here, we want to interrupt at the closer of the two timeout times. If
- * fin_time >= statement_fin_time then we need not touch the existing
- * timer setting; else set up to interrupt at the deadlock timeout
- * time.
+ * Here, we want to interrupt at the closer of the two timeout times.
+ * If fin_time >= statement_fin_time then we need not touch the
+ * existing timer setting; else set up to interrupt at the deadlock
+ * timeout time.
*
* NOTE: in this case it is possible that this routine will be
* interrupted by the previously-set timer alarm. This is okay
diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c
index f1c92d70dac..3330c48a877 100644
--- a/src/backend/storage/lmgr/s_lock.c
+++ b/src/backend/storage/lmgr/s_lock.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.40 2005/10/15 02:49:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.40.2.1 2005/11/22 18:23:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -58,27 +58,27 @@ s_lock(volatile slock_t *lock, const char *file, int line)
* longer than to call the kernel, so we try to adapt the spin loop count
* depending on whether we seem to be in a uniprocessor or multiprocessor.
*
- * Note: you might think MIN_SPINS_PER_DELAY should be just 1, but you'd be
- * wrong; there are platforms where that can result in a "stuck spinlock"
- * failure. This has been seen particularly on Alphas; it seems that the
- * first TAS after returning from kernel space will always fail on that
- * hardware.
+ * Note: you might think MIN_SPINS_PER_DELAY should be just 1, but you'd
+ * be wrong; there are platforms where that can result in a "stuck
+ * spinlock" failure. This has been seen particularly on Alphas; it seems
+ * that the first TAS after returning from kernel space will always fail
+ * on that hardware.
*
- * Once we do decide to block, we use randomly increasing pg_usleep() delays.
- * The first delay is 1 msec, then the delay randomly increases to about
- * one second, after which we reset to 1 msec and start again. The idea
- * here is that in the presence of heavy contention we need to increase
- * the delay, else the spinlock holder may never get to run and release
- * the lock. (Consider situation where spinlock holder has been nice'd
- * down in priority by the scheduler --- it will not get scheduled until
- * all would-be acquirers are sleeping, so if we always use a 1-msec
+ * Once we do decide to block, we use randomly increasing pg_usleep()
+ * delays. The first delay is 1 msec, then the delay randomly increases to
+ * about one second, after which we reset to 1 msec and start again. The
+ * idea here is that in the presence of heavy contention we need to
+ * increase the delay, else the spinlock holder may never get to run and
+ * release the lock. (Consider situation where spinlock holder has been
+ * nice'd down in priority by the scheduler --- it will not get scheduled
+ * until all would-be acquirers are sleeping, so if we always use a 1-msec
* sleep, there is a real possibility of starvation.) But we can't just
* clamp the delay to an upper bound, else it would take a long time to
* make a reasonable number of tries.
*
- * We time out and declare error after NUM_DELAYS delays (thus, exactly that
- * many tries). With the given settings, this will usually take 2 or so
- * minutes. It seems better to fix the total number of tries (and thus
+ * We time out and declare error after NUM_DELAYS delays (thus, exactly
+ * that many tries). With the given settings, this will usually take 2 or
+ * so minutes. It seems better to fix the total number of tries (and thus
* the probability of unintended failure) than to fix the total time
* spent.
*
@@ -251,7 +251,6 @@ _success: \n\
);
}
#endif /* __m68k__ && !__linux__ */
-
#else /* not __GNUC__ */
/*
diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c
index dfec2a77694..0f9d9d47ccb 100644
--- a/src/backend/storage/lmgr/spin.c
+++ b/src/backend/storage/lmgr/spin.c
@@ -16,7 +16,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.17 2005/10/15 02:49:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.17.2.1 2005/11/22 18:23:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,8 +54,8 @@ SpinlockSemas(void)
* It would be cleaner to distribute this logic into the affected modules,
* similar to the way shmem space estimation is handled.
*
- * For now, though, we just need a few spinlocks (10 should be plenty) plus
- * one for each LWLock.
+ * For now, though, we just need a few spinlocks (10 should be plenty)
+ * plus one for each LWLock.
*/
return NumLWLocks() + 10;
}
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c
index fd19fd8736d..8812dfb5f68 100644
--- a/src/backend/storage/page/bufpage.c
+++ b/src/backend/storage/page/bufpage.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.67 2005/10/15 02:49:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.67.2.1 2005/11/22 18:23:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -184,8 +184,8 @@ PageAddItem(Page page,
/*
* Compute new lower and upper pointers for page, see if it'll fit.
*
- * Note: do arithmetic as signed ints, to avoid mistakes if, say, alignedSize
- * > pd_upper.
+ * Note: do arithmetic as signed ints, to avoid mistakes if, say,
+ * alignedSize > pd_upper.
*/
if (offsetNumber == limit || needshuffle)
lower = phdr->pd_lower + sizeof(ItemIdData);
@@ -524,8 +524,8 @@ PageIndexTupleDelete(Page page, OffsetNumber offnum)
/*
* Finally, we need to adjust the linp entries that remain.
*
- * Anything that used to be before the deleted tuple's data was moved forward
- * by the size of the deleted tuple.
+ * Anything that used to be before the deleted tuple's data was moved
+ * forward by the size of the deleted tuple.
*/
if (!PageIsEmpty(page))
{
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index 17d14e38700..873ba1ebe2c 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/smgr/smgr.c,v 1.93 2005/10/15 02:49:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/smgr/smgr.c,v 1.93.2.1 2005/11/22 18:23:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -344,8 +344,8 @@ smgrcreate(SMgrRelation reln, bool isTemp, bool isRedo)
* We may be using the target table space for the first time in this
* database, so create a per-database subdirectory if needed.
*
- * XXX this is a fairly ugly violation of module layering, but this seems to
- * be the best place to put the check. Maybe TablespaceCreateDbspace
+ * XXX this is a fairly ugly violation of module layering, but this seems
+ * to be the best place to put the check. Maybe TablespaceCreateDbspace
* should be here and not in commands/tablespace.c? But that would imply
* importing a lot of stuff that smgr.c oughtn't know, either.
*/
@@ -472,8 +472,8 @@ smgr_internal_unlink(RelFileNode rnode, int which, bool isTemp, bool isRedo)
/*
* And delete the physical files.
*
- * Note: we treat deletion failure as a WARNING, not an error, because we've
- * already decided to commit or abort the current xact.
+ * Note: we treat deletion failure as a WARNING, not an error, because
+ * we've already decided to commit or abort the current xact.
*/
if (!(*(smgrsw[which].smgr_unlink)) (rnode, isRedo))
ereport(WARNING,