On Fri, Dec 21, 2018 at 1:50 AM Alexander Korotkov
<a.korot...@postgrespro.ru> wrote:
> чт, 20 дек. 2018 г., 2:22 Andres Freund and...@anarazel.de:
>> On 2018-12-03 16:07:40 -0800, Andres Freund wrote:
>> > As far as I can tell that increase comes laregely from the new GIN
>> > tests.  Could one of you please look at keeping the test time increase
>> > to something more reasonable?
>>
>> Ping?
>>
>> It's also one of the slowest tests outside of valgrind...
>
> I'm going to take a look on that.

While trying to reduce isolation test suite for GIN, I found following
behavior surprising for me.

GinBtreeStack *
ginFindLeafPage(GinBtree btree, bool searchMode, Snapshot snapshot)
{
    GinBtreeStack *stack;

    stack = (GinBtreeStack *) palloc(sizeof(GinBtreeStack));
    stack->blkno = btree->rootBlkno;
    stack->buffer = ReadBuffer(btree->index, btree->rootBlkno);
    stack->parent = NULL;
    stack->predictNumber = 1;

    if (!searchMode)
        CheckForSerializableConflictIn(btree->index, NULL, stack->buffer);

So, we're checking for conflict on tree root for every entry insert.
That's right for posting tree, but completely unneeded for entry tree.
I'm intended to change that to lock root of only posting tree if
nobody explains me why I'm wrong...

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Reply via email to