1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

Fix outdated comments, GIST search queue is not an RBTree anymore.

The GiST search queue is implemented as a pairing heap rather than as
Red-Black Tree, since 9.5 (commit e7032610). I neglected these comments
in that commit.
This commit is contained in:
Heikki Linnakangas
2016-09-20 11:38:25 +03:00
parent edb5c40976
commit f0a86dfdb4
2 changed files with 9 additions and 13 deletions

View File

@@ -126,7 +126,7 @@ gistrescan(PG_FUNCTION_ARGS)
* which is created on the second call and reset on later calls. Thus, in
* the common case where a scan is only rescan'd once, we just put the
* queue in scanCxt and don't pay the overhead of making a second memory
* context. If we do rescan more than once, the first RBTree is just left
* context. If we do rescan more than once, the first queue is just left
* for dead until end of scan; this small wastage seems worth the savings
* in the common case.
*/
@@ -186,7 +186,7 @@ gistrescan(PG_FUNCTION_ARGS)
ALLOCSET_DEFAULT_MAXSIZE);
}
/* create new, empty RBTree for search queue */
/* create new, empty pairing heap for search queue */
oldCxt = MemoryContextSwitchTo(so->queueCxt);
so->queue = pairingheap_allocate(pairingheap_GISTSearchItem_cmp, scan);
MemoryContextSwitchTo(oldCxt);