summaryrefslogtreecommitdiff
path: root/src/backend/lib/pairingheap.c
AgeCommit message (Collapse)Author
2016-01-02Update copyright for 2016Bruce Momjian
Backpatch certain files through 9.1
2015-07-02Use appendStringInfoString/Char et al where appropriate.Heikki Linnakangas
Patch by David Rowley. Backpatch to 9.5, as some of the calls were new in 9.5, and keeping the code in sync with master makes future backpatching easier.
2015-05-24pgindent run for 9.5Bruce Momjian
2015-02-17Fix a bug in pairing heap removal code.Heikki Linnakangas
After removal, the next_sibling pointer of a node was sometimes incorrectly left to point to another node in the heap, which meant that a node was sometimes linked twice into the heap. Surprisingly that didn't cause any crashes in my testing, but it was clearly wrong and could easily segfault in other scenarios. Also always keep the prev_or_parent pointer as NULL on the root node. That was not a correctness issue AFAICS, but let's be tidy. Add a debugging function, to dump the contents of a pairing heap as a string. It's #ifdef'd out, as it's not used for anything in any normal code, but it was highly useful in debugging this. Let's keep it handy for further reference.
2015-01-06Update copyright for 2015Bruce Momjian
Backpatch certain files through 9.0
2014-12-22Use a pairing heap for the priority queue in kNN-GiST searches.Heikki Linnakangas
This performs slightly better, uses less memory, and needs slightly less code in GiST, than the Red-Black tree previously used. Reviewed by Peter Geoghegan