Skip site navigation (1) Skip section navigation (2)

Re: SSI patch version 14

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SSI patch version 14
Date: 2011-01-26 07:20:39
Message-ID: 4D3FCB47.6060805@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 25.01.2011 22:53, Kevin Grittner wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com>  wrote:
>> On 25.01.2011 05:30, Kevin Grittner wrote:
>
>> The readme says this:
>>> 4. PostgreSQL supports subtransactions -- an issue not mentioned
>>>     in the papers.
>>
>> But I don't see any mention anywhere else on how subtransactions
>> are handled. If a subtransaction aborts, are its predicate locks
>> immediately released?
>
> No.  Here's the reasoning.  Within a top level transaction, you
> might start a subtransaction, read some data, and then decide based
> on what you read that the subtransaction should be rolled back.  If
> the decision as to what is part of the top level transaction can
> depend on what is read in the subtransaction, predicate locks taken
> by the subtransaction must survive rollback of the subtransaction.
>
> Does that make sense to you?

Yes, that's what I suspected. And I gather that all the data structures 
in predicate.c work with top-level xids, not subxids. When looking at an 
xid that comes from a tuple's xmin or xmax, for example, you always call 
SubTransGetTopmostTransaction() before doing much else with it.

>  Is there somewhere you would like to
> see that argument documented?

README-SSI .

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Itagaki TakahiroDate: 2011-01-26 09:13:51
Subject: Re: REVIEW: WIP: plpgsql - foreach in
Previous:From: Pavel StehuleDate: 2011-01-26 07:09:47
Subject: Re: REVIEW: WIP: plpgsql - foreach in

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group