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

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: 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-06-21 06:37:54
Message-ID: CABOikdP5KPfJOpWVtU-XvHoXbHYntJ47+sCf_r6Z5WRCZsArFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 20, 2019 at 6:07 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

>
>
> With this patch, an index creation will no longer fail in the presence
> of a partition that is a foreign table, as long as the index is not a
> constraint index (not unique, not primary key). Conversely,
> creating/attaching a partition that is a foreign table does not fail if
> the partitioned table only has non-constraint indexes.
>
>
Like others suggested above, I also think that we should make this is a
no-op on the foreign tables i.e. not fail even when there exists a UNIQUE
or PRIMARY KEY on the parent table. We simply assume that the appropriate
constraints will be defined on the foreign side and violations will be
caught. This is same as CHECK constraints on the foreign partitions, that
we assume the foreign server will enforce.

Thanks,
Pavan

--
Pavan Deolasee http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2019-06-21 08:43:57 Re: segfault during SELECT using && ANY (ARRAY[NULL]::BOX2D).
Previous Message Rozboril, Robert 2019-06-21 06:13:14 RE: PostgreSQL v11.3 - Records are deleted from child table if partition key of parent table is changed