Re: SKIP LOCKED DATA (work in progress) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: SKIP LOCKED DATA (work in progress)
Date
Msg-id 20140910134728.GB4701@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: SKIP LOCKED DATA (work in progress)  (Thomas Munro <munro@ip9.org>)
Responses Re: SKIP LOCKED DATA (work in progress)
Re: SKIP LOCKED DATA (work in progress)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PENDING_LIST_CLEANUP_SIZE - maximum size of GIN pending list Re: HEAD seems to generate larger WAL regarding GIN index
Next
From: Heikki Linnakangas
Date:
Subject: Re: pgbench throttling latency limit