Re: Update on true serializable techniques in MVCC - Mailing list pgsql-hackers

From Boszormenyi Zoltan
Subject Re: Update on true serializable techniques in MVCC
Date
Msg-id 4B292717.40404@cybertec.at
Whole thread Raw
In response to Re: Update on true serializable techniques in MVCC  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Update on true serializable techniques in MVCC  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas írta:
> On Wed, Dec 16, 2009 at 1:25 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>   
>> On Wed, Dec 16, 2009 at 1:14 PM, Alvaro Herrera
>> <alvherre@commandprompt.com> wrote:
>>     
>>> Robert Haas escribió:
>>>       
>>>> On Wed, Dec 16, 2009 at 10:29 AM, Andres Freund <andres@anarazel.de> wrote:
>>>>         
>>>>> On Wednesday 16 December 2009 16:24:42 Robert Haas wrote:
>>>>>           
>>>>>>>   Inserts and deletes follow the same protocol, obtaining an exclusive
>>>>>>>   lock on the row after the one being inserted or deleted. The result
>>>>>>>   of this locking protocol is that a range scan prevents concurrent
>>>>>>>   inserts or delete within the range of the scan, and vice versa.
>>>>>>>
>>>>>>> That sounds like it should actually work.
>>>>>>>               
>>>>>> Only if you can guarantee that the database will access the rows using
>>>>>> some particular index.  If it gets to the data some other way it might
>>>>>> accidentally circumvent the lock.  That's kind of a killer in terms of
>>>>>> making this work for PostgreSQL.
>>>>>>             
>>>>> Isnt the whole topic only relevant for writing access? There you have to
>>>>> access the index anyway.
>>>>>           
>>>> Yeah, I guess you have to insert the new tuple.  I guess while you
>>>> were at it you might check whether the next tuple is locked...
>>>>         
>>> So you'd have to disable HOT updates when true serializability was
>>> active?
>>>       
>> I thought about that, but I don't think so.   HOT only applies to
>> updates, and predicate locking only applies to inserts.  Unless I have
>> my head in the sand?
>>     
>
> Err, no, wait.  Predicate locking can apply to updates, but since HOT
> updates never update an indexed column, I think we might still be OK?
>   

A predicate can include columns from an index plus others.
Am I missing something?

> ...Robert
>
>   


-- 
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Update on true serializable techniques in MVCC
Next
From: "Kevin Grittner"
Date:
Subject: Re: Update on true serializable techniques in MVCC