From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Julien Rouhaud <rjuju123(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Claudio Freire <klaussfreire(at)gmail(dot)com> |
Subject: | Re: Sparse bit set data structure |
Date: | 2019-03-20 02:48:00 |
Message-ID: | B763A044-3773-4DCF-9360-7D834DE0224E@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
Great job!
> 20 марта 2019 г., в 9:10, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> написал(а):
>
> Please review, if you have a chance.
>
> - Heikki
> <0001-Add-IntegerSet-to-hold-large-sets-of-64-bit-ints-eff.patch>
I'm looking into the code and have few questions:
1. I'm not sure it is the best interface for iteration
uint64
intset_iterate_next(IntegerSet *intset, bool *found)
we will use it like
while
{
bool found;
BlockNumber x = (BlockNumber) intset_iterate_next(is, &found);
if (!found)
break;
// do stuff
}
we could use it like
BlockNumber x;
while(intset_iterate_next(is, &x))
{
// do stuff
}
But that's not a big difference.
2.
* Limitations
* -----------
*
* - Values must be added in order. (Random insertions would require
* splitting nodes, which hasn't been implemented.)
*
* - Values cannot be added while iteration is in progress.
You check for violation of these limitation in code, but there is not tests for this checks.
Should we add these tests?
Best regards, Andrey Borodin.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-03-20 02:51:03 | Re: [HACKERS] generated columns |
Previous Message | Amit Langote | 2019-03-20 02:33:40 | Re: speeding up planning with partitions |