pgsql: Avoid deadlocks during insertion into SP-GiST indexes.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid deadlocks during insertion into SP-GiST indexes.
Date: 2013-06-14 18:27:05
Message-ID: E1UnYiH-0004T0-1c@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid deadlocks during insertion into SP-GiST indexes.

SP-GiST's original scheme for avoiding deadlocks during concurrent index
insertions doesn't work, as per report from Hailong Li, and there isn't any
evident way to make it work completely. We could possibly lock individual
inner tuples instead of their whole pages, but preliminary experimentation
suggests that the performance penalty would be huge. Instead, if we fail
to get a buffer lock while descending the tree, just restart the tree
descent altogether. We keep the old tuple positioning rules, though, in
hopes of reducing the number of cases where this can happen.

Teodor Sigaev, somewhat edited by Tom Lane

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/cbabf50dccc29aed456a56ae8909d4d593c3ab38

Modified Files
--------------
src/backend/access/spgist/README | 36 +++++++++++++++++++++----------
src/backend/access/spgist/spgdoinsert.c | 34 +++++++++++++++++++++++++----
src/backend/access/spgist/spginsert.c | 17 +++++++++++++--
src/include/access/spgist_private.h | 2 +-
4 files changed, 71 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message pgsql 2013-06-14 18:37:03 pgsql: Branch refs/heads/REL9_3_STABLE was created
Previous Message Tom Lane 2013-06-14 03:15:23 pgsql: Remove special-case treatment of LOG severity level in standalon