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 10
This addresses some issues with unnecessary code comments, fixes various typos in docs and comments, and removes some orphaned structures and definitions. Author: Alexander Lakhin Discussion: https://postgr.es/m/9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com
This commit is contained in:
@@ -395,9 +395,10 @@ brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Because of SUE lock, this function shouldn't run concurrently with
|
||||
* summarization. Placeholder tuples can only exist as leftovers from
|
||||
* crashed summarization, so if we detect any, we complain but proceed.
|
||||
* Because of ShareUpdateExclusive lock, this function shouldn't run
|
||||
* concurrently with summarization. Placeholder tuples can only exist as
|
||||
* leftovers from crashed summarization, so if we detect any, we complain
|
||||
* but proceed.
|
||||
*/
|
||||
if (BrinTupleIsPlaceholder(tup))
|
||||
ereport(WARNING,
|
||||
|
@@ -37,7 +37,7 @@ static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack,
|
||||
Buffer leftchild, Buffer rightchild,
|
||||
bool unlockbuf, bool unlockleftchild);
|
||||
static void gistfinishsplit(GISTInsertState *state, GISTInsertStack *stack,
|
||||
GISTSTATE *giststate, List *splitinfo, bool releasebuf);
|
||||
GISTSTATE *giststate, List *splitinfo, bool unlockbuf);
|
||||
static void gistprunepage(Relation rel, Page page, Buffer buffer,
|
||||
Relation heapRel);
|
||||
|
||||
@@ -1047,7 +1047,7 @@ gistFindCorrectParent(Relation r, GISTInsertStack *child)
|
||||
{
|
||||
/*
|
||||
* End of chain and still didn't find parent. It's a very-very
|
||||
* rare situation when root splited.
|
||||
* rare situation when root splitted.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
@@ -1510,7 +1510,7 @@ _hash_getcachedmetap(Relation rel, Buffer *metabuf, bool force_refresh)
|
||||
* It's important that we don't set rd_amcache to an invalid value.
|
||||
* Either MemoryContextAlloc or _hash_getbuf could fail, so don't
|
||||
* install a pointer to the newly-allocated storage in the actual
|
||||
* relcache entry until both have succeeeded.
|
||||
* relcache entry until both have succeeded.
|
||||
*/
|
||||
if (rel->rd_amcache == NULL)
|
||||
cache = MemoryContextAlloc(rel->rd_indexcxt,
|
||||
|
@@ -3029,7 +3029,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
|
||||
* the value ends up being the same, this test will fail and we will use
|
||||
* the stronger lock. This is acceptable; the important case to optimize
|
||||
* is updates that don't manipulate key columns, not those that
|
||||
* serendipitiously arrive at the same key values.
|
||||
* serendipitously arrive at the same key values.
|
||||
*/
|
||||
if (!bms_overlap(modified_attrs, key_attrs))
|
||||
{
|
||||
|
@@ -664,7 +664,7 @@ _bt_restore_array_keys(IndexScanDesc scan)
|
||||
* scan->numberOfKeys is the number of input keys, so->numberOfKeys gets
|
||||
* the number of output keys (possibly less, never greater).
|
||||
*
|
||||
* The output keys are marked with additional sk_flag bits beyond the
|
||||
* The output keys are marked with additional sk_flags bits beyond the
|
||||
* system-standard bits supplied by the caller. The DESC and NULLS_FIRST
|
||||
* indoption bits for the relevant index attribute are copied into the flags.
|
||||
* Also, for a DESC column, we commute (flip) all the sk_strategy numbers
|
||||
|
@@ -1364,7 +1364,7 @@ SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)
|
||||
}
|
||||
|
||||
/*
|
||||
* Scan the SimpleLRU directory and apply a callback to each file found in it.
|
||||
* Scan the SimpleLru directory and apply a callback to each file found in it.
|
||||
*
|
||||
* If the callback returns true, the scan is stopped. The last return value
|
||||
* from the callback is returned.
|
||||
|
@@ -1232,7 +1232,7 @@ RecordTransactionCommit(void)
|
||||
if (!markXidCommitted)
|
||||
{
|
||||
/*
|
||||
* We expect that every smgrscheduleunlink is followed by a catalog
|
||||
* We expect that every RelationDropStorage is followed by a catalog
|
||||
* update, and hence XID assignment, so we shouldn't get here with any
|
||||
* pending deletes. Use a real test not just an Assert to check this,
|
||||
* since it's a bit fragile.
|
||||
|
@@ -702,7 +702,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
|
||||
* We assume all of the record (that is, xl_tot_len bytes) has been read
|
||||
* into memory at *record. Also, ValidXLogRecordHeader() has accepted the
|
||||
* record's header, which means in particular that xl_tot_len is at least
|
||||
* SizeOfXlogRecord.
|
||||
* SizeOfXLogRecord.
|
||||
*/
|
||||
static bool
|
||||
ValidXLogRecord(XLogReaderState *state, XLogRecord *record, XLogRecPtr recptr)
|
||||
|
Reference in New Issue
Block a user