Re: Doubts about EvalPlanQual

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Jacky Leng <lengjianquan(at)163(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doubts about EvalPlanQual
Date: 2009-02-19 12:01:24
Message-ID: 499D4A14.4040902@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jasen Betts 2009-02-19 12:58:18 Re: Good Delimiter for copy command
Previous Message Max 2009-02-19 11:28:27 PostgreSQL Translation - PL/pgSQL current