Re: Doubts about EvalPlanQual - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Doubts about EvalPlanQual
Date
Msg-id 499D4A14.4040902@enterprisedb.com
Whole thread Raw
In response to Re: Doubts about EvalPlanQual  ("Jacky Leng" <lengjianquan@163.com>)
Responses Re: Doubts about EvalPlanQual
List pgsql-hackers
Jacky Leng wrote:
>> Tuples with an aborted xmin can be vacuumed right away. When we're
>> following the update chain in EvalPlanQual, it's possible that the updater 
>> has aborted, the updated dead tuple is vacuumed away, and the slot is 
>> reused for another unrelated tuple.
> 
> But if the updater aborted, how can EvalPlanQual be called?
> In this situation (updater aborted), EvalPlanQual's caller (such as 
> ExecUpdate and ExecDelete)
> should get "HeapTupleMayBeUpdated", rather than "HeapTupleUpdated".

Well, consider this update chain:

A -> B -> C

If A is the tuple visible to the snapshot of the updating query, and the 
updater of (A->B) has committed, heap_update/delete call in 
ExecUpdate/Delete will return HeapTupleUpdate.

Now that think about this more, I don't see either how that check in 
EvalPlanQual could ever be true.

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


pgsql-hackers by date:

Previous
From: Max
Date:
Subject: [Fwd: Re: PostgreSQL Translation - PL/pgSQL current]
Next
From: Zdenek Kotala
Date:
Subject: Re: vacuumdb --freeze