}
/*
- * Now that we know whick blocks the new pages go to, set up downlink
+ * Now that we know which blocks the new pages go to, set up downlink
* tuples to point to them.
*/
for (ptr = dist; ptr; ptr = ptr->next)
/*-------------------------------------------------------------------------
*
* gistproc.c
- * Support procedures for GiSTs over 2-D objects (boxes, polygons, circles).
+ * Support procedures for GiSTs over 2-D objects (boxes, polygons, circles,
+ * points).
*
* This gives R-tree behavior, with Guttman's poly-time split algorithm.
*
/*
* Forms unions of subkeys after page split, but
- * uses only tuples aren't in groups of equalent tuples
+ * uses only tuples that aren't in groups of equivalent tuples
*/
static void
gistunionsubkeyvec(GISTSTATE *giststate, IndexTuple *itvec,
/*
* adjust left and right unions according to splits by previous
- * split by firsts columns. This function is called only in case
- * when pickSplit doesn't support subspplit.
+ * split by first columns. This function is called only in case
+ * when pickSplit doesn't support subsplit.
*/
static void
}
/*
- * trys to split page by attno key, in a case of null
- * values move its to separate page.
+ * tries to split page by attno key, in case of null
+ * values move those to separate page.
*/
void
gistSplitByKey(Relation r, Page page, IndexTuple *itup, int len, GISTSTATE *giststate,
{
/*
* Corner case: All keys in attno column are null, we should try to
- * split by keys in next column. It all keys in all columns are NULL
+ * split by keys in next column. If all keys in all columns are NULL
* just split page half by half
*/
v->spl_risnull[attno] = v->spl_lisnull[attno] = TRUE;
{
/*
* simple case: left and right keys for attno column are
- * equial
+ * equal
*/
gistSplitByKey(r, page, itup, len, giststate, v, entryvec, attno + 1);
}
#include "utils/builtins.h"
/*
- * static *S used for temrorary storage (saves stack and palloc() call)
+ * static *S used for temporary storage (saves stack and palloc() call)
*/
static Datum attrS[INDEX_MAX_KEYS];
}
/*
- * Make unions of keys in IndexTuple vector, return FALSE if itvec contains
- * invalid tuple. Resulting Datums aren't compressed.
+ * Make unions of keys in IndexTuple vector.
+ * Resulting Datums aren't compressed.
*/
void
/*
* Bulk deletion of all index entries pointing to a set of heap tuples and
- * check invalid tuples after crash recovery.
+ * check invalid tuples left after upgrade.
* The set of target tuples is specified via a callback routine that tells
* whether any given heap tuple (identified by ItemPointer) is being deleted.
*
*
* Note: because TransactionIds are 32 bits and wrap around at 0xFFFFFFFF,
* CLOG page numbering also wraps around at 0xFFFFFFFF/CLOG_XACTS_PER_PAGE,
- * and CLOG segment numbering at 0xFFFFFFFF/CLOG_XACTS_PER_SEGMENT. We need
- * take no explicit notice of that fact in this module, except when comparing
- * segment and page numbers in TruncateCLOG (see CLOGPagePrecedes).
+ * and CLOG segment numbering at
+ * 0xFFFFFFFF/CLOG_XACTS_PER_PAGE/SLRU_PAGES_PER_SEGMENT. We need take no
+ * explicit notice of that fact in this module, except when comparing segment
+ * and page numbers in TruncateCLOG (see CLOGPagePrecedes).
*/
/* We need two bits per xact, so four xacts fit in a byte */
* in a page from disk into an existing buffer. (Such an old page cannot
* have any interesting LSNs, since we'd have flushed them before writing
* the page in the first place.)
+ *
+ * This assumes that InvalidXLogRecPtr is bitwise-all-0.
*/
static void
SimpleLruZeroLSNs(SlruCtl ctl, int slotno)
}
/* -----------------
- * ExecRescanWindowAgg
+ * ExecReScanWindowAgg
* -----------------
*/
void
*
* We also update the following backend-global variables:
* TransactionXmin: the oldest xmin of any snapshot in use in the
- * current transaction (this is the same as MyProc->xmin).
+ * current transaction (this is the same as MyPgXact->xmin).
* RecentXmin: the xmin computed for the most recent snapshot. XIDs
* older than this are known not running any more.
* RecentGlobalXmin: the global xmin (oldest TransactionXmin across all
/*
- * string_hash: hash function for keys that are null-terminated strings.
+ * string_hash: hash function for keys that are NUL-terminated strings.
*
* NOTE: this is the default hash function if none is specified.
*/
* that corresponding spl_(r|l)datum already defined and
* PickSplit should use that value. PickSplit should always set
* spl_(r|l)datum_exists to false: GiST will check value to
- * control supportng this feature by PickSplit...
+ * control supporting this feature by PickSplit...
*/
typedef struct GIST_SPLITVEC
{