From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Relations being opened without any lock whatever
Date: Sun, 30 Sep 2018 20:08:28 -0400
Message-ID: <27229.1538352508@sss.pgh.pa.us> (raw)
In-Reply-To: <20180930232919.GC2595@paquier.xyz>
References: <2038.1538335244@sss.pgh.pa.us>
<20180930232919.GC2595@paquier.xyz>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: Relations being opened without any lock whatever
In-Reply-To: <27229.1538352508@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox