Re: BUG #15724: Can't create foreign table as partition
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: stepya@ukr.net, pgsql-bugs@lists.postgresql.org
Date: 2019-03-29T13:55:19Z
Lists: pgsql-bugs
Attachments
- partforeign-no-indexes.patch (text/x-diff) patch
On 2019-Mar-29, PG Bug reporting form wrote: > CREATE FOREIGN TABLE staging.msg_json PARTITION of msg_json > FOR VALUES FROM (20170101) TO (20180101) > SERVER postgres_big_data_arch > OPTIONS (schema_name 'fix_capture', table_name 'msg_json'); > > > I got error !!!! > > SQL Error [42809]: ERROR: cannot create index on foreign table "msg_json" > ERROR: cannot create index on foreign table "msg_json" > ERROR: cannot create index on foreign table "msg_json" Ah, this is because we try to propagate the index to the partition, which appears to be less than desirable. Maybe this patch fixes it? I have not tested it, only verified that it compiles. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Fix partitioned index creation with foreign partitions
- 9653ca2197e2 11.5 landed
- 55ed3defc966 12.0 landed
-
Doc: Update documentation on partitioning vs. foreign tables.
- 7338ed28e2ec 11.3 landed
- 3e6b0c472942 12.0 landed