Re: "Value locking" Wiki page

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: "Value locking" Wiki page
Date: 2014-10-01 11:42:11
Message-ID: CA+U5nM++Q-j_s-7BKGoPYykKq8UZkc3DxpFhXUeXo+4vQYKTGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1 October 2014 11:58, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:
> On 10/01/2014 01:50 PM, Simon Riggs wrote:
>>
>> On 1 October 2014 10:44, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
>> wrote:
>>
>>> 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.
>>
>>
>> GiST doesn't support unique indexes, so it is not in any way a problem.
>
>
> GiST supports exclusion constraints. That is one of the main reasons I want
> to do promise tuples, instead of locking within the indexam: to support this
> feature with exclusion constraints.

That does sound interesting, but I am concerned the semantics may cause issues.

If I go to insert a row for 'UK' and find an existing row for
'Europe', do we really want to update the population of Europe to be
the population of the UK, simply because the UK and Europe have an
exclusion conflict?

Please give some concrete examples of a business request that might be
satisified by such a feature.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2014-10-01 11:42:49 Re: CREATE IF NOT EXISTS INDEX
Previous Message Andres Freund 2014-10-01 11:38:02 Re: pg_receivexlog and replication slots