mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Fix inconsistencies and typos in the tree, take 9
This addresses more issues with code comments, variable names and unreferenced variables. Author: Alexander Lakhin Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com
This commit is contained in:
@@ -270,7 +270,7 @@ is stored in the higher bits. That requires 43 bits in total, which
|
||||
conveniently fits in at most 6 bytes.
|
||||
|
||||
A compressed posting list is passed around and stored on disk in a
|
||||
PackedPostingList struct. The first item in the list is stored uncompressed
|
||||
GinPostingList struct. The first item in the list is stored uncompressed
|
||||
as a regular ItemPointerData, followed by the length of the list in bytes,
|
||||
followed by the packed items.
|
||||
|
||||
|
@@ -650,7 +650,7 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ERROR, "invalid return code from GIN placeToPage method: %d", rc);
|
||||
elog(ERROR, "invalid return code from GIN beginPlaceToPage method: %d", rc);
|
||||
result = false; /* keep compiler quiet */
|
||||
}
|
||||
|
||||
|
@@ -74,7 +74,7 @@ gistkillitems(IndexScanDesc scan)
|
||||
|
||||
/*
|
||||
* Mark all killedItems as dead. We need no additional recheck, because,
|
||||
* if page was modified, pageLSN must have changed.
|
||||
* if page was modified, curPageLSN must have changed.
|
||||
*/
|
||||
for (i = 0; i < so->numKilled; i++)
|
||||
{
|
||||
@@ -379,11 +379,11 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem, double *myDistances,
|
||||
|
||||
/*
|
||||
* Check if the page was deleted after we saw the downlink. There's
|
||||
* nothing of interest on a deleted page. Note that we must do this
|
||||
* after checking the NSN for concurrent splits! It's possible that
|
||||
* the page originally contained some tuples that are visible to us,
|
||||
* but was split so that all the visible tuples were moved to another
|
||||
* page, and then this page was deleted.
|
||||
* nothing of interest on a deleted page. Note that we must do this after
|
||||
* checking the NSN for concurrent splits! It's possible that the page
|
||||
* originally contained some tuples that are visible to us, but was split
|
||||
* so that all the visible tuples were moved to another page, and then
|
||||
* this page was deleted.
|
||||
*/
|
||||
if (GistPageIsDeleted(page))
|
||||
{
|
||||
|
@@ -706,7 +706,7 @@ hash_xlog_squeeze_page(XLogReaderState *record)
|
||||
|
||||
/*
|
||||
* if the page on which are adding tuples is a page previous to freed
|
||||
* overflow page, then update its nextblno.
|
||||
* overflow page, then update its nextblkno.
|
||||
*/
|
||||
if (xldata->is_prev_bucket_same_wrt)
|
||||
{
|
||||
|
@@ -257,8 +257,8 @@ restart_insert:
|
||||
* _hash_pgaddtup() -- add a tuple to a particular page in the index.
|
||||
*
|
||||
* This routine adds the tuple to the page as requested; it does not write out
|
||||
* the page. It is an error to call pgaddtup() without pin and write lock on
|
||||
* the target buffer.
|
||||
* the page. It is an error to call this function without pin and write lock
|
||||
* on the target buffer.
|
||||
*
|
||||
* Returns the offset number at which the tuple was inserted. This function
|
||||
* is responsible for preserving the condition that tuples in a hash index
|
||||
|
@@ -74,7 +74,7 @@ static HeapTuple heap_prepare_insert(Relation relation, HeapTuple tup,
|
||||
TransactionId xid, CommandId cid, int options);
|
||||
static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf,
|
||||
Buffer newbuf, HeapTuple oldtup,
|
||||
HeapTuple newtup, HeapTuple old_key_tup,
|
||||
HeapTuple newtup, HeapTuple old_key_tuple,
|
||||
bool all_visible_cleared, bool new_all_visible_cleared);
|
||||
static Bitmapset *HeapDetermineModifiedColumns(Relation relation,
|
||||
Bitmapset *interesting_cols,
|
||||
|
@@ -124,7 +124,7 @@
|
||||
|
||||
/* prototypes for internal routines */
|
||||
static Buffer vm_readbuf(Relation rel, BlockNumber blkno, bool extend);
|
||||
static void vm_extend(Relation rel, BlockNumber nvmblocks);
|
||||
static void vm_extend(Relation rel, BlockNumber vm_nblocks);
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -657,7 +657,7 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
|
||||
/* XLOG stuff */
|
||||
if (wstate->btws_use_wal)
|
||||
{
|
||||
/* We use the heap NEWPAGE record type for this */
|
||||
/* We use the XLOG_FPI record type for this */
|
||||
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
|
||||
}
|
||||
|
||||
|
@@ -530,7 +530,7 @@ void XLogResetInsertion(void)
|
||||
construction workspace. This is only needed if you have already called
|
||||
XLogBeginInsert(), but decide to not insert the record after all.
|
||||
|
||||
void XLogEnsureRecordSpace(int max_block_id, int nrdatas)
|
||||
void XLogEnsureRecordSpace(int max_block_id, int ndatas)
|
||||
|
||||
Normally, the WAL record construction buffers have the following limits:
|
||||
|
||||
|
@@ -92,7 +92,7 @@ static int ZeroCLOGPage(int pageno, bool writeXlog);
|
||||
static bool CLOGPagePrecedes(int page1, int page2);
|
||||
static void WriteZeroPageXlogRec(int pageno);
|
||||
static void WriteTruncateXlogRec(int pageno, TransactionId oldestXact,
|
||||
Oid oldestXidDb);
|
||||
Oid oldestXactDb);
|
||||
static void TransactionIdSetPageStatus(TransactionId xid, int nsubxids,
|
||||
TransactionId *subxids, XidStatus status,
|
||||
XLogRecPtr lsn, int pageno,
|
||||
|
@@ -282,7 +282,7 @@ typedef struct MultiXactStateData
|
||||
} MultiXactStateData;
|
||||
|
||||
/*
|
||||
* Last element of OldestMemberMXactID and OldestVisibleMXactId arrays.
|
||||
* Last element of OldestMemberMXactId and OldestVisibleMXactId arrays.
|
||||
* Valid elements are (1..MaxOldestSlot); element 0 is never used.
|
||||
*/
|
||||
#define MaxOldestSlot (MaxBackends + max_prepared_xacts)
|
||||
|
Reference in New Issue
Block a user