Re: unsupportable composite type partition keys

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Jobin Augustine <jobinau(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: unsupportable composite type partition keys
Date: 2020-09-09 15:01:39
Message-ID: CAOBaU_aKw4b7eEvqd7xBUu=gr_P6AFPPhDMP2mz5vVXpu1Thtg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 9, 2020 at 4:17 PM Jobin Augustine <jobinau(at)gmail(dot)com> wrote:
>
> Is there a way out if someone accidentally executes the same test case against PG12?
>
> testdb=# create table partitioned (a int, b int)
> testdb-# partition by list ((row(a, b)::partitioned));
> CREATE TABLE
> testdb=# DROP TABLE partitioned;
> ERROR: cache lookup failed for type 18269

AFAICT this is only a side effect of that particular use case if you
try to drop it without having a relcache entry. Do any access before
dropping it and it should be fine, for instance:

rjuju=# create table partitioned (a int, b int)
rjuju-# partition by list ((row(a, b)::partitioned));
CREATE TABLE
rjuju=# DROP TABLE partitioned;
ERROR: cache lookup failed for type 144845
rjuju=# \d partitioned
Partitioned table "public.partitioned"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
a | integer | | |
b | integer | | |
Partition key: LIST ((ROW(a, b)::partitioned))
Number of partitions: 0

rjuju=# DROP TABLE partitioned;
DROP TABLE

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-09 15:29:18 Re: Minor fixes for upcoming version 13
Previous Message Tom Lane 2020-09-09 14:55:23 Re: SIGQUIT handling, redux