mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Fix inconsistencies and typos in the tree
This is numbered take 8, and addresses again a set of issues with code comments, variable names and unreferenced variables. Author: Alexander Lakhin Discussion: https://postgr.es/m/b137b5eb-9c95-9c2f-586e-38aba7d59788@gmail.com
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include "access/bufmask.h"
|
||||
|
||||
/*
|
||||
* mask_page_lsn
|
||||
* mask_page_lsn_and_checksum
|
||||
*
|
||||
* In consistency checks, the LSN of the two pages compared will likely be
|
||||
* different because of concurrent operations when the WAL is generated and
|
||||
|
@@ -1371,7 +1371,7 @@ disassembleLeaf(Page page)
|
||||
if (GinPageIsCompressed(page))
|
||||
{
|
||||
/*
|
||||
* Create a leafSegment entry for each segment.
|
||||
* Create a leafSegmentInfo entry for each segment.
|
||||
*/
|
||||
seg = GinDataLeafPageGetPostingList(page);
|
||||
segbegin = (Pointer) seg;
|
||||
|
@@ -237,7 +237,7 @@ static void logical_end_heap_rewrite(RewriteState state);
|
||||
* new_heap new, locked heap relation to insert tuples to
|
||||
* oldest_xmin xid used by the caller to determine which tuples are dead
|
||||
* freeze_xid xid before which tuples will be frozen
|
||||
* min_multi multixact before which multis will be removed
|
||||
* cutoff_multi multixact before which multis will be removed
|
||||
* use_wal should the inserts to the new heap be WAL-logged?
|
||||
*
|
||||
* Returns an opaque RewriteState, allocated in current memory context,
|
||||
@@ -787,7 +787,7 @@ raw_heap_insert(RewriteState state, HeapTuple tup)
|
||||
* Instead we simply write the mapping files out to disk, *before* the
|
||||
* XLogInsert() is performed. That guarantees that either the XLogInsert() is
|
||||
* inserted after the checkpoint's redo pointer or that the checkpoint (via
|
||||
* LogicalRewriteHeapCheckpoint()) has flushed the (partial) mapping file to
|
||||
* CheckPointLogicalRewriteHeap()) has flushed the (partial) mapping file to
|
||||
* disk. That leaves the tail end that has not yet been flushed open to
|
||||
* corruption, which is solved by including the current offset in the
|
||||
* xl_heap_rewrite_mapping records and truncating the mapping file to it
|
||||
|
@@ -842,7 +842,7 @@ spgvacuumscan(spgBulkDeleteState *bds)
|
||||
}
|
||||
}
|
||||
|
||||
/* Propagate local lastUsedPage cache to metablock */
|
||||
/* Propagate local lastUsedPages cache to metablock */
|
||||
SpGistUpdateMetaPage(index);
|
||||
|
||||
/*
|
||||
|
@@ -1988,7 +1988,7 @@ StartTransaction(void)
|
||||
|
||||
/*
|
||||
* Advertise it in the proc array. We assume assignment of
|
||||
* LocalTransactionID is atomic, and the backendId should be set already.
|
||||
* localTransactionId is atomic, and the backendId should be set already.
|
||||
*/
|
||||
Assert(MyProc->backendId == vxid.backendId);
|
||||
MyProc->lxid = vxid.localTransactionId;
|
||||
|
@@ -1796,11 +1796,11 @@ WaitXLogInsertionsToFinish(XLogRecPtr upto)
|
||||
do
|
||||
{
|
||||
/*
|
||||
* See if this insertion is in progress. LWLockWait will wait for
|
||||
* the lock to be released, or for the 'value' to be set by a
|
||||
* LWLockUpdateVar call. When a lock is initially acquired, its
|
||||
* value is 0 (InvalidXLogRecPtr), which means that we don't know
|
||||
* where it's inserting yet. We will have to wait for it. If
|
||||
* See if this insertion is in progress. LWLockWaitForVar will
|
||||
* wait for the lock to be released, or for the 'value' to be set
|
||||
* by a LWLockUpdateVar call. When a lock is initially acquired,
|
||||
* its value is 0 (InvalidXLogRecPtr), which means that we don't
|
||||
* know where it's inserting yet. We will have to wait for it. If
|
||||
* it's a small insertion, the record will most likely fit on the
|
||||
* same page and the inserter will release the lock without ever
|
||||
* calling LWLockUpdateVar. But if it has to sleep, it will
|
||||
@@ -6024,7 +6024,10 @@ recoveryApplyDelay(XLogReaderState *record)
|
||||
TimestampDifference(GetCurrentTimestamp(), recoveryDelayUntilTime,
|
||||
&secs, µsecs);
|
||||
|
||||
/* NB: We're ignoring waits below min_apply_delay's resolution. */
|
||||
/*
|
||||
* NB: We're ignoring waits below recovery_min_apply_delay's
|
||||
* resolution.
|
||||
*/
|
||||
if (secs <= 0 && microsecs / 1000 <= 0)
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user