mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-03 06:46:54 +02:00
352d297dc7
Add ability to scan all entries sequentially to dshash. The interface is similar but a bit different both from that of dynahash and simple dshash search functions. The most significant differences is that dshash's interfac always needs a call to dshash_seq_term when scan ends. Another is locking. Dshash holds partition lock when returning an entry, dshash_seq_next() also holds lock when returning an entry but callers shouldn't release it, since the lock is essential to continue a scan. The seqscan interface allows entry deletion while a scan is in progress using dshash_delete_current(). Reviewed-By: Andres Freund <andres@anarazel.de> Author: Kyotaro Horiguchi <horikyoga.ntt@gmail.com> |
||
---|---|---|
.. | ||
binaryheap.c | ||
bipartite_match.c | ||
bloomfilter.c | ||
dshash.c | ||
hyperloglog.c | ||
ilist.c | ||
integerset.c | ||
knapsack.c | ||
Makefile | ||
pairingheap.c | ||
rbtree.c | ||
README |
This directory contains a general purpose data structures, for use anywhere in the backend: binaryheap.c - a binary heap bipartite_match.c - Hopcroft-Karp maximum cardinality algorithm for bipartite graphs bloomfilter.c - probabilistic, space-efficient set membership testing dshash.c - concurrent hash tables backed by dynamic shared memory areas hyperloglog.c - a streaming cardinality estimator ilist.c - single and double-linked lists integerset.c - a data structure for holding large set of integers knapsack.c - knapsack problem solver pairingheap.c - a pairing heap rbtree.c - a red-black tree stringinfo.c - an extensible string type Aside from the inherent characteristics of the data structures, there are a few practical differences between the binary heap and the pairing heap. The binary heap is fully allocated at creation, and cannot be expanded beyond the allocated size. The pairing heap on the other hand has no inherent maximum size, but the caller needs to allocate each element being stored in the heap, while the binary heap works with plain Datums or pointers. The linked-lists in ilist.c can be embedded directly into other structs, as opposed to the List interface in nodes/pg_list.h.