FOR [SHARE|UPDATE] NOWAIT may still block in EvalPlanQualFetch

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: FOR [SHARE|UPDATE] NOWAIT may still block in EvalPlanQualFetch
Date: 2013-08-02 08:00:03
Message-ID: 51FB6703.9090801@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

FOR SHARE|UPDATE NOWAIT will still block if they have to follow a ctid
chain because the call to EvalPlanQualFetch doesn't take a param for
noWait, so it doesn't know not to block if the updated row can't be locked.

The attached patch against master includes an isolationtester spec to
demonstrate this issue and a proposed fix. Builds with the fix applied
pass "make check" and isolationtester "make installcheck".

To reach this point you need to apply the patch in
http://www.postgresql.org/message-id/51FB4305.3070600@2ndquadrant.com
first, otherwise you'll get stuck there and won't touch the code changed
in this patch.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Add-noWait-param-to-EvalPlanQualFetch.patch text/x-patch 7.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-08-02 09:01:32 Re: [9.3 bug] disk space in pg_xlog increases during archive recovery
Previous Message Amit Kapila 2013-08-02 07:23:17 Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])