Teodor Sigaev <teo...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers