Re: GIN predicate locking slows down valgrind isolationtests tremendously
Alexander Korotkov <a.korotkov@postgrespro.ru>
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Teodor Sigaev <teodor@sigaev.ru>,
Shubham Barai <shubhambaraiss@gmail.com>, Dmitry Ivanov <d.ivanov@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Andres Freund <andres@anarazel.de>
Date: 2018-12-24T21:19:27Z
Lists: pgsql-hackers
On Fri, Dec 21, 2018 at 1:50 AM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> чт, 20 дек. 2018 г., 2:22 Andres Freund andres@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
Commits
-
Reduce length of GIN predicate locking isolation test suite
- fcdda202bcf8 11.2 landed
- 0c6f4f9212cf 12.0 landed
-
Remove entry tree root conflict checking from GIN predicate locking
- b450abd2551e 12.0 landed
- fd7c08195592 11.2 landed