Re: SPGist "triple parity" concept doesn't work - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SPGist "triple parity" concept doesn't work
Date
Msg-id 24219.1370881245@sss.pgh.pa.us
Whole thread Raw
In response to Re: SPGist "triple parity" concept doesn't work  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: SPGist "triple parity" concept doesn't work
Re: SPGist "triple parity" concept doesn't work
List pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
>> Thoughts?

> Give me some time to play around it. Will think.

I experimented a bit with the idea of taking a heavyweight lock to
represent the right to alter an inner tuple.  The results were pretty
grim: an spgist index build example went from 225 ms to 380 ms, and
a test case involving concurrent insertions (basically the complainant's
original example pgbench-ified) went from 5400 tps to 4300 tps.
I hadn't realized our heavyweight lock code was quite that expensive :-(

Anyway I now think that we might be better off with the other idea of
abandoning an insertion and retrying if we get a lock conflict.  That
would at least not create any performance penalty for non-concurrent
scenarios; and even in concurrent cases, I suspect you'd have to be
rather unlucky to get penalties as bad as the heavyweight-lock solution
is showing.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: JSON and unicode surrogate pairs
Next
From: Andrew Dunstan
Date:
Subject: Re: JSON and unicode surrogate pairs