Re: Relations being opened without any lock whatever - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Relations being opened without any lock whatever
Date
Msg-id 27229.1538352508@sss.pgh.pa.us
Whole thread Raw
In response to Re: Relations being opened without any lock whatever  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> Okay, that's bad.  Wouldn't it be sufficient to use what the caller
> passes out as lockmode instead of enforcing AEL though?

No, because at the bottom of that function we're going to do a DROP
CONSTRAINT on the old FK constraint, and that needs AEL anyway.
If we tried to take a lesser lock first we'd just be creating a
lock-upgrade deadlock risk.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Relations being opened without any lock whatever
Next
From: Michael Paquier
Date:
Subject: Re: file cloning in pg_upgrade and CREATE DATABASE