Re: Relations being opened without any lock whatever

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Relations being opened without any lock whatever
Date: 2018-10-01 00:08:28
Message-ID: 27229.1538352508@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-10-01 02:23:19 Re: file cloning in pg_upgrade and CREATE DATABASE
Previous Message Michael Paquier 2018-09-30 23:29:19 Re: Relations being opened without any lock whatever