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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: pisarenco(dot)a(at)gmail(dot)com
Subject: BUG #15718: DROP TABLE fails if it's partitioned by a key of a deleted enum
Date: 2019-03-28 13:19:02
Message-ID: 15718-4484a0cd9cfb2b80@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15718
Logged by: Alex
Email address: pisarenco(dot)a(at)gmail(dot)com
PostgreSQL version: 11.2
Operating system: All Linux
Description:

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

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. If those columns are also
partition keys, it ends up in a situation where it's not possible to drop
the parent table. Failure with ERROR: cache lookup failed for type 0.

Issue has been observed at least since Postgresql 10, but just got
successfully replicated on minimal code.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-03-28 13:38:29 BUG #15719: When using reverse proxy in Kubernetes (which terminates TLS) - pgAdmin container often hangs
Previous Message Alex 2019-03-28 08:40:56 Re: BUG #15717: Index not used when ordering by left joined table column