Thomas Munro wrote: > @@ -2022,7 +2030,7 @@ EvalPlanQualFetch(EState *estate, Relation relation, > int lockmode, bool noWait, > */ > test = heap_lock_tuple(relation, &tuple, > > estate->es_output_cid, > - lockmode, > noWait, > + lockmode, > wait_policy, > false, > &buffer, &hufd); > /* We now have two pins on the buffer, get rid of one */ > ReleaseBuffer(buffer);
Doesn't this heap_lock_tuple() need to check for a WouldBlock result? Not sure that this is the same case that you were trying to test in heap_lock_updated_tuple; I think this requires an update chain (so that EPQFetch is invoked) and some tuple later in the chain is locked by a third transaction. I attach some additional minor suggestions to your patch. Please feel free to reword comments differently if you think my wording isn't an improvements (or I've maked an english mistakes). -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers