Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitionsfail

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitionsfail
Дата
Msg-id f5957799-371a-c398-b1d7-016c25e1e804@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] [BUGS] BUG #14759: insert into foreign data partitionsfail  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers
On 2017/08/01 12:45, Etsuro Fujita wrote:
> On 2017/08/01 10:18, Amit Langote wrote:
>> Good points; fixed in the updated patch.
> 
> I should have mentioned this in an earlier mail, but one thing I noticed
> is this:
> 
> -    the remote server.
> +    the remote server.  That becomes especially important if the table is
> +    being used in a partition hierarchy, where it is recommended to add
> +    a constraint matching the partition constraint expression on
> +    the remote table.
> 
> I think this would apply to CHECK constraints on foreign tables when
> implementing partitioning with inheritance.  Why do we only mention this
> for partition constraints?

One thing to consider might be that while a user can mark user-defined
CHECK constraints as being NOT VALID so that the planner doesn't consider
them during constraint exclusion, the same cannot be done for internally
generated partition constraints.

Maybe, (for time being?), the planner should be taught to disregard
foreign tables' partition constraint (if any) for constraint exclusion.

> Other than that, the patch looks good to me.

Thanks for the review.

Thanks,
Amit




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: [HACKERS] Update comments in nodeModifyTable.c
Следующее
От: "Tokuda, Takashi"
Дата:
Сообщение: [HACKERS] Improve the performance of the standby server when dropping tableson the primary server