Re: possible deadlock: different lock ordering for heap pages

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Nishant, Fnu" <nishantf(at)amazon(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: possible deadlock: different lock ordering for heap pages
Date: 2019-02-01 05:20:49
Message-ID: CAA4eK1JPoxJqi73KqRJobjnL=gpPxVedyiRrMQPBDueYvkG0jw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 21, 2019 at 10:39 PM Nishant, Fnu <nishantf(at)amazon(dot)com> wrote:
>
> Thanks Amit for your review.
>
> On 1/20/19, 6:55 AM, "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > I think you need to change below code as well....
> Assert(buffer2 == InvalidBuffer || buffer1 <= buffer2);
>
> Done. Updated the patch.
>

Attached is an updated patch. I have edited comments and commit
message in the patch. I would like to backpatch this till 9.4 unless
anyone thinks otherwise.

BTW, do you have a reproducible test case for this fix? How did you
catch this, browsing code?

How do we pronounce your name, is Nishant Fnu okay? I would like to
mention you as the author of the patch, so need to write your name.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
lock-order.1.patch application/octet-stream 2.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nishant, Fnu 2019-02-01 05:30:18 Re: possible deadlock: different lock ordering for heap pages
Previous Message Tsunakawa, Takayuki 2019-02-01 05:02:54 RE: reloption to prevent VACUUM from truncating empty pages at the end of relation