Re: getting ERROR "relation 16401 has no triggers" with partition foreign key alter

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: getting ERROR "relation 16401 has no triggers" with partition foreign key alter
Date: 2019-07-17 22:30:37
Message-ID: 20190717223037.GA25510@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jul-17, Alvaro Herrera wrote:

> I think we should just run CheckTableNotInUse for each partition in
> ATExecDropConstraint. Trying that out now.

Actually, that doesn't fix this problem, because the partitioned side is
the *referencing* side, and ATExecDropConstraint is obsessed about the
*referenced* side only and assumes that the calling code has already
dealt with the referencing side checks. I'm trying a fix for that now.

I wonder if there are other AT subcommands that are similarly broken,
because many of them skip the CheckTableNotInUse for the partitions.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-07-17 22:32:53 Re: PG 11 JIT deform failure
Previous Message Tom Lane 2019-07-17 22:26:45 pgsql: Sync our copy of the timezone library with IANA release tzcode20