Re: "Value locking" Wiki page

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: "Value locking" Wiki page
Date: 2014-10-01 09:44:25
Message-ID: 542BCCF9.4060706@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/01/2014 11:49 AM, Andres Freund wrote:
> On 2014-10-01 01:44:04 -0700, Peter Geoghegan wrote:
>> In the hope of unblocking things, I have created this Wiki page, which
>> details the advantages and disadvantages of all 3 approaches that have
>> been discussed, as suggested by myself and others:
>>
>> https://wiki.postgresql.org/wiki/Value_locking

Thank! That's a good summary.

>> This is by no means complete yet. There is pretty limited handling of
>> what I call "#3. "Promise" index tuples", because there was no
>> prototype version of that design, and there are many open questions
>> about how it would be implemented relative to the other 2 approaches.
>> Perhaps Andres or Simon would care to improve it. I think I've done a
>> better job of describing #2, Heikki's design - hardly surprising,
>> since there was a prototype that we discussed at length - but I'd
>> appreciate it if other people would make sure that I have everything
>> right there. This is hopefully the beginning of working the issues
>> out. I have of course also described my own proposed design alongside
>> the others.
>
> FWIW, Heikki's approach isn't what I'd have choosen, but it's something
> I can live with.

I didn't realize that "promise index tuples" were even seriously
discussed. I guess that can be made to work, too, although I don't see
the point. It wouldn't work with GiST indexes, for the same reasons as
page-level locking won't work (a tuple can legally be inserted anywhere
in a GiST index - it just degrades the index making searching more
expensive). And lossy GiST opclasses are a problem too.

It's actually more similar to approach #1 in that it puts the
responsibility of the locking in the indexam. You would probably need
the same kind of API changes to the indexam, and you could well imagine
one indexam to implement index promise tuples, while another one might
use heavy-weight locks. I don't see the advantage of #3.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-10-01 10:10:13 Re: "Value locking" Wiki page
Previous Message Marko Tiikkaja 2014-10-01 08:58:22 Re: pgcrypto: PGP armor headers