mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add IntegerSet, to hold large sets of 64-bit ints efficiently.
The set is implemented as a B-tree, with a compact representation at leaf items, using Simple-8b algorithm, so that clusters of nearby values use less memory. The IntegerSet isn't used for anything yet, aside from the test code, but we have two patches in the works that would benefit from this: A patch to allow GiST vacuum to delete empty pages, and a patch to reduce heap VACUUM's memory usage, by storing the list of dead TIDs more efficiently and lifting the 1 GB limit on its size. This includes a unit test module, in src/test/modules/test_integerset. It can be used to verify correctness, as a regression test, but if you run it manully, it can also print memory usage and execution time of some of the tests. Author: Heikki Linnakangas, Andrey Borodin Reviewed-by: Julien Rouhaud Discussion: https://www.postgresql.org/message-id/b5e82599-1966-5783-733c-1a947ddb729f@iki.fi
This commit is contained in:
@ -13,6 +13,6 @@ top_builddir = ../../..
|
||||
include $(top_builddir)/src/Makefile.global
|
||||
|
||||
OBJS = binaryheap.o bipartite_match.o bloomfilter.o dshash.o hyperloglog.o \
|
||||
ilist.o knapsack.o pairingheap.o rbtree.o stringinfo.o
|
||||
ilist.o integerset.o knapsack.o pairingheap.o rbtree.o stringinfo.o
|
||||
|
||||
include $(top_srcdir)/src/backend/common.mk
|
||||
|
@ -13,6 +13,8 @@ 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
|
||||
|
1019
src/backend/lib/integerset.c
Normal file
1019
src/backend/lib/integerset.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user