DISCARD TEMP results in "ERROR: cache lookup failed for type 0"
Manuel Rigger <rigger.manuel@gmail.com>
From: Manuel Rigger <rigger.manuel@gmail.com>
To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-07-04T12:59:37Z
Lists: pgsql-bugs
Hi everyone, the test case below fails with "ERROR: cache lookup failed for type 0", which is unexpected. CREATE TEMP TABLE t0(c0 INT GENERATED ALWAYS AS IDENTITY) PARTITION BY HASH((t0.c0)); VACUUM FULL; DISCARD TEMP; -- unexpected: ERROR: cache lookup failed for type 0 The error only occurs for TEMP tables. I can reproduce it when partitioning by HASH, RANGE, or LIST. It occurs with GENERATED BY DEFAULT and also with GENERATED BY ALWAYS. I found this bug on Ubuntu 11.4-1.pgdg19.04+1. Best, Manuel
Commits
-
Install dependencies to prevent dropping partition key columns.
- a0555ddab9b6 13.0 landed
- 79e573fa4986 12.0 landed
- 6cdefc82ba9d 11.5 landed
- 0e1deaa4c424 10.10 landed
-
Sort the dependent objects before recursing in findDependentObjects().
- f1ad067fc3ae 12.0 cited