Re: BUG #15718: DROP TABLE fails if it's partitioned by a key of a deleted enum

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: pisarenco(dot)a(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15718: DROP TABLE fails if it's partitioned by a key of a deleted enum
Date: 2019-03-28 17:04:13
Message-ID: 20190328170413.GA23764@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2019-Mar-28, PG Bug reporting form wrote:

> Code to replicate the issue:
> https://pastebin.com/rc8q35Qj

Please paste the code in the email. We don't like external references.

> This happened to our ETL processes that re-create the staging data on each
> run. Enums are defining partition keys for some tables, that then flow into
> tables in another schema. When the schema containing that enum gets dropped,
> the columns that use it are also dropped.

Sounds like we're forgetting to add a dependency on the datatype of the
partition key.

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexandru Pisarenco 2019-03-28 17:19:17 Re: BUG #15718: DROP TABLE fails if it's partitioned by a key of a deleted enum
Previous Message PG Bug reporting form 2019-03-28 15:34:43 BUG #15720: `executor could not find named tuplestore ABC` in AFTER DELETE trigger referencing OLD TABLE as ABC