Re: unsupportable composite type partition keys
Julien Rouhaud <rjuju123@gmail.com>
From: Julien Rouhaud <rjuju123@gmail.com>
To: Jobin Augustine <jobinau@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Langote <amitlangote09@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-09T15:01:39Z
Lists: pgsql-hackers
On Wed, Sep 9, 2020 at 4:17 PM Jobin Augustine <jobinau@gmail.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
Commits
-
Fix CheckAttributeType's handling of collations for ranges.
- f521ef0ae319 9.4.26 landed
- de3d2df75169 10.12 landed
- 74b35eb468dc 13.0 landed
- 742c646c1987 9.6.17 landed
- 65aa155135a5 12.2 landed
- 59047b6d0c93 9.5.21 landed
- 25dc267a1be5 11.7 landed
-
Improve comments in utils/rel.h.
- fbe0232358c1 13.0 landed
-
Allow whole-row Vars to be used in partitioning expressions.
- bb4114a4e2c6 13.0 landed
-
Remove equalPartitionDescs().
- 42f74f49367b 13.0 landed
-
Load relcache entries' partitioning data on-demand, not immediately.
- 5b9312378e2f 13.0 landed
-
Disallow partition key expressions that return pseudo-types.
- ea1205a02a03 10.12 landed
- 7fbb39a967ea 12.2 landed
- 281dd22ac015 11.7 landed
- 39ebb943de9d 13.0 landed
-
Prevent a rowtype from being included in itself via a range.
- 6609c3ad984b 9.5.21 landed
- 4af2531d0393 10.12 landed
- 354d913f9745 9.6.17 landed
- 31dfa40a8341 11.7 landed
- 0d245d13c643 9.4.26 landed
- fc7695891d35 13.0 landed
- 976cb11f6c58 12.2 landed