From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: pisarenco.a@gmail.com
Subject: BUG #15718: DROP TABLE fails if it's partitioned by a key of a deleted enum
Date: Thu, 28 Mar 2019 13:19:02 +0000
Message-ID: <15718-4484a0cd9cfb2b80@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15718
Logged by: Alex
Email address: pisarenco.a@gmail.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.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pisarenco.a@gmail.com
Subject: Re: BUG #15718: DROP TABLE fails if it's partitioned by a key of a deleted enum
In-Reply-To: <15718-4484a0cd9cfb2b80@postgresql.org>
References: <15718-4484a0cd9cfb2b80@postgresql.org>
* 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