Re: [HACKERS] Tuple-routing for certain partitioned tables notworking as expected

Поиск
Список
Период
Сортировка
От Etsuro Fujita
Тема Re: [HACKERS] Tuple-routing for certain partitioned tables notworking as expected
Дата
Msg-id e092f6c8-2a23-4c58-ad19-d52303f99c09@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] Tuple-routing for certain partitioned tables notworking as expected  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2017/09/08 0:21, Robert Haas wrote:
> On Thu, Sep 7, 2017 at 5:13 AM, Etsuro Fujita
> <fujita.etsuro@lab.ntt.co.jp> wrote:
>> On 2017/08/30 17:20, Etsuro Fujita wrote:
>>> Here is a patch to skip the CheckValidResultRel checks for a target table
>>> if it's a foreign partition to perform tuple-routing for, as proposed by
>>> Robert.
>>
>> In the patch, to skip the checks, I passed to CheckValidResultRel a new flag
>> indicating whether the target relation is a partition to do tuple-routing
>> for, but while updating another patch for tuple-routing for foreign
>> partitions in PG11, I noticed that it would be better to pass ResultRelInfo
>> than that flag.  The reason is: (1) we can see whether the relation is such
>> a partition by looking at the ResultRelInfo's ri_PartitionRoot, instead of
>> that flag, and (2) this is for tuple-routing for foreign partitions, but we
>> could extend that function with that argument to do the checks without
>> throwing an error and save the result in a new member of ResultRelInfo (eg,
>> ri_PartitionIsValid) so that we can use that info to determine in ExecInsert
>> whether a foreign partition chosen by ExecFindPartition is valid for
>> tuple-routing.  So, I updated the patch that way.  Attached is an updated
>> version of the patch.
> 
> OK, committed to master and v10.  I am less convinced than you that
> this was a must-fix issue, but it's not a very invasive change the way
> you did it here.

Thank you!

I'll update the tuple-routing-for-foreign-partitions patch that way.

Best regards,
Etsuro Fujita



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] GnuTLS support
Следующее
От: Pavel Stehule
Дата:
Сообщение: [HACKERS] psql: new help related to variables are not too readable