Re: BUG #15724: Can't create foreign table as partition

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: stepya(at)ukr(dot)net, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15724: Can't create foreign table as partition
Date: 2019-03-29 13:55:19
Message-ID: 20190329135519.GA21373@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Attachment Content-Type Size
partforeign-no-indexes.patch text/x-diff 1.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-03-29 14:01:31 Re: BUG #15724: Can't create foreign table as partition
Previous Message PG Bug reporting form 2019-03-29 12:55:15 BUG #15724: Can't create foreign table as partition