Re: [HACKERS] Red-Black tree traversal tests

2017-09-10 Thread Tom Lane
I wrote: > In the meantime, here's my version. Notable changes: I went ahead and pushed this, with the removal of the preorder/postorder code, so we can see if the buildfarm finds out anything interesting. Feel free to continue to submit improvements though. One thing that occurred to me is that

Re: [HACKERS] Red-Black tree traversal tests

2017-09-09 Thread Tom Lane
Victor Drobny writes: > On 2017-09-08 15:23, Thomas Munro wrote: >> It's trying to call rb->combiner which is null. > Thank you for pointing on it. Here is a fixed version. Actually, I think we *do* want the tests to call the combiner occasionally ... I whacked this around quite a bit and had g

Re: [HACKERS] Red-Black tree traversal tests

2017-09-08 Thread Victor Drobny
On 2017-09-08 15:23, Thomas Munro wrote: On Fri, Sep 8, 2017 at 9:03 PM, Victor Drobny wrote: Thank you very much for your review. In the attachment you can find v2 of the patch. FYI this version crashes for me: test test_rbtree ... FAILED (test process exited with exit code 2

Re: [HACKERS] Red-Black tree traversal tests

2017-09-08 Thread Thomas Munro
On Fri, Sep 8, 2017 at 9:03 PM, Victor Drobny wrote: > Thank you very much for your review. In the attachment you can find v2 of > the patch. FYI this version crashes for me: test test_rbtree ... FAILED (test process exited with exit code 2) It's trying to call rb->combiner which i

Re: [HACKERS] Red-Black tree traversal tests

2017-09-08 Thread Victor Drobny
Dear Tom, Thank you very much for your review. In the attachment you can find v2 of the patch. On 2017-09-07 01:38, Tom Lane wrote: [ btw, please don't cc pgsql-hackers-owner, the list moderators don't need the noise ] Aleksander Alekseev writes: I would say that this patch is in a pretty

Re: [HACKERS] Red-Black tree traversal tests

2017-09-06 Thread Tom Lane
[ btw, please don't cc pgsql-hackers-owner, the list moderators don't need the noise ] Aleksander Alekseev writes: > I would say that this patch is in a pretty good shape now. And I see a > 99% code coverage of rbtree.c. Let's see what committers think. I took a quick look through the patch ---

Re: [HACKERS] Red-Black tree traversal tests

2017-08-03 Thread Aleksander Alekseev
Hi Victor, > I forgot to attach the patch. Sorry. > Here it is. I would say that this patch is in a pretty good shape now. And I see a 99% code coverage of rbtree.c. Let's see what committers think. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Red-Black tree traversal tests

2017-08-02 Thread Victor Drobny
I forgot to attach the patch. Sorry. Here it is. -- -- Victor Drobny Postgres Professional: http://www.postgrespro.com The Russian Postgres Companydiff --git a/src/test/modules/Makefile b/src/test/modules/Makefile index 3ce9904..b7ed0af 100644 --- a/src/test/modules/Makefile +++ b/src/test/mod

Re: [HACKERS] Red-Black tree traversal tests

2017-08-02 Thread Victor Drobny
Hello, Thank you for the reviewing. If it's not too much trouble perhaps you could write a few more test so we would have 100% test coverage for rbtree, could modify it safely and be sure that it actually works when someone will need the rest of its functionality? Done. Now all of the functi

Re: [HACKERS] Red-Black tree traversal tests

2017-08-01 Thread Aleksander Alekseev
Hi Victor, > If it's not too much trouble perhaps you could write a few more test so > we would have 100% test coverage for rbtree, could modify it safely and > be sure that it actually works when someone will need the rest of its > functionality? Also I would recommend to add your patch to the n

Re: [HACKERS] Red-Black tree traversal tests

2017-08-01 Thread Aleksander Alekseev
Hi Victor, > Postgres now has its own red-black tree implementation. This tree has 4 > types of traversals. In the attachment, you can find module test that > checks the correctness of tree traversal strategies. > > I hope that someone can find it useful. Great job! However, according to lcov re

[HACKERS] Red-Black tree traversal tests

2017-07-28 Thread Victor Drobny
Hello, Postgres now has its own red-black tree implementation. This tree has 4 types of traversals. In the attachment, you can find module test that checks the correctness of tree traversal strategies. I hope that someone can find it useful. Thank you for attention! -- -- Victor Drobn