Re: tablecmds.c and lock hierarchy - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: tablecmds.c and lock hierarchy
Date
Msg-id CAB7nPqRUWp09gC-oaxaXZLR3U0VRXn06WbhwKa03sieLkdZyqQ@mail.gmail.com
Whole thread Raw
In response to Re: tablecmds.c and lock hierarchy  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Wed, Aug 5, 2015 at 2:23 AM, Alvaro Herrera wrote:
> Michael Paquier wrote:
>> On Tue, Aug 4, 2015 at 2:43 PM, Alvaro Herrera wrote:
>> Now, let's take for example this case with locks A, B, C, D:
>> - Lock A conflicts with ACD
>> - B with BCD
>> - C with itself
>> - D with itself
>> What would you choose as a result of add(C,D)? A or B? Or the super
>> lock conflicting with all of them?

Actually the answer is the sum of all the potential candidates. This
converges to AccessExclusiveLock.

> This appears to me an hypothetical case that I don't think occurs in our
> conflicts table, so I wouldn't worry about it.

No it doesn't. I am using a huge hypothetical "if" here :)
-- 
Michael



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: cost_agg() with AGG_HASHED does not account for startup costs
Next
From: Tom Lane
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c